predicates

package
v0.0.0-...-7ec6ec7 Latest Latest
Warning

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

Go to latest
Published: Oct 4, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AnnotationChanged

func AnnotationChanged(name string) predicate.Predicate

func HasAnnotation

func HasAnnotation(name string) predicate.Predicate

func HasLabel

func HasLabel(name string) predicate.Predicate

func LabelChanged

func LabelChanged(name string) predicate.Predicate

func StatusChanged

func StatusChanged() predicate.Predicate

Types

type Compare

type Compare struct {
	predicate.Funcs
	F func(oldObj client.Object, newObj client.Object) bool
}

func (Compare) Create

func (p Compare) Create(_ event.CreateEvent) bool

func (Compare) Delete

func (p Compare) Delete(_ event.DeleteEvent) bool

func (Compare) Generic

func (p Compare) Generic(_ event.GenericEvent) bool

func (Compare) Update

func (p Compare) Update(e event.UpdateEvent) bool

type DependentPredicate

type DependentPredicate struct {
	WatchDelete bool
	WatchUpdate bool
	WatchStatus bool

	predicate.Funcs
}

func (DependentPredicate) Create

func (DependentPredicate) Delete

func (DependentPredicate) Generic

func (DependentPredicate) Update

type DependentPredicateOption

type DependentPredicateOption func(*DependentPredicate) *DependentPredicate

func WithWatchDeleted

func WithWatchDeleted(val bool) DependentPredicateOption

func WithWatchStatus

func WithWatchStatus(val bool) DependentPredicateOption

func WithWatchUpdate

func WithWatchUpdate(val bool) DependentPredicateOption

type Test

type Test struct {
	predicate.Funcs
	F func(obj client.Object) bool
}

func (Test) Create

func (p Test) Create(e event.CreateEvent) bool

func (Test) Delete

func (p Test) Delete(e event.DeleteEvent) bool

func (Test) Generic

func (p Test) Generic(e event.GenericEvent) bool

func (Test) Update

func (p Test) Update(e event.UpdateEvent) bool

Jump to

Keyboard shortcuts

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