kvstore

package
v0.0.0-...-b178995 Latest Latest
Warning

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

Go to latest
Published: Jul 19, 2020 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const KvType = "kv"

Variables

View Source
var ErrInvalidKey = errors.New("/ is a forbidden character for keys")

Functions

This section is empty.

Types

type KvStore

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

func New

func New(logger log.Logger, dir string, blobStore store.BlobStore, metaHandler *meta.Meta) (*KvStore, error)

func (*KvStore) Close

func (kv *KvStore) Close() error

func (*KvStore) Get

func (kv *KvStore) Get(ctx context.Context, key string, version int64) (*vkv.KeyValue, error)

func (*KvStore) GetMetaBlob

func (kv *KvStore) GetMetaBlob(ctx context.Context, key string, version int64) (string, error)

func (*KvStore) Keys

func (kv *KvStore) Keys(ctx context.Context, start, end string, limit int) ([]*vkv.KeyValue, string, error)

func (*KvStore) Put

func (kv *KvStore) Put(ctx context.Context, key, ref string, data []byte, version int64) (*vkv.KeyValue, error)

func (*KvStore) ReverseKeys

func (kv *KvStore) ReverseKeys(ctx context.Context, start, end string, limit int) ([]*vkv.KeyValue, string, error)

func (*KvStore) Versions

func (kv *KvStore) Versions(ctx context.Context, key, start string, limit int) (*vkv.KeyValueVersions, string, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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