datastore

package
v0.5.1 Latest Latest
Warning

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

Go to latest
Published: Jul 31, 2020 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type KVStore

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

KVStore is the key value datastore

func NewKVStore

func NewKVStore(path string) (*KVStore, error)

NewKVStore creates a new key value datastore

func (*KVStore) GarbageCollect added in v0.3.0

func (s *KVStore) GarbageCollect() error

GarbageCollect cleans up old values in log files

func (*KVStore) Get

Get retrieves key values from the datastore.

func (*KVStore) Set

func (s *KVStore) Set(request *apiv1.SetValuesRequest) error

Set sets key values in the datastore.

func (*KVStore) Subscribe

func (s *KVStore) Subscribe(ctx context.Context, subscription *apiv1.SubscribeRequest, cb func(*apiv1.SubscribeResponse) error) error

Subscribe will subscribe to prefixes in the key value store. This will block until there is an error or the context is cancelled

Jump to

Keyboard shortcuts

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