Documentation ¶
Index ¶
- type DynamicDiscoverySharedInformerFactory
- func (d *DynamicDiscoverySharedInformerFactory) AddEventHandler(handler GVREventHandler)
- func (d *DynamicDiscoverySharedInformerFactory) InformerForResource(gvr schema.GroupVersionResource) (informers.GenericInformer, error)
- func (d *DynamicDiscoverySharedInformerFactory) Listers() (listers map[schema.GroupVersionResource]cache.GenericLister, ...)
- func (d *DynamicDiscoverySharedInformerFactory) Start(_ <-chan struct{})
- func (d *DynamicDiscoverySharedInformerFactory) StartWorker(ctx context.Context)
- type GVREventHandler
- type GVREventHandlerFuncs
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DynamicDiscoverySharedInformerFactory ¶
type DynamicDiscoverySharedInformerFactory struct {
// contains filtered or unexported fields
}
DynamicDiscoverySharedInformerFactory is a SharedInformerFactory that dynamically discovers new types and begins informing on them.
func NewDynamicDiscoverySharedInformerFactory ¶
func NewDynamicDiscoverySharedInformerFactory( cfg *rest.Config, filterFunc func(obj interface{}) bool, crdInformer apiextensionsinformers.CustomResourceDefinitionInformer, indexers cache.Indexers, ) (*DynamicDiscoverySharedInformerFactory, error)
NewDynamicDiscoverySharedInformerFactory returns a factory for shared informers that discovers new types and informs on updates to resources of those types.
func (*DynamicDiscoverySharedInformerFactory) AddEventHandler ¶ added in v0.6.0
func (d *DynamicDiscoverySharedInformerFactory) AddEventHandler(handler GVREventHandler)
func (*DynamicDiscoverySharedInformerFactory) InformerForResource ¶ added in v0.6.0
func (d *DynamicDiscoverySharedInformerFactory) InformerForResource(gvr schema.GroupVersionResource) (informers.GenericInformer, error)
InformerForResource returns the GenericInformer for gvr, creating it if needed. The GenericInformer must be started by calling Start on the DynamicDiscoverySharedInformerFactory before the GenericInformer can be used.
func (*DynamicDiscoverySharedInformerFactory) Listers ¶
func (d *DynamicDiscoverySharedInformerFactory) Listers() (listers map[schema.GroupVersionResource]cache.GenericLister, notSynced []schema.GroupVersionResource)
Listers returns a map of per-resource-type listers for all types that are known by this informer factory, and that are synced.
If any informers aren't synced, their GVRs are returned so that they can be checked and processed later.
func (*DynamicDiscoverySharedInformerFactory) Start ¶
func (d *DynamicDiscoverySharedInformerFactory) Start(_ <-chan struct{})
Start starts any informers that have been created but not yet started. The passed in stop channel is ignored; instead, a new stop channel is created, so the factory can properly stop the informer if/when the API is removed. Like other shared informer factories, this call is non-blocking.
func (*DynamicDiscoverySharedInformerFactory) StartWorker ¶ added in v0.6.3
func (d *DynamicDiscoverySharedInformerFactory) StartWorker(ctx context.Context)
StartWorker starts the worker that waits for notifications that informer updates are needed. This call is blocking, stopping when ctx.Done() is closed.
type GVREventHandler ¶
type GVREventHandler interface { OnAdd(gvr schema.GroupVersionResource, obj interface{}) OnUpdate(gvr schema.GroupVersionResource, oldObj, newObj interface{}) OnDelete(gvr schema.GroupVersionResource, obj interface{}) }
GVREventHandler is an event handler that includes the GroupVersionResource of the resource being handled.
type GVREventHandlerFuncs ¶
type GVREventHandlerFuncs struct { AddFunc func(gvr schema.GroupVersionResource, obj interface{}) UpdateFunc func(gvr schema.GroupVersionResource, oldObj, newObj interface{}) DeleteFunc func(gvr schema.GroupVersionResource, obj interface{}) }
func (GVREventHandlerFuncs) OnAdd ¶
func (g GVREventHandlerFuncs) OnAdd(gvr schema.GroupVersionResource, obj interface{})
func (GVREventHandlerFuncs) OnDelete ¶
func (g GVREventHandlerFuncs) OnDelete(gvr schema.GroupVersionResource, obj interface{})
func (GVREventHandlerFuncs) OnUpdate ¶
func (g GVREventHandlerFuncs) OnUpdate(gvr schema.GroupVersionResource, oldObj, newObj interface{})