Documentation ¶
Index ¶
- Variables
- func AddTypePredicate(predicates []predicate.Predicate, extensionTypes ...string) []predicate.Predicate
- func ClusterShootKubernetesVersionAtLeast(decoder runtime.Decoder, kubernetesVersion string) predicate.Predicate
- func ClusterShootProviderType(decoder runtime.Decoder, providerType string) predicate.Predicate
- func EvalGeneric(obj client.Object, predicates ...predicate.Predicate) bool
- func FromMapper(mapper Mapper, triggers ...MapperTrigger) predicate.Predicate
- func GardenCoreProviderType(providerType string) predicate.Predicate
- func HasName(name string) predicate.Predicate
- func HasOperationAnnotation() predicate.Predicate
- func HasPurpose(purpose extensionsv1alpha1.Purpose) predicate.Predicate
- func HasType(typeName string) predicate.Predicate
- func IsDeleting() predicate.Predicate
- func LastOperationNotSuccessful() predicate.Predicate
- func ShootNotFailed() predicate.Predicate
- type Mapper
- type MapperFunc
- type MapperTrigger
Constants ¶
This section is empty.
Variables ¶
var Log logr.Logger = log.Log
Log is the logger for predicates.
Functions ¶
func AddTypePredicate ¶
func AddTypePredicate(predicates []predicate.Predicate, extensionTypes ...string) []predicate.Predicate
AddTypePredicate returns a new slice which contains a type predicate and the given `predicates`. if more than one extensionTypes is given all given types are or combined
func ClusterShootKubernetesVersionAtLeast ¶
func ClusterShootKubernetesVersionAtLeast(decoder runtime.Decoder, kubernetesVersion string) predicate.Predicate
ClusterShootKubernetesVersionAtLeast is a predicate for the kubernetes version of the shoot in the cluster resource.
func ClusterShootProviderType ¶
ClusterShootProviderType is a predicate for the provider type of the shoot in the cluster resource.
func EvalGeneric ¶
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 GardenCoreProviderType ¶ added in v1.4.0
GardenCoreProviderType is a predicate for the provider type of a `gardencore.Object` implementation.
func HasOperationAnnotation ¶
HasOperationAnnotation is a predicate for the operation annotation.
func HasPurpose ¶
func HasPurpose(purpose extensionsv1alpha1.Purpose) predicate.Predicate
HasPurpose filters the incoming Controlplanes for the given spec.purpose
func HasType ¶
HasType filters the incoming OperatingSystemConfigs for ones that have the same type as the given type.
func IsDeleting ¶
IsDeleting is a predicate for objects having a deletion timestamp.
func LastOperationNotSuccessful ¶
LastOperationNotSuccessful is a predicate for unsuccessful last operations **only** for creation events.
func ShootNotFailed ¶
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 )