predicate

package
v2.23.2 Latest Latest
Warning

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

Go to latest
Published: Aug 22, 2023 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ByAnnotation added in v2.21.0

func ByAnnotation(key, value string, checkValue bool) predicate.Funcs

ByAnnotation returns a predicate func that only includes objects with the given annotation.

func ByLabel

func ByLabel(key, value string) predicate.Funcs

ByLabel returns a predicate func that only includes objects with the given label.

func ByLabelExists added in v2.21.0

func ByLabelExists(key string) predicate.Funcs

ByLabel returns a predicate func that only includes objects that have a specific label key (value is ignored).

func ByName

func ByName(names ...string) predicate.Funcs

ByName returns a predicate func that only includes objects in the given names.

func ByNamespace

func ByNamespace(namespace string) predicate.Funcs

ByNamespace returns a predicate func that only includes objects in the given namespace.

func Factory

func Factory(filter func(o ctrlruntimeclient.Object) bool) predicate.Funcs

Factory returns a predicate func that applies the given filter function on CREATE, UPDATE and DELETE events. For UPDATE events, the filter is applied to both the old and new object and OR's the result.

func MultiFactory added in v2.20.0

func MultiFactory(createFilter func(o ctrlruntimeclient.Object) bool, updateFilter func(o ctrlruntimeclient.Object) bool, deleteFilter func(o ctrlruntimeclient.Object) bool) predicate.Funcs

MultiFactory returns a predicate func that applies the given filter functions to the respective events for CREATE, UPDATE and DELETE. For UPDATE events, the filter is applied to both the old and new object and OR's the result.

func TrueFilter added in v2.20.0

func TrueFilter(_ ctrlruntimeclient.Object) bool

TrueFilter is a helper filter implementation that always returns true, e.g. for use with MultiFactory.

Types

This section is empty.

Jump to

Keyboard shortcuts

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