store

package
v0.0.0-...-76270ce Latest Latest
Warning

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

Go to latest
Published: Mar 18, 2015 License: Apache-2.0 Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AssociativeMerge

type AssociativeMerge interface {
	Merge(key, existing []byte) ([]byte, error)
}

type AssociativeMergeChain

type AssociativeMergeChain []AssociativeMerge

func (AssociativeMergeChain) Merge

func (a AssociativeMergeChain) Merge(key, orig []byte) ([]byte, error)

type KVBatch

type KVBatch interface {
	Set(key, val []byte)
	Delete(key []byte)
	Merge(key []byte, oper AssociativeMerge)
	Execute() error
	Close() error
}

type KVIterator

type KVIterator interface {
	SeekFirst()
	Seek([]byte)
	Next()

	Current() ([]byte, []byte, bool)
	Key() []byte
	Value() []byte
	Valid() bool

	Close() error
}

type KVReader

type KVReader interface {
	Get(key []byte) ([]byte, error)
	Iterator(key []byte) KVIterator
	Close() error
}

type KVStore

type KVStore interface {
	Writer() (KVWriter, error)
	Reader() (KVReader, error)
	Close() error
}

type KVWriter

type KVWriter interface {
	KVReader
	Set(key, val []byte) error
	Delete(key []byte) error
	NewBatch() KVBatch
}

Directories

Path Synopsis
Package cznicb provides an in-memory implementation of the KVStore interfaces using the cznic/b in-memory btree.
Package cznicb provides an in-memory implementation of the KVStore interfaces using the cznic/b in-memory btree.
Package gtreap provides an in-memory implementation of the KVStore interfaces using the gtreap balanced-binary treap, copy-on-write data structure.
Package gtreap provides an in-memory implementation of the KVStore interfaces using the gtreap balanced-binary treap, copy-on-write data structure.

Jump to

Keyboard shortcuts

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