Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DecodeValue ¶ added in v1.2.0
DecodeValue separates the version and value from a binary value
Types ¶
type TestVDBEnv ¶
type TestVDBEnv struct { DBProvider statedb.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() *VersionedDBProvider
NewVersionedDBProvider instantiates VersionedDBProvider
func (*VersionedDBProvider) Close ¶
func (provider *VersionedDBProvider) Close()
Close closes the underlying db
func (*VersionedDBProvider) GetDBHandle ¶
func (provider *VersionedDBProvider) GetDBHandle(dbName string) (statedb.VersionedDB, error)
GetDBHandle gets the handle to a named database
Click to show internal directories.
Click to hide internal directories.