predicate

package
v0.29.8 Latest Latest
Warning

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

Go to latest
Published: May 25, 2023 License: Apache-2.0 Imports: 7 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type EventLogger

type EventLogger struct {
	Logger logr.Logger
}

EventLogger logs the event

func (EventLogger) Create

func (h EventLogger) Create(e event.CreateEvent) bool

func (EventLogger) Delete

func (h EventLogger) Delete(e event.DeleteEvent) bool

func (EventLogger) Generic

func (h EventLogger) Generic(e event.GenericEvent) bool

func (EventLogger) Update

func (h EventLogger) Update(e event.UpdateEvent) bool

type LabelMatcher

type LabelMatcher struct {
	Selector labels.Selector
}

LabelMatcher filters events by the event's object labels

func (LabelMatcher) Create

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

func (LabelMatcher) Delete

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

func (LabelMatcher) Generic

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

func (LabelMatcher) Update

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

type SimpleEventFilter

type SimpleEventFilter interface {
	// return True to filter out the event
	FilterEvent(obj client.Object) bool
}

SimpleEventFilter filters events for a single object type

type SimpleEventFilterFunc added in v0.7.17

type SimpleEventFilterFunc func(obj client.Object) bool

func (SimpleEventFilterFunc) FilterEvent added in v0.7.17

func (f SimpleEventFilterFunc) FilterEvent(obj client.Object) bool

type SimplePredicate

type SimplePredicate struct {
	Filter SimpleEventFilter
}

SimplePredicate filters events based on a ShouldSync function

func (SimplePredicate) Create

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

func (SimplePredicate) Delete

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

func (SimplePredicate) Generic

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

func (SimplePredicate) Update

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

Jump to

Keyboard shortcuts

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