cache

package
v1.1.26 Latest Latest
Warning

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

Go to latest
Published: Nov 13, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const NameIndex = "name"

Variables

This section is empty.

Functions

func KeyFunc

func KeyFunc(obj interface{}) (string, error)

func NameIndexFunc

func NameIndexFunc(obj interface{}) ([]string, error)

func NewSharedIndexInformer

func NewSharedIndexInformer() cache.SharedIndexInformer

Types

type Cache

type Cache interface {
	client.Reader
	Informers
}

func New

func New(opts Options) (Cache, error)

type Informer

type Informer interface {
	AddEventHandler(handler cache.ResourceEventHandler)
	AddIndexers(indexers cache.Indexers) error
	HasSynced() bool
}

type Informers

type Informers interface {
	GetInformer(ctx context.Context, obj client.Object) (Informer, error)
	GetInformerByKind(ctx context.Context, kind string) (Informer, error)
	Start(ctx context.Context) error
	WaitForCacheSync(ctx context.Context) bool
}

type MapEntry

type MapEntry struct {
	Informer cache.SharedIndexInformer
	Reader   Reader
}

type Options

type Options struct {
	Scheme *runtime.Scheme

	Resync *time.Duration
}

type Reader

type Reader struct {
	// contains filtered or unexported fields
}

func (*Reader) Get

func (c *Reader) Get(_ context.Context, key string, out client.Object) error

func (*Reader) List

func (c *Reader) List(_ context.Context, out []client.Object) error

Jump to

Keyboard shortcuts

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