Documentation ¶
Index ¶
- func GetConfig(kubeconfig string) (*rest.Config, error)
- func NewConfig(kubeconfig string) (*rest.Config, error)
- func StartControllerManager(controllers ...Controller) <-chan struct{}
- type Controller
- type DefaultMethods
- type QueueWorker
- type QueueingEventHandler
- type SharedInformersDefaults
- func (*SharedInformersDefaults) Init()
- func (si *SharedInformersDefaults) InitKubernetesInformers(config *rest.Config)
- func (*SharedInformersDefaults) SetupKubernetesTypes() bool
- func (*SharedInformersDefaults) StartAdditionalInformers(shutdown <-chan struct{})
- func (c *SharedInformersDefaults) Watch(name string, i cache.SharedIndexInformer, f func(interface{}) (string, error), ...)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func StartControllerManager ¶
func StartControllerManager(controllers ...Controller) <-chan struct{}
StartControllerManager
Types ¶
type Controller ¶
type Controller interface { Run(stopCh <-chan struct{}) GetName() string }
type DefaultMethods ¶
type DefaultMethods interface {
Run(stopCh <-chan struct{})
}
func GetDefaults ¶
func GetDefaults(c interface{}) DefaultMethods
type QueueWorker ¶
type QueueWorker struct { Queue workqueue.RateLimitingInterface MaxRetries int Name string Reconcile func(key string) error }
QueueWorker continuously runs a Reconcile function against a message Queue
func (*QueueWorker) ProcessAllMessages ¶
func (q *QueueWorker) ProcessAllMessages()
ProcessAllMessages tries to process all messages in the Queue
func (*QueueWorker) ProcessMessage ¶
func (q *QueueWorker) ProcessMessage() bool
ProcessMessage tries to process the next message in the Queue, and requeues on an error
func (*QueueWorker) Run ¶
func (q *QueueWorker) Run(shutdown <-chan struct{})
Run schedules a routine to continuously process Queue messages until shutdown is closed
type QueueingEventHandler ¶
type QueueingEventHandler struct { Queue workqueue.RateLimitingInterface ObjToKey func(obj interface{}) (string, error) EnqueueDelete bool }
QueueingEventHandler queues the key for the object on add and update events
func (*QueueingEventHandler) OnAdd ¶
func (c *QueueingEventHandler) OnAdd(obj interface{})
func (*QueueingEventHandler) OnDelete ¶
func (c *QueueingEventHandler) OnDelete(obj interface{})
func (*QueueingEventHandler) OnUpdate ¶
func (c *QueueingEventHandler) OnUpdate(oldObj, newObj interface{})
type SharedInformersDefaults ¶
type SharedInformersDefaults struct { // shared by all of its controllers. // Set this by overriding the InitExtensions function on the generated *SharedInformers // type under the consuming projects pkg/controller/sharedinformers package // by in a new informers.go file Extensions interface{} }
func (*SharedInformersDefaults) Init ¶
func (*SharedInformersDefaults) Init()
Init is called before the informers are started, and can be used to perform any additional initialization shared by multiple controllers
func (*SharedInformersDefaults) InitKubernetesInformers ¶
func (si *SharedInformersDefaults) InitKubernetesInformers(config *rest.Config)
InitKubernetesInformers initializes the Kubernetes clientset and informerfactory informers must still be started by overriding StartAdditionalInformers
func (*SharedInformersDefaults) SetupKubernetesTypes ¶
func (*SharedInformersDefaults) SetupKubernetesTypes() bool
SetupKubernetesTypes can be overridden to initialize the Kubernetes clientset and informers
func (*SharedInformersDefaults) StartAdditionalInformers ¶
func (*SharedInformersDefaults) StartAdditionalInformers(shutdown <-chan struct{})
StartAdditionalInformers is called to start informers for resources not defined in the extension apiserver. Override this and use it to start informers for Kubernetes resources such as Pods
func (*SharedInformersDefaults) Watch ¶
func (c *SharedInformersDefaults) Watch( name string, i cache.SharedIndexInformer, f func(interface{}) (string, error), r func(string) error)