Documentation ¶
Overview ¶
Package annotation contains event handler and predicate builders for annotations. There are two types of builders:
- Falsy builders result in objects being queued if the annotation is not present OR contains a falsy value. - Truthy builders are the falsy complement: objects will be enqueued if the annotation is present AND contains a truthy value.
Truthiness/falsiness is determined by Go's strconv.ParseBool().
Index ¶
- func NewFalsyEventHandler[T client.Object](key string, opts Options) (handler.TypedEventHandler[T, reconcile.Request], error)
- func NewFalsyPredicate[T client.Object](key string, opts Options) (predicate.TypedPredicate[T], error)
- func NewTruthyEventHandler[T client.Object](key string, opts Options) (handler.TypedEventHandler[T, reconcile.Request], error)
- func NewTruthyPredicate[T client.Object](key string, opts Options) (predicate.TypedPredicate[T], error)
- type Options
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewFalsyEventHandler ¶
func NewFalsyEventHandler[T client.Object](key string, opts Options) (handler.TypedEventHandler[T, reconcile.Request], error)
NewFalsyEventHandler returns an event handler that enqueues objects that do not have annotation with key string key or whose value is falsy.
func NewFalsyPredicate ¶
func NewFalsyPredicate[T client.Object](key string, opts Options) (predicate.TypedPredicate[T], error)
NewFalsyPredicate returns a predicate that passes objects that do not have annotation with key string key or whose value is falsy.
func NewTruthyEventHandler ¶
func NewTruthyEventHandler[T client.Object](key string, opts Options) (handler.TypedEventHandler[T, reconcile.Request], error)
NewTruthyEventHandler returns an event handler that enqueues objects that do have annotation with key string key and whose value is truthy.
func NewTruthyPredicate ¶
func NewTruthyPredicate[T client.Object](key string, opts Options) (predicate.TypedPredicate[T], error)
NewTruthyPredicate returns a predicate that passes objects that do have annotation with key string key and whose value is truthy.