handler

package
v1.3.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 25, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const NoRateLimiter = ""

Variables

This section is empty.

Functions

This section is empty.

Types

type EventHandler

type EventHandler struct {
	// contains filtered or unexported fields
}

EventHandler handles Kubernetes events by queueing reconcile requests for objects and allows upjet components to queue reconcile requests.

func NewEventHandler

func NewEventHandler(opts ...Option) *EventHandler

NewEventHandler initializes a new EventHandler instance.

func (*EventHandler) Create

func (e *EventHandler) Create(ctx context.Context, ev event.CreateEvent, limitingInterface workqueue.RateLimitingInterface)

func (*EventHandler) Delete

func (e *EventHandler) Delete(ctx context.Context, ev event.DeleteEvent, limitingInterface workqueue.RateLimitingInterface)

func (*EventHandler) Forget

func (e *EventHandler) Forget(rateLimiterName, name string)

Forget indicates that the reconcile retries is finished for the specified name.

func (*EventHandler) Generic

func (e *EventHandler) Generic(ctx context.Context, ev event.GenericEvent, limitingInterface workqueue.RateLimitingInterface)

func (*EventHandler) RequestReconcile

func (e *EventHandler) RequestReconcile(rateLimiterName, name string, failureLimit *int) bool

RequestReconcile requeues a reconciliation request for the specified name. Returns true if the reconcile request was successfully queued.

func (*EventHandler) Update

func (e *EventHandler) Update(ctx context.Context, ev event.UpdateEvent, limitingInterface workqueue.RateLimitingInterface)

type Option

type Option func(eventHandler *EventHandler)

Option configures an option for the EventHandler.

func WithLogger

func WithLogger(logger logging.Logger) Option

WithLogger configures the logger for the EventHandler.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL