kv

package
v0.0.0-...-aff46f4 Latest Latest
Warning

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

Go to latest
Published: Aug 6, 2020 License: GPL-3.0, GPL-3.0-or-later Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrorNotFound = errors.New("talaria/kv: values not found for key")

ErrorNotFound is returned by a key value store that has no value for a key.

Functions

This section is empty.

Types

type Store

type Store interface {
	Get(ctx context.Context, key string) ([]byte, error)
	Put(ctx context.Context, key string, value []byte) error
	Delete(ctx context.Context, key string) error
}

Store is a key-value store abstraction

func NewBoltStore

func NewBoltStore(path, bucket string) (Store, error)

NewBoltStore is a simple boltdb based key-value store

func NewMemStore

func NewMemStore() Store

Jump to

Keyboard shortcuts

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