Documentation
¶
Index ¶
Constants ¶
View Source
const (
// ROUTE_CONTROLLER route controller name
ROUTE_CONTROLLER = "route-controller"
)
Variables ¶
View Source
var Options = RoutesOptions{}
Options global options for route controller
Functions ¶
func ContainsCidr ¶
ContainsCidr contains with equal.
func RealContainsCidr ¶
RealContainsCidr real contains cidr
func RouteCacheMap ¶
func RouteCacheMap(routes []*cloudprovider.Route) map[types.NodeName]*cloudprovider.Route
RouteCacheMap return cached map for routes
Types ¶
type RouteController ¶
type RouteController struct {
// contains filtered or unexported fields
}
RouteController response for route reconcile
func New ¶
func New(routes Routes, kubeClient clientset.Interface, nodeInformer coreinformers.NodeInformer, clusterName string, clusterCIDR *net.IPNet) (*RouteController, error)
New new route controller
func (*RouteController) Run ¶
func (rc *RouteController) Run(stopCh <-chan struct{}, syncPeriod time.Duration)
Run start route controller
type Routes ¶
type Routes interface {
// RouteTables get all available route tables.
RouteTables(clusterName string) ([]string, error)
// ListRoutes lists all managed routes that belong to the specified clusterName
ListRoutes(clusterName string, table string) ([]*cloudprovider.Route, error)
// CreateRoute creates the described managed route
// route.Name will be ignored, although the cloud-provider may use nameHint
// to create a more user-meaningful name.
CreateRoute(clusterName string, nameHint string, table string, route *cloudprovider.Route) error
// DeleteRoute deletes the specified managed route
// Route should be as returned by ListRoutes
DeleteRoute(clusterName string, table string, route *cloudprovider.Route) error
}
Routes is an abstract, pluggable interface for advanced routing rules.
Click to show internal directories.
Click to hide internal directories.