Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type EventHandler ¶
type EventHandler struct {
// contains filtered or unexported fields
}
EventHandler adapts a handler.EventHandler interface to a cache.ResourceEventHandler interface.
func NewEventHandler ¶
func NewEventHandler(ctx context.Context, queue workqueue.RateLimitingInterface, handler handler.EventHandler, predicates []predicate.Predicate) *EventHandler
NewEventHandler creates a new EventHandler.
func (*EventHandler) HandlerFuncs ¶
func (e *EventHandler) HandlerFuncs() cache.ResourceEventHandlerFuncs
HandlerFuncs converts EventHandler to a ResourceEventHandlerFuncs TODO: switch to ResourceEventHandlerDetailedFuncs with client-go 1.27
func (*EventHandler) OnAdd ¶
func (e *EventHandler) OnAdd(obj interface{})
OnAdd creates CreateEvent and calls Create on EventHandler.
func (*EventHandler) OnDelete ¶
func (e *EventHandler) OnDelete(obj interface{})
OnDelete creates DeleteEvent and calls Delete on EventHandler.
func (*EventHandler) OnUpdate ¶
func (e *EventHandler) OnUpdate(oldObj, newObj interface{})
OnUpdate creates UpdateEvent and calls Update on EventHandler.
type Kind ¶
type Kind struct { // Type is the type of object to watch. e.g. &v1.Pod{} Type client.Object // Cache used to watch APIs Cache cache.Cache // contains filtered or unexported fields }
Kind is used to provide a source of events originating inside the cluster from Watches (e.g. Pod Create).
func (*Kind) Start ¶
func (ks *Kind) Start(ctx context.Context, handler handler.EventHandler, queue workqueue.RateLimitingInterface, prct ...predicate.Predicate) error
Start is internal and should be called only by the Controller to register an EventHandler with the Informer to enqueue reconcile.Requests.