Documentation ¶
Index ¶
- Constants
- Variables
- func DeserializeFromDifference(r io.Reader, localViewID uint64) (*node, error)
- type GCProfile
- type Tree
- func (t *Tree) ApplyDiff(diff io.Reader) error
- func (t *Tree) ApplyDiffWithUpdateNotifier(diff io.Reader, updateNotifier func(key, value []byte)) error
- func (t *Tree) Checksum() [MerkleHashSize]byte
- func (t *Tree) Commit() error
- func (t *Tree) Delete(k []byte) bool
- func (t *Tree) DumpDiff(prevViewID uint64, wr io.Writer) error
- func (t *Tree) GetGCProfile(preserveDepth uint64) *GCProfile
- func (t *Tree) Insert(key, value []byte)
- func (t *Tree) Iterate(callback func(key, value []byte))
- func (t *Tree) IterateFrom(key []byte, callback func(key, value []byte) bool)
- func (t *Tree) IterateLeafDiff(prevViewID uint64, callback func(key, value []byte) bool)
- func (t *Tree) IteratePrefix(prefix []byte, callback func(key, value []byte))
- func (t *Tree) Lookup(k []byte) ([]byte, bool)
- func (t *Tree) PrintContents()
- func (t *Tree) Revert(snapshot *Tree)
- func (t *Tree) SetViewID(viewID uint64)
- func (t *Tree) Snapshot() *Tree
- func (t *Tree) WithLRUCache(size *int) *Tree
- func (t *Tree) WithMaxWriteBatchSize(maxWriteBatchSize int) *Tree
Constants ¶
View Source
const ( MerkleHashSize = 16 NodeNonLeaf nodeType = iota NodeLeafValue )
View Source
const DefaultCacheSize = 2048
View Source
const MaxWriteBatchSize = 1024
Variables ¶
View Source
var DiffsKeyPrefix = []byte("diffs:")
View Source
var GCAliveMarkPrefix = []byte("@2:")
View Source
var NextOldRootIndexKey = []byte(".next_old_root")
View Source
var NodeKeyPrefix = []byte("@1:")
View Source
var OldRootsPrefix = []byte("@3:")
View Source
var RootKey = []byte(".root")
Functions ¶
Types ¶
type GCProfile ¶
type GCProfile struct {
// contains filtered or unexported fields
}
func (*GCProfile) PerformFullGC ¶
type Tree ¶
type Tree struct {
// contains filtered or unexported fields
}
func (*Tree) ApplyDiffWithUpdateNotifier ¶
func (*Tree) Checksum ¶
func (t *Tree) Checksum() [MerkleHashSize]byte
func (*Tree) GetGCProfile ¶
func (*Tree) IterateFrom ¶
func (*Tree) IterateLeafDiff ¶
func (*Tree) IteratePrefix ¶
func (*Tree) PrintContents ¶
func (t *Tree) PrintContents()
func (*Tree) WithLRUCache ¶
func (*Tree) WithMaxWriteBatchSize ¶
Click to show internal directories.
Click to hide internal directories.