Documentation ¶
Index ¶
- type BufferedKVStoreAccess
- func (b *BufferedKVStoreAccess) ClearMutations()
- func (b *BufferedKVStoreAccess) Copy() *BufferedKVStoreAccess
- func (b *BufferedKVStoreAccess) DangerouslyDumpToDict() dict.Dict
- func (b *BufferedKVStoreAccess) DangerouslyDumpToString() string
- func (b *BufferedKVStoreAccess) Del(key kv.Key)
- func (b *BufferedKVStoreAccess) Get(key kv.Key) ([]byte, error)
- func (b *BufferedKVStoreAccess) Has(key kv.Key) (bool, error)
- func (b *BufferedKVStoreAccess) Iterate(prefix kv.Key, f func(key kv.Key, value []byte) bool) error
- func (b *BufferedKVStoreAccess) IterateKeys(prefix kv.Key, f func(key kv.Key) bool) error
- func (b *BufferedKVStoreAccess) IterateKeysSorted(prefix kv.Key, f func(key kv.Key) bool) error
- func (b *BufferedKVStoreAccess) IterateSorted(prefix kv.Key, f func(key kv.Key, value []byte) bool) error
- func (b *BufferedKVStoreAccess) MustGet(key kv.Key) []byte
- func (b *BufferedKVStoreAccess) MustHas(key kv.Key) bool
- func (b *BufferedKVStoreAccess) MustIterate(prefix kv.Key, f func(key kv.Key, value []byte) bool)
- func (b *BufferedKVStoreAccess) MustIterateKeys(prefix kv.Key, f func(key kv.Key) bool)
- func (b *BufferedKVStoreAccess) MustIterateKeysSorted(prefix kv.Key, f func(key kv.Key) bool)
- func (b *BufferedKVStoreAccess) MustIterateSorted(prefix kv.Key, f func(key kv.Key, value []byte) bool)
- func (b *BufferedKVStoreAccess) Mutations() *Mutations
- func (b *BufferedKVStoreAccess) Set(key kv.Key, value []byte)
- type Mutations
- func (ms *Mutations) Apply(kvw kv.KVWriter)
- 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) IsModified() bool
- func (ms *Mutations) Read(r io.Reader) error
- func (ms *Mutations) ResetModified()
- 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 BufferedKVStoreAccess ¶ added in v0.2.0
type BufferedKVStoreAccess struct {
// contains filtered or unexported fields
}
BufferedKVStoreAccess is a KVStore backed by a given KVStoreReader. Writes are cached in-memory; reads are delegated to the backing store for unmodified keys.
func NewBufferedKVStoreAccess ¶ added in v0.2.0
func NewBufferedKVStoreAccess(r kv.KVStoreReader) *BufferedKVStoreAccess
func (*BufferedKVStoreAccess) ClearMutations ¶ added in v0.2.0
func (b *BufferedKVStoreAccess) ClearMutations()
func (*BufferedKVStoreAccess) Copy ¶ added in v0.2.0
func (b *BufferedKVStoreAccess) Copy() *BufferedKVStoreAccess
func (*BufferedKVStoreAccess) DangerouslyDumpToDict ¶ added in v0.2.0
func (b *BufferedKVStoreAccess) DangerouslyDumpToDict() dict.Dict
DangerouslyDumpToDict returns a Dict with the whole contents of the backing store + applied mutations.
func (*BufferedKVStoreAccess) DangerouslyDumpToString ¶ added in v0.2.0
func (b *BufferedKVStoreAccess) DangerouslyDumpToString() string
iterates over all key-value pairs in KVStore
func (*BufferedKVStoreAccess) Del ¶ added in v0.2.0
func (b *BufferedKVStoreAccess) Del(key kv.Key)
func (*BufferedKVStoreAccess) Get ¶ added in v0.2.0
func (b *BufferedKVStoreAccess) Get(key kv.Key) ([]byte, error)
func (*BufferedKVStoreAccess) Has ¶ added in v0.2.0
func (b *BufferedKVStoreAccess) Has(key kv.Key) (bool, error)
func (*BufferedKVStoreAccess) IterateKeys ¶ added in v0.2.0
func (*BufferedKVStoreAccess) IterateKeysSorted ¶ added in v0.2.0
func (*BufferedKVStoreAccess) IterateSorted ¶ added in v0.2.0
func (*BufferedKVStoreAccess) MustGet ¶ added in v0.2.0
func (b *BufferedKVStoreAccess) MustGet(key kv.Key) []byte
func (*BufferedKVStoreAccess) MustHas ¶ added in v0.2.0
func (b *BufferedKVStoreAccess) MustHas(key kv.Key) bool
func (*BufferedKVStoreAccess) MustIterate ¶ added in v0.2.0
func (*BufferedKVStoreAccess) MustIterateKeys ¶ added in v0.2.0
func (*BufferedKVStoreAccess) MustIterateKeysSorted ¶ added in v0.2.0
func (*BufferedKVStoreAccess) MustIterateSorted ¶ added in v0.2.0
func (*BufferedKVStoreAccess) Mutations ¶ added in v0.2.0
func (b *BufferedKVStoreAccess) Mutations() *Mutations
type Mutations ¶ added in v0.2.0
type Mutations struct { Sets map[kv.Key][]byte Dels map[kv.Key]struct{} // contains filtered or unexported fields }
Mutations is a set of mutations: one for each key It provides a deterministic serialization
func NewMutations ¶ added in v0.2.0
func NewMutations() *Mutations
func (*Mutations) DelsSorted ¶ added in v0.2.0
func (*Mutations) IsModified ¶ added in v0.2.0
func (*Mutations) ResetModified ¶ added in v0.2.0
func (ms *Mutations) ResetModified()
func (*Mutations) SetsSorted ¶ added in v0.2.0
Click to show internal directories.
Click to hide internal directories.