memory

package
v0.10.24 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type InMemoryResourceCache

type InMemoryResourceCache interface {
	Get(key string) (resources.Resource, bool)
	Delete(key string)
	Set(key string, resource resources.Resource)
	List(prefix string) resources.ResourceList
	Subscribe() chan struct{}
	Unsubscribe(subscription chan struct{})
}

func NewInMemoryResourceCache

func NewInMemoryResourceCache() InMemoryResourceCache

type ResourceClient

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

func NewResourceClient

func NewResourceClient(cache InMemoryResourceCache, resourceType resources.Resource) *ResourceClient

func (*ResourceClient) Delete

func (rc *ResourceClient) Delete(namespace, name string, opts clients.DeleteOpts) error

func (*ResourceClient) Kind

func (rc *ResourceClient) Kind() string

func (*ResourceClient) List

func (rc *ResourceClient) List(namespace string, opts clients.ListOpts) (resources.ResourceList, error)

func (*ResourceClient) NewResource

func (rc *ResourceClient) NewResource() resources.Resource

func (*ResourceClient) Prefix

func (rc *ResourceClient) Prefix(namespace string) string

func (*ResourceClient) Read

func (rc *ResourceClient) Read(namespace, name string, opts clients.ReadOpts) (resources.Resource, error)

func (*ResourceClient) Register

func (rc *ResourceClient) Register() error

func (*ResourceClient) Watch

func (rc *ResourceClient) Watch(namespace string, opts clients.WatchOpts) (<-chan resources.ResourceList, <-chan error, error)

func (*ResourceClient) Write

Jump to

Keyboard shortcuts

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