Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Informer ¶
type Informer struct { // Informer is the controller-runtime Informer Informer cache.SharedIndexInformer }
Informer is used to provide a source of events originating inside the cluster from Watches (e.g. Pod Create).
func (*Informer) Start ¶
func (is *Informer) Start(ctx context.Context, handler handler.EventHandler, queue workqueue.RateLimitingInterface, prct ...predicate.Predicate) error
Start is internal and should be called only by the Controller to register an EventHandler with the Informer to enqueue reconcile.Requests.
type Kind ¶
type Kind struct { // Type is the type of object to watch. e.g. &v1.Pod{} Type client.Object // contains filtered or unexported fields }
Kind is used to provide a source of events originating inside the cluster from Watches (e.g. Pod Create).
func (*Kind) Start ¶
func (ks *Kind) Start(ctx context.Context, handler handler.EventHandler, queue workqueue.RateLimitingInterface, prct ...predicate.Predicate) error
Start is internal and should be called only by the Controller to register an EventHandler with the Informer to enqueue reconcile.Requests.
type Source ¶
type Source interface { // Start is internal and should be called only by the Controller to register an EventHandler with the Informer // to enqueue reconcile.Requests. Start(context.Context, handler.EventHandler, workqueue.RateLimitingInterface, ...predicate.Predicate) error }
Source is a source of events (eh.g. Create, Update, Delete operations on Kubernetes Objects, Webhook callbacks, etc) which should be processed by event.EventHandlers to enqueue reconcile.Requests.
* Use Kind for events originating in the cluster (e.g. Pod Create, Pod Update, Deployment Update).
* Use Channel for events originating outside the cluster (eh.g. GitHub Webhook callback, Polling external urls).
Users may build their own Source implementations. If their implementations implement any of the inject package interfaces, the dependencies will be injected by the Controller when Watch is called.
type SyncingSource ¶
SyncingSource is a source that needs syncing prior to being usable. The controller will call its WaitForSync prior to starting workers.
func NewKindWithCache ¶
func NewKindWithCache(object client.Object, cache informers.InformerCache) SyncingSource