Documentation ¶
Index ¶
- Constants
- type DefaultHandler
- func (handler *DefaultHandler) AddFunc(ctx context.Context, namespace, name string) error
- func (handler *DefaultHandler) DeleteFunc(ctx context.Context, namespace, name string) error
- func (handler *DefaultHandler) GetInformer() cache.SharedInformer
- func (handler *DefaultHandler) GetName() string
- func (handler *DefaultHandler) GetSynced() cache.InformerSynced
- func (handler *DefaultHandler) UpdateFunc(ctx context.Context, namespace, name string) error
- type EventHandler
- type EventLoop
- type WorkQueue
- type WorkQueueHandler
Constants ¶
View Source
const ( WorkqueueAddEvent string = "add" WorkqueueUpdateEvent string = "update" WorkqueueDeleteEvent string = "delete" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DefaultHandler ¶
type DefaultHandler struct { Synced cache.InformerSynced Informer cache.SharedInformer Name string }
func (*DefaultHandler) AddFunc ¶
func (handler *DefaultHandler) AddFunc(ctx context.Context, namespace, name string) error
func (*DefaultHandler) DeleteFunc ¶
func (handler *DefaultHandler) DeleteFunc(ctx context.Context, namespace, name string) error
func (*DefaultHandler) GetInformer ¶
func (handler *DefaultHandler) GetInformer() cache.SharedInformer
func (*DefaultHandler) GetName ¶
func (handler *DefaultHandler) GetName() string
func (*DefaultHandler) GetSynced ¶
func (handler *DefaultHandler) GetSynced() cache.InformerSynced
func (*DefaultHandler) UpdateFunc ¶
func (handler *DefaultHandler) UpdateFunc(ctx context.Context, namespace, name string) error
type EventHandler ¶
type EventHandler interface { GetName() string GetSynced() cache.InformerSynced GetInformer() cache.SharedInformer AddFunc(ctx context.Context, namespace, name string) error UpdateFunc(ctx context.Context, namespace, name string) error DeleteFunc(ctx context.Context, namespace, name string) error }
EventHandler represents Event Handling for a Resource
type EventLoop ¶
type EventLoop interface { Run(ctx context.Context, threadiness int) error Register(handler EventHandler) }
EventLoop represents a central EventHandler registry which runs in a loop
func NewEventLoop ¶
NewEventLoop instantiates a workqueue backed EventLoop
type WorkQueue ¶
type WorkQueue interface { Run(ctx context.Context, threadiness int) error AddSynced(cache.InformerSynced) EnqueueAdd(kind string, obj interface{}) EnqueueUpdate(kind string, obj interface{}) EnqueueDelete(kind string, obj interface{}) RegisterAddHandler(kind string, handler WorkQueueHandler) RegisterUpdateHandler(kind string, handler WorkQueueHandler) RegisterDeleteHandler(kind string, handler WorkQueueHandler) Length() int }
WorkQueue manages the rate limiting interface
func NewWorkQueue ¶
NewWorkQueue creates a WorkQueue with a name
Click to show internal directories.
Click to hide internal directories.