handler

package
v0.34.12 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func QueueRegisteringHandler

func QueueRegisteringHandler(cluster string, queues *apqueue.MultiClusterQueues) handler.EventHandler

QueueRegisteringHandler registers the queue on the first create event it receives to a multi cluster queue registry.

func RequestForObject

func RequestForObject(meta v1.Object) reconcile.Request

Types

type BroadcastRequests

type BroadcastRequests struct {
	// the set of all requests to enqueueRequestsAllClusters by the target cluster (where the primary resource lives)
	RequestsToEnqueue *request.MultiClusterRequests

	// use this to queue requests to controllers registered to another manager
	WorkQueues *skqueue.MultiClusterQueues
}

BroadcastRequests enqueues statically defined requests across clusters whenever an event is received. Use this to propagate a list of requests to queues shared across cluster managers. This is used by SKv2 to enqueueRequestsAllClusters requests for a primary level resource whenever a watched input resource changes, regardless of the cluster the primary resource lives in.

func (*BroadcastRequests) Create

func (e *BroadcastRequests) Create(ctx context.Context, evt event.CreateEvent, q workqueue.RateLimitingInterface)

Create implements EventHandler

func (*BroadcastRequests) Delete

func (e *BroadcastRequests) Delete(ctx context.Context, evt event.DeleteEvent, q workqueue.RateLimitingInterface)

Delete implements EventHandler

func (*BroadcastRequests) Generic

func (e *BroadcastRequests) Generic(ctx context.Context, evt event.GenericEvent, q workqueue.RateLimitingInterface)

Generic implements EventHandler

func (*BroadcastRequests) Update

func (e *BroadcastRequests) Update(ctx context.Context, evt event.UpdateEvent, q workqueue.RateLimitingInterface)

Update implements EventHandler

type MultiClusterRequestTracker

type MultiClusterRequestTracker struct {
	Cluster  string
	Requests *request.MultiClusterRequests
}

MultiClusterRequestTracker tracks reconcile requests across clusters It is used to map requests for input resources (in any cluster) back to the original

func (*MultiClusterRequestTracker) Create

func (h *MultiClusterRequestTracker) Create(ctx context.Context, evt event.CreateEvent, queue workqueue.RateLimitingInterface)

func (*MultiClusterRequestTracker) Delete

func (h *MultiClusterRequestTracker) Delete(ctx context.Context, evt event.DeleteEvent, queue workqueue.RateLimitingInterface)

func (*MultiClusterRequestTracker) Generic

func (h *MultiClusterRequestTracker) Generic(context.Context, event.GenericEvent, workqueue.RateLimitingInterface)

func (*MultiClusterRequestTracker) Update

func (h *MultiClusterRequestTracker) Update(context.Context, event.UpdateEvent, workqueue.RateLimitingInterface)

type MultiHandler

type MultiHandler struct {
	Handlers []handler.EventHandler
}

MultiHandler wraps and calls multiple event handlers as a single handler.Handler

func (*MultiHandler) Create

func (h *MultiHandler) Create(ctx context.Context, evt event.CreateEvent, queue workqueue.RateLimitingInterface)

func (*MultiHandler) Delete

func (h *MultiHandler) Delete(ctx context.Context, evt event.DeleteEvent, queue workqueue.RateLimitingInterface)

func (*MultiHandler) Generic

func (h *MultiHandler) Generic(ctx context.Context, evt event.GenericEvent, queue workqueue.RateLimitingInterface)

func (*MultiHandler) Update

func (h *MultiHandler) Update(ctx context.Context, evt event.UpdateEvent, queue workqueue.RateLimitingInterface)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
JackTT - Gopher 🇻🇳