store

package
v0.0.0-...-089673d Latest Latest
Warning

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

Go to latest
Published: Apr 2, 2019 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Prefixed

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

Prefixed namespaces a libkv Store instance.

func NewPrefixed

func NewPrefixed(root string, kv store.Store) *Prefixed

NewPrefixed creates a new namespaced libkv Store.

func (*Prefixed) AtomicDelete

func (ps *Prefixed) AtomicDelete(key string, previous *store.KVPair) (bool, error)

AtomicDelete passes requests to the underlying libkv implementation, appending the root to paths for isolation.

func (*Prefixed) AtomicPut

func (ps *Prefixed) AtomicPut(key string, value []byte, previous *store.KVPair, options *store.WriteOptions) (bool, *store.KVPair, error)

AtomicPut passes requests to the underlying libkv implementation, appending the root to paths for isolation.

func (*Prefixed) Close

func (ps *Prefixed) Close()

Close closes the underlying libkv client.

func (*Prefixed) Delete

func (ps *Prefixed) Delete(key string) error

Delete passes requests to the underlying libkv implementation, appending the root to paths for isolation.

func (*Prefixed) DeleteTree

func (ps *Prefixed) DeleteTree(directory string) error

DeleteTree passes requests to the underlying libkv implementation, appending the root to paths for isolation.

func (*Prefixed) Exists

func (ps *Prefixed) Exists(key string, options *store.ReadOptions) (bool, error)

Exists passes requests to the underlying libkv implementation, appending the root to paths for isolation.

func (*Prefixed) Get

func (ps *Prefixed) Get(key string, options *store.ReadOptions) (*store.KVPair, error)

Get passes requests to the underlying libkv implementation, appending the root to paths for isolation.

func (*Prefixed) List

func (ps *Prefixed) List(directory string, options *store.ReadOptions) ([]*store.KVPair, error)

List passes requests to the underlying libkv implementation, appending the root to paths for isolation.

func (*Prefixed) NewLock

func (ps *Prefixed) NewLock(key string, options *store.LockOptions) (store.Locker, error)

NewLock passes requests to the underlying libkv implementation, appending the root to paths for isolation.

func (*Prefixed) Put

func (ps *Prefixed) Put(key string, value []byte, options *store.WriteOptions) error

Put passes requests to the underlying libkv implementation, appending the root to paths for isolation.

func (*Prefixed) Watch

func (ps *Prefixed) Watch(key string, stopCh <-chan struct{}, options *store.ReadOptions) (<-chan *store.KVPair, error)

Watch passes requests to the underlying libkv implementation, appending the root to paths for isolation.

func (*Prefixed) WatchTree

func (ps *Prefixed) WatchTree(directory string, stopCh <-chan struct{}, options *store.ReadOptions) (<-chan []*store.KVPair, error)

WatchTree passes requests to the underlying libkv implementation, appending the root to paths for isolation.

Jump to

Keyboard shortcuts

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