cache

package
v0.3.10 Latest Latest
Warning

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

Go to latest
Published: Apr 16, 2023 License: Apache-2.0 Imports: 7 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 struct {
	Type        Type
	Path        Path
	Value       Value
	Description string
}

type LocalManager

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

func (*LocalManager) Create

func (l *LocalManager) Create(t Type, path Path, value Value) error

func (*LocalManager) Delete

func (l *LocalManager) Delete(t Type) error

func (*LocalManager) DeleteAll

func (l *LocalManager) DeleteAll() error

func (*LocalManager) Get

func (l *LocalManager) Get(t Type, path Path, withValue bool) (*Cache, error)

func (*LocalManager) List

func (l *LocalManager) List(t Type, withValue bool) ([]*Cache, error)

func (*LocalManager) ListAll

func (l *LocalManager) ListAll(withValue bool) ([]*Cache, error)

func (*LocalManager) Update

func (l *LocalManager) Update(t Type, path Path, value Value) error

type Manager

type Manager interface {
	Create(t Type, path Path, value Value) error
	Update(t Type, path Path, value Value) error
	Get(t Type, path Path, withValue bool) (*Cache, error)
	List(t Type, withValue bool) ([]*Cache, error)
	ListAll(withValue bool) ([]*Cache, error)
	Delete(t Type) error
	DeleteAll() error
}

func DefaultManagers

func DefaultManagers(nodeManager node.Manager) []Manager

func NewLocalManager

func NewLocalManager(rootDir string) Manager

func NewNodeCache

func NewNodeCache(nodeManager node.Manager) Manager

type NodeCache

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

func (*NodeCache) Create

func (n *NodeCache) Create(t Type, path Path, value Value) error

func (*NodeCache) Delete

func (n *NodeCache) Delete(t Type) error

func (*NodeCache) DeleteAll

func (n *NodeCache) DeleteAll() error

func (*NodeCache) Get

func (n *NodeCache) Get(t Type, path Path, withValue bool) (*Cache, error)

func (*NodeCache) List

func (n *NodeCache) List(t Type, withValue bool) ([]*Cache, error)

func (*NodeCache) ListAll

func (n *NodeCache) ListAll(withValue bool) ([]*Cache, error)

func (*NodeCache) Update

func (n *NodeCache) Update(t Type, path Path, value Value) error

type Path

type Path string

type Type

type Type string
const (
	ClusterCacheType      Type = "cluster"
	BootstrapperCacheType Type = "bootstrapper"
	BinCacheType          Type = "bin"
)
const (
	NodeCacheType Type = "node"
)

type Value

type Value []byte

Jump to

Keyboard shortcuts

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