Documentation ¶
Overview ¶
Package informer provides a fake informer manager for testing.
Index ¶
- type FakeManager
- func (m *FakeManager) AddDynamicResources(_ []informer.APIResourceMeta, _ cache.ResourceEventHandler, _ bool)
- func (m *FakeManager) AddStaticResource(_ informer.APIResourceMeta, _ cache.ResourceEventHandler)
- func (m *FakeManager) GetClient() dynamic.Interface
- func (m *FakeManager) GetNameSpaceScopedResources() []schema.GroupVersionResource
- func (m *FakeManager) IsClusterScopedResources(gvk schema.GroupVersionKind) bool
- func (m *FakeManager) IsInformerSynced(_ schema.GroupVersionResource) bool
- func (m *FakeManager) Lister(_ schema.GroupVersionResource) cache.GenericLister
- func (m *FakeManager) Start()
- func (m *FakeManager) Stop()
- func (m *FakeManager) WaitForCacheSync()
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FakeManager ¶
type FakeManager struct { // APIResources map collects all the api resources we watch. APIResources map[schema.GroupVersionKind]bool // IsClusterScopedResource defines whether the APIResources store the cluster scope resources or not. // If true, the map stores all the cluster scoped resource. If the resource is not in the map, it will be treated // as the namespace scoped resource. // If false, the map stores all the namespace scoped resource. If the resource is not in the map, it will be treated // as the cluster scoped resource. IsClusterScopedResource bool }
FakeManager is a fake informer manager.
func (*FakeManager) AddDynamicResources ¶
func (m *FakeManager) AddDynamicResources(_ []informer.APIResourceMeta, _ cache.ResourceEventHandler, _ bool)
func (*FakeManager) AddStaticResource ¶
func (m *FakeManager) AddStaticResource(_ informer.APIResourceMeta, _ cache.ResourceEventHandler)
func (*FakeManager) GetClient ¶
func (m *FakeManager) GetClient() dynamic.Interface
func (*FakeManager) GetNameSpaceScopedResources ¶
func (m *FakeManager) GetNameSpaceScopedResources() []schema.GroupVersionResource
func (*FakeManager) IsClusterScopedResources ¶
func (m *FakeManager) IsClusterScopedResources(gvk schema.GroupVersionKind) bool
func (*FakeManager) IsInformerSynced ¶
func (m *FakeManager) IsInformerSynced(_ schema.GroupVersionResource) bool
func (*FakeManager) Lister ¶
func (m *FakeManager) Lister(_ schema.GroupVersionResource) cache.GenericLister
func (*FakeManager) Start ¶
func (m *FakeManager) Start()
func (*FakeManager) Stop ¶
func (m *FakeManager) Stop()
func (*FakeManager) WaitForCacheSync ¶
func (m *FakeManager) WaitForCacheSync()
Click to show internal directories.
Click to hide internal directories.