stateleveldb

package
v2.3.2 Latest Latest
Warning

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

Go to latest
Published: Nov 21, 2021 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DBValue

type DBValue struct {
	Version              []byte   `protobuf:"bytes,1,opt,name=version,proto3" json:"version,omitempty"`
	Value                []byte   `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"`
	Metadata             []byte   `protobuf:"bytes,3,opt,name=metadata,proto3" json:"metadata,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*DBValue) Descriptor

func (*DBValue) Descriptor() ([]byte, []int)

func (*DBValue) GetMetadata

func (m *DBValue) GetMetadata() []byte

func (*DBValue) GetValue

func (m *DBValue) GetValue() []byte

func (*DBValue) GetVersion

func (m *DBValue) GetVersion() []byte

func (*DBValue) ProtoMessage

func (*DBValue) ProtoMessage()

func (*DBValue) Reset

func (m *DBValue) Reset()

func (*DBValue) String

func (m *DBValue) String() string

func (*DBValue) XXX_DiscardUnknown

func (m *DBValue) XXX_DiscardUnknown()

func (*DBValue) XXX_Marshal

func (m *DBValue) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*DBValue) XXX_Merge

func (m *DBValue) XXX_Merge(src proto.Message)

func (*DBValue) XXX_Size

func (m *DBValue) XXX_Size() int

func (*DBValue) XXX_Unmarshal

func (m *DBValue) XXX_Unmarshal(b []byte) error

type TestVDBEnv

type TestVDBEnv struct {
	DBProvider *VersionedDBProvider
	// contains filtered or unexported fields
}

TestVDBEnv provides a level db backed versioned db for testing

func NewTestVDBEnv

func NewTestVDBEnv(t testing.TB) *TestVDBEnv

NewTestVDBEnv instantiates and new level db backed TestVDB

func (*TestVDBEnv) Cleanup

func (env *TestVDBEnv) Cleanup()

Cleanup closes the db and removes the db folder

type VersionedDBProvider

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

VersionedDBProvider implements interface VersionedDBProvider

func NewVersionedDBProvider

func NewVersionedDBProvider(dbPath string) (*VersionedDBProvider, error)

NewVersionedDBProvider instantiates VersionedDBProvider

func (*VersionedDBProvider) BytesKeySupported

func (provider *VersionedDBProvider) BytesKeySupported() bool

BytesKeySupported returns true if a db created supports bytes as a key

func (*VersionedDBProvider) Close

func (provider *VersionedDBProvider) Close()

Close closes the underlying db

func (*VersionedDBProvider) Drop

func (provider *VersionedDBProvider) Drop(dbName string) error

Drop drops channel-specific data from the state leveldb. It is not an error if a database does not exist.

func (*VersionedDBProvider) GetDBHandle

func (provider *VersionedDBProvider) GetDBHandle(dbName string, namespaceProvider statedb.NamespaceProvider) (statedb.VersionedDB, error)

GetDBHandle gets the handle to a named database

func (*VersionedDBProvider) ImportFromSnapshot

func (provider *VersionedDBProvider) ImportFromSnapshot(
	dbName string,
	savepoint *version.Height,
	itr statedb.FullScanIterator,
) error

ImportFromSnapshot loads the public state and pvtdata hashes from the snapshot files previously generated

Jump to

Keyboard shortcuts

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