MCPcopy
hub / github.com/kubernetes-sigs/controller-runtime / Informers

Interface Informers

pkg/cache/cache.go:76–97  ·  view source on GitHub ↗

Informers knows how to create or fetch informers for different group-version-kinds, and add indices to those informers. It's safe to call GetInformer from multiple threads.

Source from the content-addressed store, hash-verified

74// group-version-kinds, and add indices to those informers. It's safe to call
75// GetInformer from multiple threads.
76type Informers interface {
77 // GetInformer fetches or constructs an informer for the given object that corresponds to a single
78 // API kind and resource.
79 GetInformer(ctx context.Context, obj client.Object, opts ...InformerGetOption) (Informer, error)
80
81 // GetInformerForKind is similar to GetInformer, except that it takes a group-version-kind, instead
82 // of the underlying object.
83 GetInformerForKind(ctx context.Context, gvk schema.GroupVersionKind, opts ...InformerGetOption) (Informer, error)
84
85 // RemoveInformer removes an informer entry and stops it if it was running.
86 RemoveInformer(ctx context.Context, obj client.Object) error
87
88 // Start runs all the informers known to this cache until the context is closed.
89 // It blocks.
90 Start(ctx context.Context) error
91
92 // WaitForCacheSync waits for all the caches to sync. Returns false if it could not sync a cache.
93 WaitForCacheSync(ctx context.Context) bool
94
95 // FieldIndexer adds indices to the managed informers.
96 client.FieldIndexer
97}
98
99// Informer allows you to interact with the underlying informer.
100type Informer interface {

Callers 44

GetInformerMethod · 0.65
GetInformerMethod · 0.65
NonBlockingGetTestFunction · 0.65
CacheTestFunction · 0.65
StartMethod · 0.65
GetInformerMethod · 0.65
GetInformerForKindMethod · 0.65
GetInformerForKindMethod · 0.65
CacheTestFunction · 0.65
RemoveInformerMethod · 0.65

Implementers 3

multiNamespaceCachepkg/cache/multi_namespace_cache.go
delegatingByGVKCachepkg/cache/delegating_by_gvk_cache.go
FakeInformerspkg/cache/informertest/fake_cache.go

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…