annotation

package
v0.15.0 Latest Latest
Warning

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

Go to latest
Published: Aug 28, 2024 License: Apache-2.0 Imports: 13 Imported by: 0

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

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.

Types

type Options

type Options struct {
	Log logr.Logger
	// contains filtered or unexported fields
}

Options configures a filter.

Jump to

Keyboard shortcuts

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