informer

package
v1.16.0-rc.2 Latest Latest
Warning

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

Go to latest
Published: Jul 15, 2024 License: Apache-2.0 Imports: 9 Imported by: 22

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CastInformerEvent added in v1.16.0

func CastInformerEvent[typ any](obj interface{}) *typ

CastInformerEvent tries to cast obj to type typ, directly or by DeletedFinalStateUnknown type. It returns nil and logs an error if obj doesn't contain type typ.

func NewIndexerInformer

func NewIndexerInformer(
	lw cache.ListerWatcher,
	objType k8sRuntime.Object,
	resyncPeriod time.Duration,
	h cache.ResourceEventHandler,
	transformer cache.TransformFunc,
	indexers cache.Indexers,
) (cache.Indexer, cache.Controller)

NewIndexerInformer is a copy of k8s.io/client-go/tools/cache/NewIndexerInformer but includes the default cache MutationDetector.

func NewInformer

func NewInformer(
	lw cache.ListerWatcher,
	objType k8sRuntime.Object,
	resyncPeriod time.Duration,
	h cache.ResourceEventHandler,
	transformer cache.TransformFunc,
) (cache.Store, cache.Controller)

NewInformer is a copy of k8s.io/client-go/tools/cache/NewInformer includes the default cache MutationDetector.

func NewInformerWithStore

func NewInformerWithStore(
	lw cache.ListerWatcher,
	objType k8sRuntime.Object,
	resyncPeriod time.Duration,
	h cache.ResourceEventHandler,
	transformer cache.TransformFunc,
	clientState cache.Store,
) cache.Controller

NewInformerWithStore uses the same arguments as NewInformer for which a caller can also set a cache.Store and includes the default cache MutationDetector.

Types

This section is empty.

Jump to

Keyboard shortcuts

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