informer

package
v0.11.6 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 7, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Package informer provides a fake informer manager for testing.

Index

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 (*FakeManager) Start

func (m *FakeManager) Start()

func (*FakeManager) Stop

func (m *FakeManager) Stop()

func (*FakeManager) WaitForCacheSync

func (m *FakeManager) WaitForCacheSync()

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL