moss

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Jun 16, 2016 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const Name = "moss"

Variables

View Source
var RegistryCollectionOptions = map[string]moss.CollectionOptions{}

RegistryCollectionOptions should be treated as read-only after process init()'ialization.

Functions

func InitMossStore added in v0.3.0

func InitMossStore(config map[string]interface{}, options moss.CollectionOptions) (
	moss.Snapshot, moss.LowerLevelUpdate, store.KVStore, error)

func New

func New(mo store.MergeOperator, config map[string]interface{}) (
	store.KVStore, error)

New initializes a moss storage with values from the optional config["mossCollectionOptions"] (a JSON moss.CollectionOptions). Next, values from the RegistryCollectionOptions, named by the optional config["mossCollectionOptionsName"], take precedence. Finally, base case defaults are taken from moss.DefaultCollectionOptions.

Types

type Batch

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

func (*Batch) Close

func (b *Batch) Close() error

func (*Batch) Delete

func (b *Batch) Delete(key []byte)

func (*Batch) Merge

func (b *Batch) Merge(key, val []byte)

func (*Batch) Reset

func (b *Batch) Reset()

func (*Batch) Set

func (b *Batch) Set(key, val []byte)

type Iterator

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

func (*Iterator) Close

func (x *Iterator) Close() error

func (*Iterator) Current

func (x *Iterator) Current() ([]byte, []byte, bool)

func (*Iterator) Key

func (x *Iterator) Key() []byte

func (*Iterator) Next

func (x *Iterator) Next()

func (*Iterator) Seek

func (x *Iterator) Seek(seekToKey []byte)

func (*Iterator) Valid

func (x *Iterator) Valid() bool

func (*Iterator) Value

func (x *Iterator) Value() []byte

type Reader

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

func (*Reader) Close

func (r *Reader) Close() error

func (*Reader) Get

func (r *Reader) Get(k []byte) (v []byte, err error)

func (*Reader) MultiGet

func (r *Reader) MultiGet(keys [][]byte) ([][]byte, error)

func (*Reader) PrefixIterator

func (r *Reader) PrefixIterator(k []byte) store.KVIterator

func (*Reader) RangeIterator

func (r *Reader) RangeIterator(start, end []byte) store.KVIterator

type Store

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

func (*Store) Close

func (s *Store) Close() error

func (*Store) Logf

func (s *Store) Logf(fmt string, args ...interface{})

func (*Store) Reader

func (s *Store) Reader() (store.KVReader, error)

func (*Store) Stats

func (s *Store) Stats() json.Marshaler

func (*Store) StatsMap

func (s *Store) StatsMap() map[string]interface{}

func (*Store) Writer

func (s *Store) Writer() (store.KVWriter, error)

type Writer

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

func (*Writer) Close

func (w *Writer) Close() error

func (*Writer) ExecuteBatch

func (w *Writer) ExecuteBatch(b store.KVBatch) (err error)

func (*Writer) NewBatch

func (w *Writer) NewBatch() store.KVBatch

func (*Writer) NewBatchEx

func (w *Writer) NewBatchEx(options store.KVBatchOptions) (
	[]byte, store.KVBatch, error)

Jump to

Keyboard shortcuts

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