cachemanager

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Sep 27, 2021 License: Apache-2.0 Imports: 33 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CacheManager

type CacheManager interface {
	CacheResponse(req *http.Request, prc io.ReadCloser, stopCh <-chan struct{}) error
	QueryCache(req *http.Request) (runtime.Object, error)
	UpdateCacheAgents(agents, action string) sets.String
	ListCacheAgents() []string
	CanCacheFor(req *http.Request) bool
	DeleteKindFor(gvr schema.GroupVersionResource) error
}

CacheManager is an adaptor to cache runtime object data into backend storage

func NewCacheManager

func NewCacheManager(
	storage StorageWrapper,
	serializerMgr *serializer.SerializerManager,
	restMapperMgr *hubmeta.RESTMapperManager,
	sharedFactory informers.SharedInformerFactory,
) (CacheManager, error)

NewCacheManager creates a new CacheManager

type StorageWrapper

type StorageWrapper interface {
	Create(key string, obj runtime.Object) error
	Delete(key string) error
	Get(key string) (runtime.Object, error)
	ListKeys(key string) ([]string, error)
	List(key string) ([]runtime.Object, error)
	Update(key string, obj runtime.Object) error
	Replace(rootKey string, objs map[string]runtime.Object) error
	DeleteCollection(rootKey string) error
	GetRaw(key string) ([]byte, error)
	UpdateRaw(key string, contents []byte) error
}

StorageWrapper is wrapper for storage.Store interface in order to handle serialize runtime object

func NewStorageWrapper

func NewStorageWrapper(storage storage.Store) StorageWrapper

NewStorageWrapper create a StorageWrapper object

Jump to

Keyboard shortcuts

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