store

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Aug 31, 2022 License: Apache-2.0 Imports: 34 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Cache

type Cache interface {
	UpdateCache(resourcesByCluster map[string]map[schema.GroupVersionResource]struct{}) error
	HasResource(resource schema.GroupVersionResource) bool
	GetResourceFromCache(ctx context.Context, gvr schema.GroupVersionResource, namespace, name string) (runtime.Object, string, error)
	Stop()
}

Cache an interface for cache.

type MultiClusterCache

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

MultiClusterCache caches resource from multi member clusters

func NewMultiClusterCache

func NewMultiClusterCache(newClientFunc func(string) (dynamic.Interface, error), restMapper meta.RESTMapper) *MultiClusterCache

NewMultiClusterCache return a cache for resources from member clusters

func (*MultiClusterCache) Get

Get returns the target object

func (*MultiClusterCache) GetResourceFromCache

func (c *MultiClusterCache) GetResourceFromCache(ctx context.Context, gvr schema.GroupVersionResource, namespace, name string) (runtime.Object, string, error)

GetResourceFromCache returns which cluster the resource belong to.

func (*MultiClusterCache) HasResource

func (c *MultiClusterCache) HasResource(resource schema.GroupVersionResource) bool

HasResource return whether resource is cached.

func (*MultiClusterCache) List

List returns the object list nolint:gocyclo

func (*MultiClusterCache) Stop

func (c *MultiClusterCache) Stop()

Stop stops the cache for multi cluster.

func (*MultiClusterCache) UpdateCache

func (c *MultiClusterCache) UpdateCache(resourcesByCluster map[string]map[schema.GroupVersionResource]struct{}) error

UpdateCache update cache for multi clusters

func (*MultiClusterCache) Watch

Watch watches the resource

type RESTReader

RESTReader supports get/list/watch rest.

Jump to

Keyboard shortcuts

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