handler

package
v0.3.26 Latest Latest
Warning

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

Go to latest
Published: Mar 21, 2025 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EnqueueRequestForOwner

func EnqueueRequestForOwner(scheme *runtime.Scheme, mapper meta.RESTMapper, ownerType client.Object, opts ...OwnerOption) handler.EventHandler

EnqueueRequestForOwner enqueues Requests for the Owners of an object. E.g. the object that created the object that was the source of the Event.

If a ReplicaSet creates Pods, users may reconcile the ReplicaSet in response to Pod Events using:

- a source.Kind Source with Type of Pod.

- a handler.enqueueRequestForOwner EventHandler with an OwnerType of ReplicaSet and OnlyControllerOwner set to true.

func TypedEnqueueRequestForOwner

func TypedEnqueueRequestForOwner[object client.Object](scheme *runtime.Scheme, mapper meta.RESTMapper, ownerType client.Object, opts ...OwnerOption) handler.TypedEventHandler[object, reconcile.Request]

TypedEnqueueRequestForOwner enqueues Requests for the Owners of an object. E.g. the object that created the object that was the source of the Event.

If a ReplicaSet creates Pods, users may reconcile the ReplicaSet in response to Pod Events using:

- a source.Kind Source with Type of Pod.

- a handler.typedEnqueueRequestForOwner EventHandler with an OwnerType of ReplicaSet and OnlyControllerOwner set to true.

TypedEnqueueRequestForOwner is experimental and subject to future change.

Types

type OwnerOption

type OwnerOption func(e enqueueRequestForOwnerInterface)

OwnerOption modifies an EnqueueRequestForOwner EventHandler.

func OnlyControllerOwner

func OnlyControllerOwner() OwnerOption

OnlyControllerOwner if provided will only look at the first OwnerReference with Controller: true.

Jump to

Keyboard shortcuts

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