Documentation ¶
Index ¶
- type BufferedKVStore
- func (b *BufferedKVStore) Clone() *BufferedKVStore
- func (b *BufferedKVStore) DangerouslyDumpToDict() dict.Dict
- func (b *BufferedKVStore) DangerouslyDumpToString() string
- func (b *BufferedKVStore) Del(key kv.Key)
- func (b *BufferedKVStore) Get(key kv.Key) []byte
- func (b *BufferedKVStore) Has(key kv.Key) bool
- func (b *BufferedKVStore) Iterate(prefix kv.Key, f func(key kv.Key, value []byte) bool)
- func (b *BufferedKVStore) IterateKeys(prefix kv.Key, f func(key kv.Key) bool)
- func (b *BufferedKVStore) IterateKeysSorted(prefix kv.Key, f func(key kv.Key) bool)
- func (b *BufferedKVStore) IterateSorted(prefix kv.Key, f func(key kv.Key, value []byte) bool)
- func (b *BufferedKVStore) Mutations() *Mutations
- func (b *BufferedKVStore) Set(key kv.Key, value []byte)
- func (b *BufferedKVStore) SetMutations(muts *Mutations)
- type Mutations
- func (ms *Mutations) ApplyTo(w kv.KVWriter)
- func (ms *Mutations) Bytes() []byte
- func (ms *Mutations) Clone() *Mutations
- func (ms *Mutations) Contains(k kv.Key) bool
- func (ms *Mutations) Del(k kv.Key)
- func (ms *Mutations) DelsSorted() []kv.Key
- func (ms *Mutations) Dump() string
- func (ms *Mutations) Get(k kv.Key) ([]byte, bool)
- func (ms *Mutations) IsEmpty() bool
- func (ms *Mutations) Read(r io.Reader) error
- func (ms *Mutations) Set(k kv.Key, v []byte)
- func (ms *Mutations) SetsSorted() kv.Items
- func (ms *Mutations) Write(w io.Writer) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BufferedKVStore ¶
type BufferedKVStore struct {
// contains filtered or unexported fields
}
BufferedKVStore is a KVStore backed by a given KVStoreReader. Writes are cached in-memory; reads are delegated to the backing store for unmodified keys.
func NewBufferedKVStore ¶
func NewBufferedKVStore(r kv.KVStoreReader) *BufferedKVStore
func NewBufferedKVStoreForMutations ¶ added in v1.0.3
func NewBufferedKVStoreForMutations(r kv.KVStoreReader, m *Mutations) *BufferedKVStore
func (*BufferedKVStore) Clone ¶
func (b *BufferedKVStore) Clone() *BufferedKVStore
func (*BufferedKVStore) DangerouslyDumpToDict ¶
func (b *BufferedKVStore) DangerouslyDumpToDict() dict.Dict
DangerouslyDumpToDict returns a Dict with the whole contents of the backing store + applied mutations.
func (*BufferedKVStore) DangerouslyDumpToString ¶
func (b *BufferedKVStore) DangerouslyDumpToString() string
iterates over all key-value pairs in KVStore
func (*BufferedKVStore) Del ¶ added in v1.0.3
func (b *BufferedKVStore) Del(key kv.Key)
func (*BufferedKVStore) IterateKeys ¶ added in v1.0.3
func (*BufferedKVStore) IterateKeysSorted ¶ added in v1.0.3
func (*BufferedKVStore) IterateSorted ¶ added in v1.0.3
func (*BufferedKVStore) Mutations ¶
func (b *BufferedKVStore) Mutations() *Mutations
func (*BufferedKVStore) Set ¶ added in v1.0.3
func (b *BufferedKVStore) Set(key kv.Key, value []byte)
func (*BufferedKVStore) SetMutations ¶ added in v1.0.3
func (b *BufferedKVStore) SetMutations(muts *Mutations)
type Mutations ¶ added in v0.2.0
Mutations is a set of mutations: one for each key It provides a deterministic serialization
func MutationsFromBytes ¶ added in v1.0.3
func NewMutations ¶ added in v0.2.0
func NewMutations() *Mutations
func (*Mutations) DelsSorted ¶ added in v0.2.0
func (*Mutations) SetsSorted ¶ added in v0.2.0
Click to show internal directories.
Click to hide internal directories.