etcdcache

package
v0.0.0-...-5168a6d Latest Latest
Warning

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

Go to latest
Published: Jan 21, 2018 License: Apache-2.0 Imports: 6 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type EtcdCache

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

EtcdCache stores etcd records in memory to do requests on

func New

func New() *EtcdCache

New gives a new empty EtcdCache

func NewForPrefix

func NewForPrefix(prefix string) (*EtcdCache, error)

NewForPrefix returns a new EtcdCache prefilled with the keys of a specific prefix

func (*EtcdCache) Get

func (e *EtcdCache) Get(key string) (*mvccpb.KeyValue, error)

Get gets a key out of the cache

func (*EtcdCache) GetAll

func (e *EtcdCache) GetAll() []*mvccpb.KeyValue

GetAll returns all cached keysaa

func (*EtcdCache) Invalidate

func (e *EtcdCache) Invalidate(key string)

Invalidate removes a key from cache

func (*EtcdCache) Put

func (e *EtcdCache) Put(val *mvccpb.KeyValue)

Put allows to add a new record

Jump to

Keyboard shortcuts

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