Documentation ¶
Index ¶
- type DynamicDiscoverySharedInformerFactory
- func (d *DynamicDiscoverySharedInformerFactory) IndexerFor(gvr schema.GroupVersionResource) cache.Indexer
- func (d *DynamicDiscoverySharedInformerFactory) InformerForResource(gvr schema.GroupVersionResource) informers.GenericInformer
- func (d *DynamicDiscoverySharedInformerFactory) Listers() (listers map[schema.GroupVersionResource]cache.GenericLister, ...)
- func (d *DynamicDiscoverySharedInformerFactory) Start(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( workspaceLister tenancylisters.ClusterWorkspaceLister, disco clusterDiscovery, dynClient dynamic.Interface, filterFunc func(obj interface{}) bool, handler GVREventHandler, pollInterval time.Duration, ) DynamicDiscoverySharedInformerFactory
NewDynamicDiscoverySharedInformerFactory returns a factory for shared informers that discovers new types and informs on updates to resources of those types.
func (*DynamicDiscoverySharedInformerFactory) IndexerFor ¶
func (d *DynamicDiscoverySharedInformerFactory) IndexerFor(gvr schema.GroupVersionResource) cache.Indexer
IndexerFor returns the indexer for the given type GVR.
func (*DynamicDiscoverySharedInformerFactory) InformerForResource ¶ added in v0.6.0
func (d *DynamicDiscoverySharedInformerFactory) InformerForResource(gvr schema.GroupVersionResource) informers.GenericInformer
InformerForResource returns the GenericInformer for gvr, creating it if needed.
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(ctx context.Context)
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{})