Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func EmulatedMergeSingle ¶
func EmulatedMergeSingle(writer KVWriter, mo MergeOperator, key []byte, operand []byte) error
EmulatedMergeSingle removes some duplicated code across KV stores which do not support merge operations on their own. It is up to the caller to ensure that an appropriate lock has been acquired in order for this behavior to be valid
Types ¶
type EmulatedBatch ¶
type EmulatedBatch struct {
// contains filtered or unexported fields
}
func NewEmulatedBatch ¶
func NewEmulatedBatch(w KVWriter, mo MergeOperator) *EmulatedBatch
func (*EmulatedBatch) Close ¶
func (b *EmulatedBatch) Close() error
func (*EmulatedBatch) Delete ¶
func (b *EmulatedBatch) Delete(key []byte)
func (*EmulatedBatch) Execute ¶
func (b *EmulatedBatch) Execute() error
func (*EmulatedBatch) Merge ¶
func (b *EmulatedBatch) Merge(key, val []byte)
func (*EmulatedBatch) Set ¶
func (b *EmulatedBatch) Set(key, val []byte)
type EmulatedMerge ¶
type EmulatedMerge struct {
// contains filtered or unexported fields
}
func NewEmulatedMerge ¶
func NewEmulatedMerge(mo MergeOperator) *EmulatedMerge
func (*EmulatedMerge) Execute ¶
func (m *EmulatedMerge) Execute(w KVWriter) error
func (*EmulatedMerge) ExecuteDeferred ¶
func (m *EmulatedMerge) ExecuteDeferred(w KVWriter) ([]*op, error)
func (*EmulatedMerge) Merge ¶
func (m *EmulatedMerge) Merge(key, val []byte)
type KVIterator ¶
type MergeOperator ¶
type MergeOperator interface { // FullMerge the full sequence of operands on top of the existingValue // if no value currently exists, existingValue is nil // return the merged value, and success/failure FullMerge(key, existingValue []byte, operands [][]byte) ([]byte, bool) // Partially merge these two operands. // If partial merge cannot be done, return nil,false, which will defer // all processing until the FullMerge is done. PartialMerge(key, leftOperand, rightOperand []byte) ([]byte, bool) // Name returns an identifier for the operator Name() string }
type RangeIterable ¶
type RangeIterable interface { // iterates keys >= start and < end RangeIterator(start, end []byte) KVIterator }
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. |
Package metrics provides a bleve.store.KVStore implementation that wraps another, real KVStore implementation, and uses go-metrics to track runtime performance metrics.
|
Package metrics provides a bleve.store.KVStore implementation that wraps another, real KVStore implementation, and uses go-metrics to track runtime performance metrics. |
Click to show internal directories.
Click to hide internal directories.