cache

package
v1.1.6 Latest Latest
Warning

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

Go to latest
Published: Nov 11, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Informer

type Informer interface {
	// AddIndexers adds more indexers to this store.  If you call this after you already have data
	// in the store, the results are undefined.
	AddIndexers(indexers cache.Indexers) error
	// GetIndexer returns the indexer used to watch and store this object.
	GetIndexer() cache.Indexer
}

type Informers

type Informers interface {
	// GetInformer fetches or constructs an informer for the given object that corresponds to a single
	// API kind and resource.
	GetInformer(ctx context.Context, obj any) (Informer, error)

	// GetInformerForKind is similar to GetInformer, except that it takes akind, instead
	// of the underlying object.
	GetInformerForKind(ctx context.Context, kind string) (Informer, error)
}

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

type Interface

type Interface interface {
	Reader
	Writer
	Informers
}

func NewCache

func NewCache(scheme *runtime.Scheme) Interface

type Reader

type Reader interface {
	runtime.Reader
}

type Writer

type Writer interface {
	Add(ctx context.Context, object any) error
	Replace(ctx context.Context, objects any) error
	Update(ctx context.Context, object any) error
	Delete(ctx context.Context, object any) error
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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