Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func EnqueueRequestsFromMapper ¶ added in v1.16.0
func EnqueueRequestsFromMapper(m Mapper, updateBehavior UpdateBehavior) handler.EventHandler
EnqueueRequestsFromMapper is similar to controller-runtime's handler.EnqueueRequestsFromMapFunc. Instead of taking only a MapFunc it also allows passing a Mapper interface. Also, it allows customizing the behaviour on UpdateEvents. For UpdateEvents, the given UpdateBehaviour decides if only the old, only the new or both objects should be mapped and enqueued.
Types ¶
type MapFunc ¶ added in v1.16.0
MapFunc is the signature required for enqueueing requests from a generic function. This type is usually used with EnqueueRequestsFromMapFunc when registering an event handler.
type Mapper ¶
Mapper maps an object to a collection of keys to be enqueued
func ClusterToObjectMapper ¶
func ClusterToObjectMapper(newObjListFunc func() client.ObjectList, predicates []predicate.Predicate) Mapper
ClusterToObjectMapper returns a mapper that returns requests for objects whose referenced clusters have been modified.
type UpdateBehavior ¶
type UpdateBehavior uint8
UpdateBehavior determines how an update should be handled.
const ( // UpdateWithOldAndNew considers both, the old as well as the new object, in case of an update. UpdateWithOldAndNew UpdateBehavior = iota // UpdateWithOld considers only the old object in case of an update. UpdateWithOld // UpdateWithNew considers only the new object in case of an update. UpdateWithNew )