boltstore

package
v0.0.0-...-7659277 Latest Latest
Warning

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

Go to latest
Published: Feb 6, 2018 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Store

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

Store implements a kstreams.KeyValueStore backed by badger

func New

func New(name, filename string) (*Store, error)

New returns a new badger KeyValueStore that stores data in the specified filename

func (*Store) All

func (s *Store) All(callback func(key, value []byte) error) error

All provides a closure over all keys and MUST NOT return null values.

No ordering guarantees are provided.

func (*Store) ApproximateNumEntries

func (s *Store) ApproximateNumEntries() (int64, error)

ApproximateNumEntries returns the approximate count of key value mappings in the store

func (*Store) Close

func (s *Store) Close() error

Close the storage engine

func (*Store) Delete

func (s *Store) Delete(key kstreams.Encoder) ([]byte, error)

Delete the value from the store

func (*Store) Flush

func (s *Store) Flush() error

Flush any cached data

func (*Store) Get

func (s *Store) Get(key kstreams.Encoder) ([]byte, error)

Get the value corresponding to the specified key

func (*Store) IsOpen

func (s *Store) IsOpen() bool

IsOpen for reading and writing

func (*Store) IsPersistent

func (s *Store) IsPersistent() bool

IsPersistent indicates if this store is persistent or not

func (*Store) Name

func (s *Store) Name() string

Name of this store

func (*Store) Put

func (s *Store) Put(key, value kstreams.Encoder) error

Put updates the provided key value pair

func (*Store) PutAll

func (s *Store) PutAll(kvs ...kstreams.KeyValue) error

PutAll updates all the given key value pairs

func (*Store) PutIfAbsent

func (s *Store) PutIfAbsent(key, value kstreams.Encoder) error

PutIfAbsent updates the values associated with this key unless a value is already associated with the key

func (*Store) Range

func (s *Store) Range(from, to kstreams.Encoder, callback func(key, value []byte) error) error

Range over a given set of keys, inclusive. Range MUST NOT return null values.

No ordering guarantees are provided.

Jump to

Keyboard shortcuts

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