Documentation ¶
Index ¶
- func WatchErrorHandlerForScopeInformer(si *ScopeInformer, removeFromCache func()) func(r *cache.Reflector, err error)
- type GvkToInformers
- type InformerOptions
- type Informers
- type ScopeInformer
- func (si *ScopeInformer) AddDependent(dependent metav1.Object)
- func (si *ScopeInformer) AddEventHandler(handler cache.ResourceEventHandler)
- func (si *ScopeInformer) AddEventHandlerWithResyncPeriod(handler cache.ResourceEventHandler, resyncPeriod time.Duration)
- func (si *ScopeInformer) AddIndexers(indexers cache.Indexers) error
- func (si *ScopeInformer) Get(key string) (runtime.Object, error)
- func (si *ScopeInformer) GetDependents() map[types.UID]metav1.Object
- func (si *ScopeInformer) HasDependent(dependent metav1.Object) bool
- func (si *ScopeInformer) HasSynced() bool
- func (si *ScopeInformer) List(listOpts client.ListOptions) ([]runtime.Object, error)
- func (si *ScopeInformer) RemoveDependent(dependent metav1.Object)
- func (si *ScopeInformer) Run()
- func (si *ScopeInformer) SetWatchErrorHandler(handler cache.WatchErrorHandler) error
- func (si *ScopeInformer) Terminate()
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func WatchErrorHandlerForScopeInformer ¶
func WatchErrorHandlerForScopeInformer(si *ScopeInformer, removeFromCache func()) func(r *cache.Reflector, err error)
WatchErrorHandlerForScopeInformer is a helper for creating a WatchErrorHandler for a given ScopeInformer and function that is called to remove the ScopeInformer from the cache.
Types ¶
type GvkToInformers ¶
type GvkToInformers map[schema.GroupVersionKind]Informers
GvkToInformers is a mapping of GVK to Informers
type InformerOptions ¶
type InformerOptions struct { // Namespace the informer is watching Namespace string // GVK the informer is watching Gvk schema.GroupVersionKind // Unique identifier for the informer Key string // The informer itself Informer informers.GenericInformer // The resource dependent on the informer Dependent metav1.Object }
InformerOptions are meant to set options when adding an informer to a cache
type Informers ¶
type Informers map[string]*ScopeInformer
Informers is a mapping of a string (meant to be a unique string) to a ScopeInformer
type ScopeInformer ¶
type ScopeInformer struct {
// contains filtered or unexported fields
}
ScopeInformer is a wrapper around a client-go informer that is meant to store information needed for the dynamic scoped cache
func NewScopeInformer ¶
func NewScopeInformer(informer informers.GenericInformer) *ScopeInformer
NewScopeInformer will create an return a new ScopeInformer that wraps the provided informer.
func (*ScopeInformer) AddDependent ¶
func (si *ScopeInformer) AddDependent(dependent metav1.Object)
AddDependent will add a dependent for the ScopeInformer
func (*ScopeInformer) AddEventHandler ¶
func (si *ScopeInformer) AddEventHandler(handler cache.ResourceEventHandler)
AddEventHandler will add an event handler to the ScopeInformer
func (*ScopeInformer) AddEventHandlerWithResyncPeriod ¶
func (si *ScopeInformer) AddEventHandlerWithResyncPeriod(handler cache.ResourceEventHandler, resyncPeriod time.Duration)
AddEventHandlerWithResyncPeriod will add an event handler with a specific resync period to the ScopeInformer
func (*ScopeInformer) AddIndexers ¶
func (si *ScopeInformer) AddIndexers(indexers cache.Indexers) error
AddIndexers will add the provided indexers to the ScopeInformer
func (*ScopeInformer) Get ¶
func (si *ScopeInformer) Get(key string) (runtime.Object, error)
Get will attempt to get a Kubernetes object with the given key
func (*ScopeInformer) GetDependents ¶
func (si *ScopeInformer) GetDependents() map[types.UID]metav1.Object
GetDependents will return the dependents for the ScopeInformer
func (*ScopeInformer) HasDependent ¶
func (si *ScopeInformer) HasDependent(dependent metav1.Object) bool
HasDependent checks if a dependent exists for a ScopeInformer
func (*ScopeInformer) HasSynced ¶
func (si *ScopeInformer) HasSynced() bool
HasSynced will return whether or not the ScopeInformer has synced
func (*ScopeInformer) List ¶
func (si *ScopeInformer) List(listOpts client.ListOptions) ([]runtime.Object, error)
List will list kubernetes resources based on the provided list options
func (*ScopeInformer) RemoveDependent ¶
func (si *ScopeInformer) RemoveDependent(dependent metav1.Object)
RemoveDependent will remove a dependent for the ScopeInformer
func (*ScopeInformer) SetWatchErrorHandler ¶
func (si *ScopeInformer) SetWatchErrorHandler(handler cache.WatchErrorHandler) error
SetWatchErrorHandler will set the watch error handler for the ScopeInformer
func (*ScopeInformer) Terminate ¶
func (si *ScopeInformer) Terminate()
Terminate will kill the ScopeInformer