types

package
v0.0.46 Latest Latest
Warning

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

Go to latest
Published: Nov 27, 2024 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Committer

type Committer interface {
	Initialize(initialStores []string)

	Commit() (int64, error)

	Version() int64

	GetLatestVersion() (int64, error)

	ApplyChangeSets(cs []*proto.NamedChangeSet) error

	ApplyUpgrades(upgrades []*proto.TreeNameUpgrade) error

	WorkingCommitInfo() *proto.CommitInfo

	LastCommitInfo() *proto.CommitInfo

	LoadVersion(targetVersion int64, copyExisting bool) (Committer, error)

	Rollback(targetVersion int64) error

	SetInitialVersion(initialVersion int64) error

	GetTreeByName(name string) Tree

	Importer(version int64) (Importer, error)

	Exporter(version int64) (Exporter, error)

	io.Closer
}

type Exporter

type Exporter interface {
	Next() (interface{}, error)

	io.Closer
}

type Importer

type Importer interface {
	AddTree(name string) error

	AddNode(node *SnapshotNode)

	io.Closer
}

type SnapshotNode

type SnapshotNode struct {
	Key     []byte
	Value   []byte
	Version int64
	Height  int8
}

SnapshotNode contains import/export node data.

type Tree

type Tree interface {
	Get(key []byte) []byte

	Has(key []byte) bool

	Set(key, value []byte)

	Remove(key []byte)

	Version() int64

	RootHash() []byte

	Iterator(start, end []byte, ascending bool) dbm.Iterator

	GetProof(key []byte) *ics23.CommitmentProof

	io.Closer
}

Jump to

Keyboard shortcuts

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