Documentation ¶
Overview ¶
Package buffer provides a sorted.KeyValue implementation that buffers one KeyValue implementation in front of an another. It's used for cases such as reindexing where you need a KeyValue but it doesn't need to be flushed and consistent until the end.
Index ¶
- type KeyValue
- func (kv *KeyValue) BeginBatch() sorted.BatchMutation
- func (kv *KeyValue) Close() error
- func (kv *KeyValue) CommitBatch(bm sorted.BatchMutation) error
- func (kv *KeyValue) Delete(key string) error
- func (kv *KeyValue) Find(start, end string) sorted.Iterator
- func (kv *KeyValue) Flush() error
- func (kv *KeyValue) Get(key string) (string, error)
- func (kv *KeyValue) Set(key, value string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type KeyValue ¶
type KeyValue struct {
// contains filtered or unexported fields
}
func New ¶
New returnes a sorted.KeyValue implementation that adds a Flush method to flush the buffer to the backing storage. A flush will also be performed when maxBufferBytes are reached. If maxBufferBytes <= 0, no automatic flushing is performed.
func (*KeyValue) BeginBatch ¶
func (kv *KeyValue) BeginBatch() sorted.BatchMutation
func (*KeyValue) CommitBatch ¶
func (kv *KeyValue) CommitBatch(bm sorted.BatchMutation) error
Click to show internal directories.
Click to hide internal directories.