Documentation
¶
Index ¶
- type CRDEventHandler
- func (h *CRDEventHandler) Create(_ context.Context, e event.CreateEvent, ...)
- func (h *CRDEventHandler) Delete(_ context.Context, e event.DeleteEvent, ...)
- func (h *CRDEventHandler) Generic(_ context.Context, e event.GenericEvent, ...)
- func (h *CRDEventHandler) Update(_ context.Context, e event.UpdateEvent, ...)
- type EnqueueEventToChannel
- type Throttler
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CRDEventHandler ¶
type CRDEventHandler struct {
Mapping resourceMap
Channel chan event.GenericEvent
Log logr.Logger
}
CRDEventHandler pushes an event to ResourceGroup event channel when the CRD or its CRs are contained in some ResourceGroup CRs.
func (*CRDEventHandler) Create ¶
func (h *CRDEventHandler) Create(_ context.Context, e event.CreateEvent, _ workqueue.TypedRateLimitingInterface[reconcile.Request])
Create implements EventHandler
func (*CRDEventHandler) Delete ¶
func (h *CRDEventHandler) Delete(_ context.Context, e event.DeleteEvent, _ workqueue.TypedRateLimitingInterface[reconcile.Request])
Delete implements EventHandler
func (*CRDEventHandler) Generic ¶
func (h *CRDEventHandler) Generic(_ context.Context, e event.GenericEvent, _ workqueue.TypedRateLimitingInterface[reconcile.Request])
Generic implements EventHandler
func (*CRDEventHandler) Update ¶
func (h *CRDEventHandler) Update(_ context.Context, e event.UpdateEvent, _ workqueue.TypedRateLimitingInterface[reconcile.Request])
Update implements EventHandler
type EnqueueEventToChannel ¶
type EnqueueEventToChannel struct {
Mapping resourceMap
Channel chan event.GenericEvent
Log logr.Logger
GVK schema.GroupVersionKind
}
EnqueueEventToChannel pushes an event to ResourceGroup event channel instead of enqueue a Reqeust for ResourceGroup.
func (*EnqueueEventToChannel) OnAdd ¶
func (e *EnqueueEventToChannel) OnAdd(obj interface{}, _ bool)
OnAdd implements EventHandler
func (*EnqueueEventToChannel) OnDelete ¶
func (e *EnqueueEventToChannel) OnDelete(obj interface{})
OnDelete implements EventHandler
func (*EnqueueEventToChannel) OnUpdate ¶
func (e *EnqueueEventToChannel) OnUpdate(_, newObj interface{})
OnUpdate implements EventHandler
type Throttler ¶
type Throttler struct {
// contains filtered or unexported fields
}
Throttler only pushes a request to ResourceGroup work queue when there is no same event in the queue. It works with only GenericEvent and no-op for other events.
func NewThrottler ¶
NewThrottler returns an instance of Throttler
func (*Throttler) Create ¶
func (e *Throttler) Create(context.Context, event.CreateEvent, workqueue.TypedRateLimitingInterface[reconcile.Request])
Create implements EventHandler. All create events are ignored.
func (*Throttler) Delete ¶
func (e *Throttler) Delete(context.Context, event.DeleteEvent, workqueue.TypedRateLimitingInterface[reconcile.Request])
Delete implements EventHandler. All delete events are ignored.