cache

package
v0.4.2-0...-b65496d Latest Latest
Warning

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

Go to latest
Published: Dec 18, 2024 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateSharedInformerCache

func CreateSharedInformerCache(mgr manager.Manager) error

func SetTestInstance

func SetTestInstance(s SharedInformerCache)

Only used for UTs

Types

type SharedInformerCache

type SharedInformerCache interface {
	// block added by flant.com
	// GetNode returns the node info if present in the cache.
	GetNode(nodeName string) (*corev1.Node, error)

	// WatchPods registers the pod event handlers with the informer cache
	WatchPods(fn func(object interface{})) error

	// GetPersistentVolumeClaim returns the PersistentVolumeClaim in a namespace from the cache after applying TransformFunc
	GetPersistentVolumeClaim(pvcName string, namespace string) (*corev1.PersistentVolumeClaim, error)
}

SharedInformerCache is an eventually consistent cache. The cache interface provides APIs to fetch specific k8s objects from the cache. Only a subset of k8s objects are currently managed by this cache. DO NOT USE it when you need the latest and accurate copy of a CR.

func Instance

func Instance() SharedInformerCache

Jump to

Keyboard shortcuts

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