Documentation ¶
Index ¶
- type CRDEventHandler
- func (h *CRDEventHandler) Create(e event.CreateEvent, _ workqueue.RateLimitingInterface)
- func (h *CRDEventHandler) Delete(e event.DeleteEvent, _ workqueue.RateLimitingInterface)
- func (h *CRDEventHandler) Generic(e event.GenericEvent, _ workqueue.RateLimitingInterface)
- func (h *CRDEventHandler) Update(e event.UpdateEvent, _ workqueue.RateLimitingInterface)
- type EnqueueEventToChannel
- type Throttler
- func (e *Throttler) Create(event.CreateEvent, workqueue.RateLimitingInterface)
- func (e *Throttler) Delete(event.DeleteEvent, workqueue.RateLimitingInterface)
- func (e *Throttler) Generic(evt event.GenericEvent, q workqueue.RateLimitingInterface)
- func (e *Throttler) Update(event.UpdateEvent, workqueue.RateLimitingInterface)
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(e event.CreateEvent, _ workqueue.RateLimitingInterface)
Create implements EventHandler
func (*CRDEventHandler) Delete ¶
func (h *CRDEventHandler) Delete(e event.DeleteEvent, _ workqueue.RateLimitingInterface)
Delete implements EventHandler
func (*CRDEventHandler) Generic ¶
func (h *CRDEventHandler) Generic(e event.GenericEvent, _ workqueue.RateLimitingInterface)
Generic implements EventHandler
func (*CRDEventHandler) Update ¶
func (h *CRDEventHandler) Update(e event.UpdateEvent, _ workqueue.RateLimitingInterface)
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{})
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(event.CreateEvent, workqueue.RateLimitingInterface)
Create implements EventHandler. All create events are ignored.
func (*Throttler) Delete ¶
func (e *Throttler) Delete(event.DeleteEvent, workqueue.RateLimitingInterface)
Delete implements EventHandler. All delete events are ignored.
func (*Throttler) Generic ¶
func (e *Throttler) Generic(evt event.GenericEvent, q workqueue.RateLimitingInterface)
Generic implements EventHandler. It pushes at most one event for the same object to the queue during duration.
func (*Throttler) Update ¶
func (e *Throttler) Update(event.UpdateEvent, workqueue.RateLimitingInterface)
Update implements EventHandler. All update events are ignored.