Documentation ¶
Index ¶
- type Interface
- type Registry
- func (p *Registry) AllInterfaces() []string
- func (p *Registry) Contains(name string) bool
- func (p *Registry) Get(name string) (Interface, bool)
- func (p *Registry) InitAll(c config.Configuration, sif informers.SharedInformerFactory)
- func (p *Registry) Register(name string, plugin Interface)
- func (p *Registry) RunAll(stopCh <-chan struct{})
- func (p *Registry) SyncAll(lb *lbapi.LoadBalancer)
- type RegistryBuilder
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Interface ¶
type Interface interface { Init(config.Configuration, informers.SharedInformerFactory) Run(stopCh <-chan struct{}) OnSync(*lbapi.LoadBalancer) }
Interface defines a pluggable proxy interface
type Registry ¶
type Registry struct {
// contains filtered or unexported fields
}
Registry ...
func (*Registry) AllInterfaces ¶
AllInterfaces returns all registered plugins' names
func (*Registry) InitAll ¶
func (p *Registry) InitAll(c config.Configuration, sif informers.SharedInformerFactory)
InitAll calls all registered plugins OnSync function
func (*Registry) Register ¶
Register registers a Interface into registry by name. Register does not allow user to override an existing Interface. This is expected to happen during app startup
func (*Registry) RunAll ¶
func (p *Registry) RunAll(stopCh <-chan struct{})
RunAll calls all registered plugins' Run function
func (*Registry) SyncAll ¶
func (p *Registry) SyncAll(lb *lbapi.LoadBalancer)
SyncAll calls all registered plugins OnSync function
type RegistryBuilder ¶
RegistryBuilder collects functions that add things to a registry. It's to allow code to compile without explicitly referencing generated types. You should declare one in each package that will have generated deep copy or conversion functions.
func NewRegistryBuilder ¶
func NewRegistryBuilder(funcs ...func(*Registry) error) RegistryBuilder
NewRegistryBuilder calls Register for you.
func (*RegistryBuilder) AddToRegistry ¶
func (rb *RegistryBuilder) AddToRegistry(r *Registry) error
AddToRegistry applies all the stored functions to the registry. A non-nil error indicates that one function failed and the attempt was abandoned.
func (*RegistryBuilder) Register ¶
func (rb *RegistryBuilder) Register(funcs ...func(*Registry) error)
Register adds a registry setup function to the list.