stateleveldb

package
v0.0.0-...-4278a81 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// TestEnvDBValueformat exports the constant to be used used for tests
	TestEnvDBValueformat = fullScanIteratorValueFormat
	// TestEnvDBValueDecoder exports the function for decoding the dbvalue bytes
	TestEnvDBValueDecoder = func(dbValue []byte) (*statedb.VersionedValue, error) {
		return decodeValue(dbValue)
	}
)

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) Close

func (provider *VersionedDBProvider) Close()

Close closes the underlying db

func (*VersionedDBProvider) GetDBHandle

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

GetDBHandle gets the handle to a named database

Jump to

Keyboard shortcuts

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