tree

package
v1.1.8-pre-alpha.5 Latest Latest
Warning

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

Go to latest
Published: Jul 3, 2020 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ImmutableTree

type ImmutableTree struct {
	// contains filtered or unexported fields
}

func (*ImmutableTree) Get

func (t *ImmutableTree) Get(key []byte) (index int64, value []byte)

func (*ImmutableTree) Hash

func (t *ImmutableTree) Hash() []byte

func (*ImmutableTree) Iterate

func (t *ImmutableTree) Iterate(fn func(key []byte, value []byte) bool) (stopped bool)

func (*ImmutableTree) Version

func (t *ImmutableTree) Version() int64

type MTree added in v1.2.0

type MTree interface {
	ReadOnlyTree
	Set(key, value []byte) bool
	Remove(key []byte) ([]byte, bool)
	LoadVersion(targetVersion int64) (int64, error)
	LazyLoadVersion(targetVersion int64) (int64, error)
	SaveVersion() ([]byte, int64, error)
	DeleteVersion(version int64) error
	GetImmutable() *ImmutableTree
	GetImmutableAtHeight(version int64) (*ImmutableTree, error)
}

func NewMutableTree

func NewMutableTree(height uint64, db dbm.DB, cacheSize int) MTree

type ReadOnlyTree added in v1.2.0

type ReadOnlyTree interface {
	Get(key []byte) (index int64, value []byte)
	Version() int64
	Hash() []byte
	Iterate(fn func(key []byte, value []byte) bool) (stopped bool)
	KeepLastHeight() int64
	AvailableVersions() []int
}

Jump to

Keyboard shortcuts

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