predicate

package
v0.0.0-...-d68cec5 Latest Latest
Warning

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

Go to latest
Published: Jul 30, 2019 License: Apache-2.0, MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

Log is the logger for predicates.

Functions

func ClusterCloudProfileGenerationChanged

func ClusterCloudProfileGenerationChanged() predicate.Predicate

ClusterCloudProfileGenerationChanged is a predicate for generation updates of cloud profiles.

func EvalGeneric

func EvalGeneric(obj runtime.Object, predicates ...predicate.Predicate) bool

EvalGeneric returns true if all predicates match for the given object.

func FromMapper

func FromMapper(mapper Mapper, triggers ...MapperTrigger) predicate.Predicate

FromMapper creates a new predicate from the given Mapper that reacts on the given MapperTriggers.

func GenerationChanged

func GenerationChanged() predicate.Predicate

GenerationChanged is a predicate for generation changes.

func HasName

func HasName(name string) predicate.Predicate

HasName returns a predicate that matches the given name of a resource.

func HasOperationAnnotation

func HasOperationAnnotation() predicate.Predicate

HasOperationAnnotation is a predicate for the operation annotation.

func HasType

func HasType(typeName string) predicate.Predicate

HasType filters the incoming OperatingSystemConfigs for ones that have the same type as the given type.

func IsDeleting

func IsDeleting() predicate.Predicate

IsDeleting is a predicate for objects having a deletion timestamp.

func LastOperationNotSuccessful

func LastOperationNotSuccessful() predicate.Predicate

LastOperationNotSuccessful is a predicate for unsuccessful last operations for creation events.

func Or

func Or(predicates ...predicate.Predicate) predicate.Predicate

Or builds a logical OR gate of passed predicates.

func ShootNotFailed

func ShootNotFailed() predicate.Predicate

ShootNotFailed is a predicate for failed shoots.

Types

type Mapper

type Mapper interface {
	Map(event event.GenericEvent) bool
}

Mapper maps any event (in form of a GenericEvent) to a boolean whether the event shall be propagated or not.

type MapperFunc

type MapperFunc func(event.GenericEvent) bool

MapperFunc is a function that implements Mapper.

func (MapperFunc) Map

func (f MapperFunc) Map(event event.GenericEvent) bool

Map implements Mapper.

type MapperTrigger

type MapperTrigger uint8

MapperTrigger is a trigger a Mapper can react upon.

const (
	// CreateTrigger is a MapperTrigger for create events.
	CreateTrigger MapperTrigger = iota
	// UpdateOldTrigger is a MapperTrigger for update events with the old meta and object.
	UpdateOldTrigger
	// UpdateNewTrigger is a MapperTrigger for update events with the new meta and object.
	UpdateNewTrigger
	// DeleteTrigger is a MapperTrigger for delete events.
	DeleteTrigger
	// GenericTrigger is a MapperTrigger for generic events.
	GenericTrigger
)

Jump to

Keyboard shortcuts

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