Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrInMemoryCacheMiss = errors.New("in-memory cache miss")
)
Functions ¶
This section is empty.
Types ¶
type CacheAgent ¶ added in v1.2.0
func NewCacheAgents ¶ added in v1.2.0
func NewCacheAgents(informerFactory informers.SharedInformerFactory, store StorageWrapper) *CacheAgent
func (*CacheAgent) HasAny ¶ added in v1.2.0
func (ca *CacheAgent) HasAny(items ...string) bool
type CacheManager ¶
type CacheManager interface { CacheResponse(req *http.Request, prc io.ReadCloser, stopCh <-chan struct{}) error QueryCache(req *http.Request) (runtime.Object, error) 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( storagewrapper StorageWrapper, serializerMgr *serializer.SerializerManager, restMapperMgr *hubmeta.RESTMapperManager, sharedFactory informers.SharedInformerFactory, ) CacheManager
NewCacheManager creates a new CacheManager
type StorageWrapper ¶
type StorageWrapper interface { Name() string Create(key storage.Key, obj runtime.Object) error Delete(key storage.Key) error Get(key storage.Key) (runtime.Object, error) List(key storage.Key) ([]runtime.Object, error) Update(key storage.Key, obj runtime.Object, rv uint64) (runtime.Object, error) KeyFunc(info storage.KeyBuildInfo) (storage.Key, error) ListResourceKeysOfComponent(component string, gvr schema.GroupVersionResource) ([]storage.Key, error) ReplaceComponentList(component string, gvr schema.GroupVersionResource, namespace string, contents map[storage.Key]runtime.Object) error DeleteComponentResources(component string) error SaveClusterInfo(key storage.ClusterInfoKey, content []byte) error GetClusterInfo(key storage.ClusterInfoKey) ([]byte, error) GetStorage() storage.Store }
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
Click to show internal directories.
Click to hide internal directories.