Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type EventHandler ¶
type EventHandler[object client.Object, request comparable] struct { // contains filtered or unexported fields }
EventHandler adapts a handler.EventHandler interface to a cache.ResourceEventHandler interface.
func NewEventHandler ¶
func NewEventHandler[object client.Object, request comparable]( ctx context.Context, queue workqueue.TypedRateLimitingInterface[request], handler handler.TypedEventHandler[object, request], predicates []predicate.TypedPredicate[object]) *EventHandler[object, request]
NewEventHandler creates a new EventHandler.
func (*EventHandler[object, request]) HandlerFuncs ¶
func (e *EventHandler[object, request]) HandlerFuncs() cgocache.ResourceEventHandlerFuncs
HandlerFuncs converts EventHandler to a ResourceEventHandlerFuncs TODO: switch to ResourceEventHandlerDetailedFuncs with client-go 1.27
func (*EventHandler[object, request]) OnAdd ¶
func (e *EventHandler[object, request]) OnAdd(obj interface{})
OnAdd creates CreateEvent and calls Create on EventHandler.
func (*EventHandler[object, request]) OnDelete ¶
func (e *EventHandler[object, request]) OnDelete(obj interface{})
OnDelete creates DeleteEvent and calls Delete on EventHandler.
func (*EventHandler[object, request]) OnUpdate ¶
func (e *EventHandler[object, request]) OnUpdate(oldObj, newObj interface{})
OnUpdate creates UpdateEvent and calls Update on EventHandler.
Click to show internal directories.
Click to hide internal directories.