handler

package
v0.21.0-alpha.9 Latest Latest
Warning

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

Go to latest
Published: Aug 29, 2025 License: Apache-2.0 Imports: 9 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EnqueueRequestForObject

func EnqueueRequestForObject(clusterName string, cl cluster.Cluster) handler.TypedEventHandler[client.Object, mcreconcile.Request]

EnqueueRequestForObject wraps a controller-runtime handler.EnqueueRequestForOwner to be compatible with multi-cluster.

func TypedEnqueueRequestsFromMapFuncWithClusterPreservation

func TypedEnqueueRequestsFromMapFuncWithClusterPreservation[object client.Object, request mcreconcile.ClusterAware[request]](fn handler.TypedMapFunc[object, request]) handler.TypedEventHandler[object, request]

TypedEnqueueRequestsFromMapFuncWithClusterPreservation wraps handler.TypedEnqueueRequestsFromMapFunc to work with mcreconcile.Request while preserving the ClusterName field set in the requests. This avoids cluster injection and depends on the mapFunc to set the correct ClusterName in the request.

func TypedForCluster

func TypedForCluster[object client.Object](h handler.TypedEventHandler[object, reconcile.Request], clusterName string) handler.TypedEventHandler[object, mcreconcile.Request]

TypedForCluster wraps a handler.TypedEventHandler without multi-cluster support for one concrete cluster.

Types

type EventHandler

EventHandler is an event handler for a multi-cluster Request.

func ForCluster

func ForCluster(h handler.EventHandler, clusterName string) EventHandler

ForCluster wraps a handler.EventHandler without multi-cluster support for one concrete cluster.

type EventHandlerFunc

type EventHandlerFunc = func(string, cluster.Cluster) EventHandler

EventHandlerFunc produces a handler.EventHandler for a cluster.

func EnqueueRequestForOwner

func EnqueueRequestForOwner(ownerType client.Object, opts ...handler.OwnerOption) EventHandlerFunc

EnqueueRequestForOwner wraps handler.EnqueueRequestForOwner to be compatible with multi-cluster.

func EnqueueRequestsFromMapFunc

func EnqueueRequestsFromMapFunc(fn handler.MapFunc) EventHandlerFunc

EnqueueRequestsFromMapFunc wraps handler.EnqueueRequestsFromMapFunc to be compatible with multi-cluster.

func Lift

Lift wraps a handler.EventHandler without multi-cluster support to be compatible with multi-cluster by injecting the cluster name.

type TypedEventHandlerFunc

type TypedEventHandlerFunc[object client.Object, request mcreconcile.ClusterAware[request]] func(string, cluster.Cluster) handler.TypedEventHandler[object, request]

TypedEventHandlerFunc produces a handler.TypedEventHandler for a cluster.

func TypedEnqueueRequestForObject

func TypedEnqueueRequestForObject[object client.Object]() TypedEventHandlerFunc[object, mcreconcile.Request]

TypedEnqueueRequestForObject wraps a controller-runtime handler.TypedEnqueueRequestForObject to be compatible with multi-cluster.

func TypedEnqueueRequestForOwner

func TypedEnqueueRequestForOwner[object client.Object](ownerType client.Object, opts ...handler.OwnerOption) TypedEventHandlerFunc[object, mcreconcile.Request]

TypedEnqueueRequestForOwner wraps handler.TypedEnqueueRequestForOwner to be compatible with multi-cluster.

func TypedEnqueueRequestsFromMapFunc

func TypedEnqueueRequestsFromMapFunc[object client.Object, request mcreconcile.ClusterAware[request]](fn handler.TypedMapFunc[object, request]) TypedEventHandlerFunc[object, request]

TypedEnqueueRequestsFromMapFunc wraps handler.TypedEnqueueRequestsFromMapFunc to be compatible with multi-cluster.

func TypedInjectCluster

func TypedInjectCluster[object client.Object, request mcreconcile.ClusterAware[request]](h handler.TypedEventHandler[object, request]) TypedEventHandlerFunc[object, request]

TypedInjectCluster wraps a handler.TypedEventHandler with a cluster-aware request type and injects the cluster name. In contrast to TypeWithCluster, this function does not lift the type to cluster-awareness.

func TypedLift

TypedLift wraps a handler.TypedEventHandler without multi-cluster support to be compatible with multi-cluster by injecting the cluster name.

func WithLowPriorityWhenUnchanged

func WithLowPriorityWhenUnchanged[object client.Object, request mcreconcile.ClusterAware[request]](u TypedEventHandlerFunc[object, request]) TypedEventHandlerFunc[object, request]

WithLowPriorityWhenUnchanged wraps a controller-runtime handler.WithLowPriorityWhenUnchanged to be compatible with multi-cluster.

Jump to

Keyboard shortcuts

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