Documentation ¶
Index ¶
- type BaseController
- func (c *BaseController) AddEventHandlerWithResyncPeriod() error
- func (c *BaseController) GetWorkqueue() workqueue.Interface
- func (c *BaseController) SetReconciler(r Reconciler)
- func (c *BaseController) SetWorkScheduler(s LoadScheduler)
- func (c *BaseController) SetWorkerThreadCount(threads int)
- func (c *BaseController) SetWorkqueue(w workqueue.Interface)
- func (c *BaseController) WaitForCacheSync(stopCh <-chan struct{}) error
- type DelayingWorkqueueController
- type LoadScheduler
- type RateLimitingWorkqueueController
- type Reconciler
- type ShardedController
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BaseController ¶
type BaseController struct { Started bool Context context.Context Informer cache.SharedIndexInformer // The informer to attach to InformerHandlerRegistration cache.ResourceEventHandlerRegistration // We save the Registration here to unregister when shutting down ResyncPeriod time.Duration // contains filtered or unexported fields }
func (*BaseController) AddEventHandlerWithResyncPeriod ¶
func (c *BaseController) AddEventHandlerWithResyncPeriod() error
func (*BaseController) GetWorkqueue ¶
func (c *BaseController) GetWorkqueue() workqueue.Interface
func (*BaseController) SetReconciler ¶
func (c *BaseController) SetReconciler(r Reconciler)
Set the reconciler interface with the controller specific reconcile logic
func (*BaseController) SetWorkScheduler ¶
func (c *BaseController) SetWorkScheduler(s LoadScheduler)
func (*BaseController) SetWorkerThreadCount ¶
func (c *BaseController) SetWorkerThreadCount(threads int)
Set the thread count of workers processing the local queue. This has to be defined before starting the controller
func (*BaseController) SetWorkqueue ¶
func (c *BaseController) SetWorkqueue(w workqueue.Interface)
func (*BaseController) WaitForCacheSync ¶
func (c *BaseController) WaitForCacheSync(stopCh <-chan struct{}) error
Override this method if you need to wait for other informers aswell
type DelayingWorkqueueController ¶
type DelayingWorkqueueController struct {
ShardedController
}
func NewDelayingWorkqueueController ¶
func NewDelayingWorkqueueController(ctx context.Context, informer cache.SharedIndexInformer, kubeClient *kubernetes.Clientset, name string, resyncPeriod time.Duration, queue workqueue.DelayingInterface) *DelayingWorkqueueController
func (*DelayingWorkqueueController) GetDelayingWorkqueue ¶
func (dwq *DelayingWorkqueueController) GetDelayingWorkqueue() (workqueue.DelayingInterface, error)
type LoadScheduler ¶
type LoadScheduler interface {
// contains filtered or unexported methods
}
LoadScheduler probvides enqueue method to only enqueue objects it is suited for.
type RateLimitingWorkqueueController ¶
type RateLimitingWorkqueueController struct {
ShardedController
}
func NewRateLimitingWorkqueueController ¶
func NewRateLimitingWorkqueueController(ctx context.Context, informer cache.SharedIndexInformer, kubeClient *kubernetes.Clientset, name string, resyncPeriod time.Duration, rateLimiter workqueue.RateLimiter) *RateLimitingWorkqueueController
func (*RateLimitingWorkqueueController) GetRateLimitingWorkqueue ¶
func (rlwq *RateLimitingWorkqueueController) GetRateLimitingWorkqueue() (workqueue.RateLimitingInterface, error)
type Reconciler ¶
Reconciler required Reconcile method.
type ShardedController ¶
type ShardedController struct { BaseController LoadScheduler // contains filtered or unexported fields }
func NewShardedController ¶
func NewShardedController(ctx context.Context, informer cache.SharedIndexInformer, kubeclient *kubernetes.Clientset, name string, resyncPeriod time.Duration) *ShardedController
func (*ShardedController) RunSharded ¶
func (c *ShardedController) RunSharded(stopCh <-chan struct{}, statefulSetName microservices.MicroService) error
RunSharded will start a sharded controller that watches the parent StatefulSet and applies sharding based on the total replica count
Click to show internal directories.
Click to hide internal directories.