factory

package
v0.0.0-...-d3d374b Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 15, 2018 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Overview

Package factory contains code used to create the router controller.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type RouterControllerFactory

type RouterControllerFactory struct {
	KClient        kclient.EndpointsNamespacer
	OSClient       osclient.RoutesNamespacer
	NodeClient     kclient.NodesInterface
	Namespaces     controller.NamespaceLister
	ResyncInterval time.Duration
	Namespace      string
	Labels         labels.Selector
	Fields         fields.Selector
}

RouterControllerFactory initializes and manages the watches that drive a router controller. It supports optional scoping on Namespace, Labels, and Fields of routes. If Namespace is empty, it means "all namespaces".

func NewDefaultRouterControllerFactory

func NewDefaultRouterControllerFactory(oc osclient.RoutesNamespacer, kc kclient.Interface) *RouterControllerFactory

NewDefaultRouterControllerFactory initializes a default router controller factory.

func (*RouterControllerFactory) Create

func (factory *RouterControllerFactory) Create(plugin router.Plugin, watchNodes bool) *controller.RouterController

Create begins listing and watching against the API server for the desired route and endpoint resources. It spawns child goroutines that cannot be terminated.

func (*RouterControllerFactory) CreateNotifier

func (factory *RouterControllerFactory) CreateNotifier(changed func()) RoutesByHost

CreateNotifier begins listing and watching against the API server for the desired route and endpoint resources. It spawns child goroutines that cannot be terminated. It is a more efficient store of a route system.

type RoutesByHost

type RoutesByHost interface {
	Hosts() []string
	Route(host string) (*routeapi.Route, bool)
	Endpoints(namespace, name string) *kapi.Endpoints
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL