buffered

package
v0.3.8 Latest Latest
Warning

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

Go to latest
Published: Oct 18, 2022 License: Apache-2.0, BSD-2-Clause Imports: 9 Imported by: 0

Documentation

Index

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 (*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) Iterate added in v0.2.0

func (b *BufferedKVStoreAccess) Iterate(prefix kv.Key, f func(key kv.Key, value []byte) bool) error

func (*BufferedKVStoreAccess) IterateKeys added in v0.2.0

func (b *BufferedKVStoreAccess) IterateKeys(prefix kv.Key, f func(key kv.Key) bool) error

func (*BufferedKVStoreAccess) IterateKeysSorted added in v0.2.0

func (b *BufferedKVStoreAccess) IterateKeysSorted(prefix kv.Key, f func(key kv.Key) bool) error

func (*BufferedKVStoreAccess) IterateSorted added in v0.2.0

func (b *BufferedKVStoreAccess) IterateSorted(prefix kv.Key, f func(key kv.Key, value []byte) bool) error

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 (b *BufferedKVStoreAccess) MustIterate(prefix kv.Key, f func(key kv.Key, value []byte) bool)

func (*BufferedKVStoreAccess) MustIterateKeys added in v0.2.0

func (b *BufferedKVStoreAccess) MustIterateKeys(prefix kv.Key, f func(key kv.Key) bool)

func (*BufferedKVStoreAccess) MustIterateKeysSorted added in v0.2.0

func (b *BufferedKVStoreAccess) MustIterateKeysSorted(prefix kv.Key, f func(key kv.Key) bool)

func (*BufferedKVStoreAccess) MustIterateSorted added in v0.2.0

func (b *BufferedKVStoreAccess) MustIterateSorted(prefix kv.Key, f func(key kv.Key, value []byte) bool)

func (*BufferedKVStoreAccess) Mutations added in v0.2.0

func (b *BufferedKVStoreAccess) Mutations() *Mutations

func (*BufferedKVStoreAccess) Set added in v0.2.0

func (b *BufferedKVStoreAccess) Set(key kv.Key, value []byte)

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) Apply added in v0.3.0

func (ms *Mutations) Apply(kvw kv.KVWriter)

func (*Mutations) ApplyTo added in v0.2.0

func (ms *Mutations) ApplyTo(w kv.KVWriter)

func (*Mutations) Bytes added in v0.2.0

func (ms *Mutations) Bytes() []byte

func (*Mutations) Clone added in v0.2.0

func (ms *Mutations) Clone() *Mutations

func (*Mutations) Contains added in v0.2.0

func (ms *Mutations) Contains(k kv.Key) bool

func (*Mutations) Del added in v0.2.0

func (ms *Mutations) Del(k kv.Key)

func (*Mutations) DelsSorted added in v0.2.0

func (ms *Mutations) DelsSorted() []kv.Key

func (*Mutations) Dump added in v0.3.0

func (ms *Mutations) Dump() string

func (*Mutations) Get added in v0.2.0

func (ms *Mutations) Get(k kv.Key) ([]byte, bool)

func (*Mutations) IsEmpty added in v0.2.0

func (ms *Mutations) IsEmpty() bool

func (*Mutations) IsModified added in v0.2.0

func (ms *Mutations) IsModified() bool

func (*Mutations) Read added in v0.2.0

func (ms *Mutations) Read(r io.Reader) error

func (*Mutations) ResetModified added in v0.2.0

func (ms *Mutations) ResetModified()

func (*Mutations) Set added in v0.2.0

func (ms *Mutations) Set(k kv.Key, v []byte)

func (*Mutations) SetsSorted added in v0.2.0

func (ms *Mutations) SetsSorted() kv.Items

func (*Mutations) Write added in v0.2.0

func (ms *Mutations) Write(w io.Writer) error

Jump to

Keyboard shortcuts

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