controller

package
v0.3.1-alpha.2 Latest Latest
Warning

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

Go to latest
Published: Oct 13, 2021 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type APIController added in v0.3.0

type APIController interface {
	SetInformingFunc(apiReflection.ApiType, func(*corev1.Pod))
	CacheManager() storage.CacheManagerReaderAdder
	StartController()
	StopController() error
	StopReflection(restart bool)
}

APIController defines the interface exposed by a controller implementing API reflection.

type APIReflectorsController

type APIReflectorsController interface {
	Stop()
	DispatchEvent(event apimgmt.ApiEvent)
}

type Controller

type Controller struct {
	// contains filtered or unexported fields
}

Controller is a concrete implementation of the ApiController interface.

func NewAPIController added in v0.3.0

func NewAPIController(homeClient, foreignClient kubernetes.Interface, informerResyncPeriod time.Duration,
	mapper namespacesmapping.MapperController, opts map[options.OptionKey]options.Option) *Controller

NewAPIController returns a Controller instance for a given set of home and foreign clients.

func (*Controller) CacheManager

func (c *Controller) CacheManager() storage.CacheManagerReaderAdder

CacheManager returns the CacheManager associated with the controller.

func (*Controller) SetInformingFunc

func (c *Controller) SetInformingFunc(api apiReflection.ApiType, handler func(*corev1.Pod))

SetInformingFunc configures the handlers triggered for a certain API type by incoming reflection events.

func (*Controller) StartController

func (c *Controller) StartController()

StartController spawns the worker threads and starts the reflection control loops.

func (*Controller) StopController

func (c *Controller) StopController() error

StopController stops the controller and the reflection control loops.

func (*Controller) StopReflection

func (c *Controller) StopReflection(restart bool)

StopReflection stops the reflection control loops, optionally restarting them.

type IncomingAPIReflectorsController

type IncomingAPIReflectorsController interface {
	APIReflectorsController
	SpecializedAPIReflectorsController

	SetInforming(api apimgmt.ApiType, handler func(*corev1.Pod))
	// contains filtered or unexported methods
}

func NewIncomingReflectorsController

func NewIncomingReflectorsController(homeClient, foreignClient kubernetes.Interface, cacheManager *storage.Manager,
	outputChan chan apimgmt.ApiEvent,
	namespaceNatting namespacesmapping.MapperController,
	opts map[options.OptionKey]options.Option) IncomingAPIReflectorsController

type IncomingReflectorsController

type IncomingReflectorsController struct {
	*ReflectorsController
}

func (*IncomingReflectorsController) SetInforming

func (c *IncomingReflectorsController) SetInforming(api apimgmt.ApiType, handler func(*corev1.Pod))

SetInforming configures the handlers triggered for a certain API type by incoming reflection events.

func (*IncomingReflectorsController) Start

func (c *IncomingReflectorsController) Start()

type OutGoingAPIReflectorsController

type OutGoingAPIReflectorsController interface {
	APIReflectorsController
	SpecializedAPIReflectorsController
	// contains filtered or unexported methods
}

func NewOutgoingReflectorsController

func NewOutgoingReflectorsController(homeClient, foreignClient kubernetes.Interface, cacheManager *storage.Manager,
	outputChan chan apimgmt.ApiEvent,
	namespaceNatting namespacesmapping.MapperController,
	opts map[options.OptionKey]options.Option) OutGoingAPIReflectorsController

type OutgoingReflectorsController

type OutgoingReflectorsController struct {
	*ReflectorsController
}

func (*OutgoingReflectorsController) Start

func (c *OutgoingReflectorsController) Start()

type ReflectorsController

type ReflectorsController struct {
	// contains filtered or unexported fields
}

func (*ReflectorsController) DispatchEvent

func (c *ReflectorsController) DispatchEvent(event apimgmt.ApiEvent)

func (*ReflectorsController) Stop

func (c *ReflectorsController) Stop()

type SpecializedAPIReflectorsController

type SpecializedAPIReflectorsController interface {
	Start()
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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