stateleveldb

package
v1.5.6 Latest Latest
Warning

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

Go to latest
Published: Oct 3, 2021 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 added in v1.5.6

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 added in v1.5.6

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

func (*DBValue) GetMetadata added in v1.5.6

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

func (*DBValue) GetValue added in v1.5.6

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

func (*DBValue) GetVersion added in v1.5.6

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

func (*DBValue) ProtoMessage added in v1.5.6

func (*DBValue) ProtoMessage()

func (*DBValue) Reset added in v1.5.6

func (m *DBValue) Reset()

func (*DBValue) String added in v1.5.6

func (m *DBValue) String() string

func (*DBValue) XXX_DiscardUnknown added in v1.5.6

func (m *DBValue) XXX_DiscardUnknown()

func (*DBValue) XXX_Marshal added in v1.5.6

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

func (*DBValue) XXX_Merge added in v1.5.6

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

func (*DBValue) XXX_Size added in v1.5.6

func (m *DBValue) XXX_Size() int

func (*DBValue) XXX_Unmarshal added in v1.5.6

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