Documentation ¶
Overview ¶
The test package contains fake informers for testing controllers
Index ¶
- type FakeInformer
- func (f *FakeInformer) Add(obj metav1.Object)
- func (f *FakeInformer) AddEventHandler(handler cache.ResourceEventHandler)
- func (f *FakeInformer) AddEventHandlerWithResyncPeriod(handler cache.ResourceEventHandler, resyncPeriod time.Duration)
- func (f *FakeInformer) AddIndexers(indexers cache.Indexers) error
- func (f *FakeInformer) Delete(obj metav1.Object)
- func (f *FakeInformer) GetController() cache.Controller
- func (f *FakeInformer) GetIndexer() cache.Indexer
- func (f *FakeInformer) GetStore() cache.Store
- func (f *FakeInformer) HasSynced() bool
- func (f *FakeInformer) Informer() cache.SharedIndexInformer
- func (f *FakeInformer) LastSyncResourceVersion() string
- func (f *FakeInformer) Run(<-chan struct{})
- func (f *FakeInformer) Update(oldObj, newObj metav1.Object)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FakeInformer ¶
type FakeInformer struct { // Synced is returned by the HasSynced functions to implement the Informer interface Synced bool // RunCount is incremented each time RunInformersAndControllers is called RunCount int // contains filtered or unexported fields }
FakeInformer provides fake Informer functionality for testing
func (*FakeInformer) Add ¶
func (f *FakeInformer) Add(obj metav1.Object)
Add fakes an Add event for obj
func (*FakeInformer) AddEventHandler ¶
func (f *FakeInformer) AddEventHandler(handler cache.ResourceEventHandler)
AddEventHandler implements the Informer interface.
func (*FakeInformer) AddEventHandlerWithResyncPeriod ¶
func (f *FakeInformer) AddEventHandlerWithResyncPeriod(handler cache.ResourceEventHandler, resyncPeriod time.Duration)
func (*FakeInformer) AddIndexers ¶
func (f *FakeInformer) AddIndexers(indexers cache.Indexers) error
func (*FakeInformer) Delete ¶
func (f *FakeInformer) Delete(obj metav1.Object)
Add fakes an Delete event for obj
func (*FakeInformer) GetController ¶
func (f *FakeInformer) GetController() cache.Controller
func (*FakeInformer) GetIndexer ¶
func (f *FakeInformer) GetIndexer() cache.Indexer
func (*FakeInformer) GetStore ¶
func (f *FakeInformer) GetStore() cache.Store
func (*FakeInformer) HasSynced ¶
func (f *FakeInformer) HasSynced() bool
HasSynced implements the Informer interface. Returns f.Synced
func (*FakeInformer) Informer ¶
func (f *FakeInformer) Informer() cache.SharedIndexInformer
func (*FakeInformer) LastSyncResourceVersion ¶
func (f *FakeInformer) LastSyncResourceVersion() string
func (*FakeInformer) Run ¶
func (f *FakeInformer) Run(<-chan struct{})
RunInformersAndControllers implements the Informer interface. Increments f.RunCount
func (*FakeInformer) Update ¶
func (f *FakeInformer) Update(oldObj, newObj metav1.Object)
Add fakes an Update event for obj
Click to show internal directories.
Click to hide internal directories.