Documentation ¶
Index ¶
- func EvalGeneric(obj client.Object, predicates ...predicate.Predicate) bool
- func FromMapper(mapper Mapper, triggers ...MapperTrigger) predicate.Predicate
- func HasFinalizer(finalizer string) predicate.Predicate
- func HasName(name string) predicate.Predicate
- func HasOperationAnnotation() predicate.Predicate
- func IsDeleting() predicate.Predicate
- func Not(p predicate.Predicate) predicate.Predicate
- func ShootIsUnassigned() predicate.Predicate
- type Mapper
- type MapperFunc
- type MapperTrigger
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
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 HasFinalizer ¶
HasFinalizer returns a predicate that detects if the object has the given finalizer This is used to not requeue all secrets in the cluster (which might be quite a lot), but only requeue secrets from create/update events with the controller's finalizer. This is to ensure, that we properly remove the finalizer in case we missed an important update event for a ManagedResource.
func HasOperationAnnotation ¶
HasOperationAnnotation is a predicate for the operation annotation.
func IsDeleting ¶
IsDeleting is a predicate for objects having a deletion timestamp.
func ShootIsUnassigned ¶
ShootIsUnassigned is a predicate that returns true if a shoot is not assigned to a seed.
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 )