Documentation ¶
Index ¶
- type ImmutableTree
- func (t *ImmutableTree) DeleteVersion(version int64) error
- func (t *ImmutableTree) Get(key []byte) (index int64, value []byte)
- func (t *ImmutableTree) GetImmutable() *ImmutableTree
- func (t *ImmutableTree) GetImmutableAtHeight(version int64) (*ImmutableTree, error)
- func (t *ImmutableTree) Hash() []byte
- func (t *ImmutableTree) Iterate(fn func(key []byte, value []byte) bool) (stopped bool)
- func (t *ImmutableTree) LazyLoadVersion(targetVersion int64) (int64, error)
- func (t *ImmutableTree) LoadVersion(targetVersion int64) (int64, error)
- func (t *ImmutableTree) Remove(key []byte) ([]byte, bool)
- func (t *ImmutableTree) SaveVersion() ([]byte, int64, error)
- func (t *ImmutableTree) Set(key, value []byte) bool
- func (t *ImmutableTree) Version() int64
- type MutableTree
- func (t *MutableTree) DeleteVersion(version int64) error
- func (t *MutableTree) Get(key []byte) (index int64, value []byte)
- func (t *MutableTree) GetImmutable() *ImmutableTree
- func (t *MutableTree) GetImmutableAtHeight(version int64) (*ImmutableTree, error)
- func (t *MutableTree) Hash() []byte
- func (t *MutableTree) Iterate(fn func(key []byte, value []byte) bool) (stopped bool)
- func (t *MutableTree) LazyLoadVersion(targetVersion int64) (int64, error)
- func (t *MutableTree) LoadVersion(targetVersion int64) (int64, error)
- func (t *MutableTree) Remove(key []byte) ([]byte, bool)
- func (t *MutableTree) SaveVersion() ([]byte, int64, error)
- func (t *MutableTree) Set(key, value []byte) bool
- func (t *MutableTree) Version() int64
- type Tree
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 NewImmutableTree ¶
func NewImmutableTree(db dbm.DB) *ImmutableTree
func (*ImmutableTree) DeleteVersion ¶
func (t *ImmutableTree) DeleteVersion(version int64) error
func (*ImmutableTree) GetImmutable ¶
func (t *ImmutableTree) GetImmutable() *ImmutableTree
func (*ImmutableTree) GetImmutableAtHeight ¶
func (t *ImmutableTree) GetImmutableAtHeight(version int64) (*ImmutableTree, error)
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) LazyLoadVersion ¶
func (t *ImmutableTree) LazyLoadVersion(targetVersion int64) (int64, error)
func (*ImmutableTree) LoadVersion ¶
func (t *ImmutableTree) LoadVersion(targetVersion int64) (int64, error)
func (*ImmutableTree) SaveVersion ¶
func (t *ImmutableTree) SaveVersion() ([]byte, int64, error)
func (*ImmutableTree) Set ¶
func (t *ImmutableTree) Set(key, value []byte) bool
func (*ImmutableTree) Version ¶
func (t *ImmutableTree) Version() int64
type MutableTree ¶
type MutableTree struct {
// contains filtered or unexported fields
}
func NewMutableTree ¶
func NewMutableTree(db dbm.DB, cacheSize int) *MutableTree
func (*MutableTree) DeleteVersion ¶
func (t *MutableTree) DeleteVersion(version int64) error
func (*MutableTree) GetImmutable ¶
func (t *MutableTree) GetImmutable() *ImmutableTree
func (*MutableTree) GetImmutableAtHeight ¶
func (t *MutableTree) GetImmutableAtHeight(version int64) (*ImmutableTree, error)
func (*MutableTree) Hash ¶
func (t *MutableTree) Hash() []byte
func (*MutableTree) Iterate ¶
func (t *MutableTree) Iterate(fn func(key []byte, value []byte) bool) (stopped bool)
func (*MutableTree) LazyLoadVersion ¶
func (t *MutableTree) LazyLoadVersion(targetVersion int64) (int64, error)
func (*MutableTree) LoadVersion ¶
func (t *MutableTree) LoadVersion(targetVersion int64) (int64, error)
func (*MutableTree) SaveVersion ¶
func (t *MutableTree) SaveVersion() ([]byte, int64, error)
func (*MutableTree) Set ¶
func (t *MutableTree) Set(key, value []byte) bool
func (*MutableTree) Version ¶
func (t *MutableTree) Version() int64
type Tree ¶
type Tree interface { Get(key []byte) (index int64, value []byte) 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) Version() int64 Hash() []byte Iterate(fn func(key []byte, value []byte) bool) (stopped bool) }
Click to show internal directories.
Click to hide internal directories.