Documentation ¶
Index ¶
- type DynamicDiscoverySharedInformerFactory
- func (d *DynamicDiscoverySharedInformerFactory) AddEventHandler(handler GVREventHandler)
- func (d *DynamicDiscoverySharedInformerFactory) Cluster(cluster logicalcluster.Name) kcpkubernetesinformers.ScopedDynamicSharedInformerFactory
- func (d *DynamicDiscoverySharedInformerFactory) ForResource(gvr schema.GroupVersionResource) (kcpkubernetesinformers.GenericClusterInformer, error)
- func (d *DynamicDiscoverySharedInformerFactory) Listers() (listers map[schema.GroupVersionResource]kcpcache.GenericClusterLister, ...)
- func (d *DynamicDiscoverySharedInformerFactory) RESTMapper() meta.ResettableRESTMapper
- func (d *DynamicDiscoverySharedInformerFactory) ServerGroupsAndResources() ([]*metav1.APIGroup, []*metav1.APIResourceList, error)
- func (d *DynamicDiscoverySharedInformerFactory) ServerPreferredNamespacedResources() ([]*metav1.APIResourceList, error)
- func (d *DynamicDiscoverySharedInformerFactory) ServerPreferredResources() ([]*metav1.APIResourceList, error)
- func (d *DynamicDiscoverySharedInformerFactory) ServerResourcesForGroupVersion(groupVersion string) (*metav1.APIResourceList, error)
- func (d *DynamicDiscoverySharedInformerFactory) Start(_ <-chan struct{})
- func (d *DynamicDiscoverySharedInformerFactory) StartWorker(ctx context.Context)
- func (d *DynamicDiscoverySharedInformerFactory) Subscribe(id string) <-chan struct{}
- func (d *DynamicDiscoverySharedInformerFactory) Unsubscribe(id string)
- 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 kcpapiextensionsv1informers.CustomResourceDefinitionClusterInformer, 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) Cluster ¶ added in v0.10.0
func (d *DynamicDiscoverySharedInformerFactory) Cluster(cluster logicalcluster.Name) kcpkubernetesinformers.ScopedDynamicSharedInformerFactory
func (*DynamicDiscoverySharedInformerFactory) ForResource ¶ added in v0.7.0
func (d *DynamicDiscoverySharedInformerFactory) ForResource(gvr schema.GroupVersionResource) (kcpkubernetesinformers.GenericClusterInformer, error)
ForResource 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]kcpcache.GenericClusterLister, 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) RESTMapper ¶ added in v0.10.0
func (d *DynamicDiscoverySharedInformerFactory) RESTMapper() meta.ResettableRESTMapper
func (*DynamicDiscoverySharedInformerFactory) ServerGroupsAndResources ¶ added in v0.10.0
func (d *DynamicDiscoverySharedInformerFactory) ServerGroupsAndResources() ([]*metav1.APIGroup, []*metav1.APIResourceList, error)
func (*DynamicDiscoverySharedInformerFactory) ServerPreferredNamespacedResources ¶ added in v0.10.0
func (d *DynamicDiscoverySharedInformerFactory) ServerPreferredNamespacedResources() ([]*metav1.APIResourceList, error)
func (*DynamicDiscoverySharedInformerFactory) ServerPreferredResources ¶ added in v0.10.0
func (d *DynamicDiscoverySharedInformerFactory) ServerPreferredResources() ([]*metav1.APIResourceList, error)
func (*DynamicDiscoverySharedInformerFactory) ServerResourcesForGroupVersion ¶ added in v0.10.0
func (d *DynamicDiscoverySharedInformerFactory) ServerResourcesForGroupVersion(groupVersion string) (*metav1.APIResourceList, error)
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.
func (*DynamicDiscoverySharedInformerFactory) Subscribe ¶ added in v0.7.0
func (d *DynamicDiscoverySharedInformerFactory) Subscribe(id string) <-chan struct{}
Subscribe registers for informer/discovery change notifications, returning a channel to which change notifications are sent.
func (*DynamicDiscoverySharedInformerFactory) Unsubscribe ¶ added in v0.7.0
func (d *DynamicDiscoverySharedInformerFactory) Unsubscribe(id string)
Unsubscribe removes the channel associated with id from future informer/discovery change notifications.
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{})