Documentation
¶
Index ¶
- func ClusterToObjectMapper(newObjListFunc func() runtime.Object, predicates []predicate.Predicate) handler.Mapper
- type EnqueueRequestsFromMapFunc
- func (e *EnqueueRequestsFromMapFunc) Create(evt event.CreateEvent, q workqueue.RateLimitingInterface)
- func (e *EnqueueRequestsFromMapFunc) Delete(evt event.DeleteEvent, q workqueue.RateLimitingInterface)
- func (e *EnqueueRequestsFromMapFunc) Generic(evt event.GenericEvent, q workqueue.RateLimitingInterface)
- func (e *EnqueueRequestsFromMapFunc) InjectFunc(f inject.Func) error
- func (e *EnqueueRequestsFromMapFunc) Update(evt event.UpdateEvent, q workqueue.RateLimitingInterface)
- type MapCreateObject
- type MapDeleteObject
- type MapGenericObject
- type MapUpdateObject
- type Mapper
- type UpdateBehavior
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type EnqueueRequestsFromMapFunc ¶
type EnqueueRequestsFromMapFunc struct {
// Mapper transforms the argument into a slice of keys to be reconciled
ToRequests Mapper
}
EnqueueRequestsFromMapFunc enqueues Requests by running a transformation function that outputs a collection of reconcile.Requests on each Event. The reconcile.Requests may be for an arbitrary set of objects defined by some user specified transformation of the source Event. (e.g. trigger Reconciler for a set of objects in response to a cluster resize event caused by adding or deleting a Node)
EnqueueRequestsFromMapFunc is frequently used to fan-out updates from one object to one or more other objects of a differing type.
func (*EnqueueRequestsFromMapFunc) Create ¶
func (e *EnqueueRequestsFromMapFunc) Create(evt event.CreateEvent, q workqueue.RateLimitingInterface)
Create implements EventHandler
func (*EnqueueRequestsFromMapFunc) Delete ¶
func (e *EnqueueRequestsFromMapFunc) Delete(evt event.DeleteEvent, q workqueue.RateLimitingInterface)
Delete implements EventHandler
func (*EnqueueRequestsFromMapFunc) Generic ¶
func (e *EnqueueRequestsFromMapFunc) Generic(evt event.GenericEvent, q workqueue.RateLimitingInterface)
Generic implements EventHandler
func (*EnqueueRequestsFromMapFunc) InjectFunc ¶
func (e *EnqueueRequestsFromMapFunc) InjectFunc(f inject.Func) error
InjectFunc implements Injector.
func (*EnqueueRequestsFromMapFunc) Update ¶
func (e *EnqueueRequestsFromMapFunc) Update(evt event.UpdateEvent, q workqueue.RateLimitingInterface)
Update implements EventHandler
type MapCreateObject ¶
type MapCreateObject struct {
// Meta is the meta data for an object from an event.
Meta metav1.Object
// Object is the object from an event.
Object runtime.Object
}
MapCreateObject contains information from a create event to be transformed into a Request.
type MapDeleteObject ¶
type MapDeleteObject struct {
// Meta is the meta data for an object from an event.
Meta metav1.Object
// Object is the object from an event.
Object runtime.Object
}
MapDeleteObject contains information from a delete event to be transformed into a Request.
type MapGenericObject ¶
type MapGenericObject struct {
// Meta is the meta data for an object from an event.
Meta metav1.Object
// Object is the object from an event.
Object runtime.Object
}
MapGenericObject contains information from a generic event to be transformed into a Request.
type MapUpdateObject ¶
type MapUpdateObject struct {
// MetaOld is the old meta data for an object from an update event.
MetaOld metav1.Object
// ObjectOld is the old object from an update event.
ObjectOld runtime.Object
// MetaNew is the new meta data for an object from an update event.
MetaNew metav1.Object
// ObjectNew is the new object from an update event.
ObjectNew runtime.Object
}
MapUpdateObject contains information from an update event to be transformed into a Request.
type Mapper ¶
type Mapper interface {
// Map maps an object for a create event.
MapCreate(MapCreateObject) []reconcile.Request
// Map maps an object for a delete event.
MapDelete(MapDeleteObject) []reconcile.Request
// Map maps an object for a generic event.
MapGeneric(MapGenericObject) []reconcile.Request
// Map maps an object for an update event.
MapUpdate(MapUpdateObject) []reconcile.Request
}
Mapper maps an object to a collection of keys to be enqueued
func SimpleMapper ¶
func SimpleMapper(mapper handler.Mapper, updateBehavior UpdateBehavior) Mapper
SimpleMapper wraps a mapper and calls its update function according to the given `updateBehavior`.
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 )