objectstore

package
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: Oct 15, 2019 License: Apache-2.0 Imports: 26 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AccessError added in v0.7.0

type AccessError struct {
	Key AccessKey
}

func (*AccessError) Error added in v0.7.0

func (ae *AccessError) Error() string

type AccessKey added in v0.7.0

type AccessKey struct {
	Namespace string
	Group     string
	Resource  string
	Verb      string
}

AccessKey is used at a key in an access map. It is made up of a Namespace, Group, Resource, and Verb.

type DynamicCache

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

DynamicCache is a cache based on the dynamic shared informer factory.

func NewDynamicCache

func NewDynamicCache(ctx context.Context, client cluster.ClientInterface, options ...DynamicCacheOpt) (*DynamicCache, error)

NewDynamicCache creates an instance of DynamicCache.

func (*DynamicCache) Delete added in v0.7.0

func (dc *DynamicCache) Delete(ctx context.Context, key store.Key) error

Delete deletes an object from the cluster using a key.

func (*DynamicCache) Get

Get retrieves a single object.

func (*DynamicCache) IsLoading added in v0.6.0

func (dc *DynamicCache) IsLoading(ctx context.Context, key store.Key) bool

func (*DynamicCache) List

List lists objects.

func (*DynamicCache) RegisterOnUpdate

func (dc *DynamicCache) RegisterOnUpdate(fn store.UpdateFn)

RegisterOnUpdate registers a function that will be called when the store updates it's client. TODO: investigate if this needed since object store isn't replaced, it's client is.

func (*DynamicCache) Unwatch added in v0.7.0

func (dc *DynamicCache) Unwatch(ctx context.Context, groupVersionKinds ...schema.GroupVersionKind) error

Unwatch un-watches a key by stopping it's informer.

func (*DynamicCache) Update

func (dc *DynamicCache) Update(ctx context.Context, key store.Key, updater func(*unstructured.Unstructured) error) error

func (*DynamicCache) UpdateClusterClient

func (dc *DynamicCache) UpdateClusterClient(ctx context.Context, client cluster.ClientInterface) error

UpdateClusterClient updates the cluster client.

func (*DynamicCache) Watch

func (dc *DynamicCache) Watch(ctx context.Context, key store.Key, handler kcache.ResourceEventHandler) error

Watch watches the cluster for an event and performs actions with the supplied handler.

type DynamicCacheOpt

type DynamicCacheOpt func(*DynamicCache)

DynamicCacheOpt is an option for configuration DynamicCache.

func Access added in v0.7.0

func Access(resourceAccess ResourceAccess) DynamicCacheOpt

Access sets the Resource Access cache for a DynamicCache.

type InformerFactory added in v0.7.0

type InformerFactory interface {
	ForResource(gvr schema.GroupVersionResource) informers.GenericInformer
	Delete(gvr schema.GroupVersionResource)
	WaitForCacheSync(stopCh <-chan struct{}) map[schema.GroupVersionResource]bool
}

InformerFactory creates informers.

type ResourceAccess added in v0.7.0

type ResourceAccess interface {
	HasAccess(context.Context, store.Key, string) error
	Reset()
	Get(AccessKey) (bool, bool)
	Set(AccessKey, bool)
	UpdateClient(client cluster.ClientInterface)
}

func NewResourceAccess added in v0.7.0

func NewResourceAccess(client cluster.ClientInterface) ResourceAccess

Jump to

Keyboard shortcuts

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