Documentation
¶
Index ¶
- Variables
- func NewCacheReader(indexer multiIndexer) cache.Indexer
- func NewFilteredDynamicInformer(client dynamic.Interface, gvr schema.GroupVersionResource, ...) informers.GenericInformer
- func NewFilteredMetadataInformer(client metadata.Interface, gvr schema.GroupVersionResource, ...) informers.GenericInformer
- type DynamicSharedInformerFactory
- type MetadataSharedInformerFactory
- type MultiNamespaceInformer
- type NamespaceSet
- type NamespaceSetHandler
- type NamespaceSetHandlerFuncs
- type NewInformerFunc
- type TweakListOptionsFunc
Constants ¶
This section is empty.
Variables ¶
var ErrCacheReadOnly = errors.New("cache is read-only")
ErrCacheReadOnly is returned for any attempted write.
Functions ¶
func NewCacheReader ¶
NewCacheReader returns a new cache reader which satisfies the cache.Indexer interface and provides read-only access across the underlying caches for the given cross-namespace indexer. The argument is any type with a GetIndexers method that returns a map of namespaces to indexers.
func NewFilteredDynamicInformer ¶
func NewFilteredDynamicInformer(client dynamic.Interface, gvr schema.GroupVersionResource, namespaces NamespaceSet, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions TweakListOptionsFunc) informers.GenericInformer
NewFilteredDynamicInformer constructs a new informer for a dynamic type.
func NewFilteredMetadataInformer ¶
func NewFilteredMetadataInformer(client metadata.Interface, gvr schema.GroupVersionResource, namespaces NamespaceSet, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions TweakListOptionsFunc) informers.GenericInformer
NewFilteredMetadataInformer constructs a new informer for a metadata type.
Types ¶
type DynamicSharedInformerFactory ¶
type DynamicSharedInformerFactory interface {}
DynamicSharedInformerFactory provides access to shared informers and listers for dynamic client.
Note that if you restrict the factory or an individual informer to a set of namespaces, it will not work for cluster-scoped resources.
func NewDynamicSharedInformerFactory ¶
func NewDynamicSharedInformerFactory(client dynamic.Interface, defaultResync time.Duration) DynamicSharedInformerFactory
NewDynamicSharedInformerFactory constructs a new instance of dynamicSharedInformerFactory for all namespaces.
func NewFilteredDynamicSharedInformerFactory ¶
func NewFilteredDynamicSharedInformerFactory(client dynamic.Interface, defaultResync time.Duration, namespaces NamespaceSet, tweakListOptions TweakListOptionsFunc) DynamicSharedInformerFactory
NewFilteredDynamicSharedInformerFactory constructs a new instance of dynamicSharedInformerFactory. Listers obtained via this factory will be subject to the same filters as specified here.
type MetadataSharedInformerFactory ¶
type MetadataSharedInformerFactory interface {}
MetadataSharedInformerFactory provides access to shared informers and listers for metadata client.
func NewFilteredMetadataSharedInformerFactory ¶
func NewFilteredMetadataSharedInformerFactory(client metadata.Interface, defaultResync time.Duration, namespaces NamespaceSet, tweakListOptions TweakListOptionsFunc) MetadataSharedInformerFactory
NewFilteredMetadataSharedInformerFactory constructs a new instance of metadataSharedInformerFactory. Listers obtained via this factory will be subject to the same filters as specified here.
func NewMetadataSharedInformerFactory ¶
func NewMetadataSharedInformerFactory(client metadata.Interface, defaultResync time.Duration) MetadataSharedInformerFactory
NewMetadataSharedInformerFactory constructs a new instance of metadataSharedInformerFactory for all namespaces.
type MultiNamespaceInformer ¶
type MultiNamespaceInformer interface { cache.SharedIndexInformer AddNamespace(namespace string) RemoveNamespace(namespace string) GetIndexers() map[string]cache.Indexer }
MultiNamespaceInformer extends the cache.SharedIndexInformer interface with methods relevant to cross-namespace informers.
func NewMultiNamespaceInformer ¶
func NewMultiNamespaceInformer(namespaces NamespaceSet, resync time.Duration, newInformer NewInformerFunc) MultiNamespaceInformer
NewMultiNamespaceInformer returns a new cross-namespace informer. The given NewInformerFunc will be used to craft new single-namespace informers when adding namespaces.
type NamespaceSet ¶
type NamespaceSet interface { SetNamespaces(namespaces ...string) AddHandler(handler NamespaceSetHandler) Contains(namespace string) bool List() []string }
NamespaceSet represents a dynamic set of namespaces. The set can be updated with SetNamespaces, and handlers can be added with AddHandler that will respond to addition or removal of individual namespaces.
func NewNamespaceSet ¶
func NewNamespaceSet(namespaces ...string) NamespaceSet
NewNamespaceSet returns a new NamespaceSet tracking the given namespaces.
type NamespaceSetHandler ¶
NamespaceSetHandler handles add and remove events for namespace sets.
type NamespaceSetHandlerFuncs ¶
type NamespaceSetHandlerFuncs struct { AddFunc func(namespace string) RemoveFunc func(namespace string) }
NamespaceSetHandlerFuncs is a helper for implementing NamespaceSetHandler.
func (NamespaceSetHandlerFuncs) OnAdd ¶
func (h NamespaceSetHandlerFuncs) OnAdd(namespace string)
OnAdd calls AddFunc if it is non-nil.
func (NamespaceSetHandlerFuncs) OnRemove ¶
func (h NamespaceSetHandlerFuncs) OnRemove(namespace string)
OnRemove calls RemoveFunc if it is non-nil.
type NewInformerFunc ¶
type NewInformerFunc func(namespace string) cache.SharedIndexInformer
NewInformerFunc returns a new informer for a given namespace.
type TweakListOptionsFunc ¶
type TweakListOptionsFunc func(*metav1.ListOptions)
TweakListOptionsFunc defines the signature of a helper function that allows filtering in informers created by shared informer factories.