Documentation ¶
Index ¶
- type DBValue
- func (*DBValue) Descriptor() ([]byte, []int)
- func (m *DBValue) GetMetadata() []byte
- func (m *DBValue) GetValue() []byte
- func (m *DBValue) GetVersion() []byte
- func (*DBValue) ProtoMessage()
- func (m *DBValue) Reset()
- func (m *DBValue) String() string
- func (m *DBValue) XXX_DiscardUnknown()
- func (m *DBValue) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *DBValue) XXX_Merge(src proto.Message)
- func (m *DBValue) XXX_Size() int
- func (m *DBValue) XXX_Unmarshal(b []byte) error
- type TestVDBEnv
- type VersionedDBProvider
- func (provider *VersionedDBProvider) BytesKeySupported() bool
- func (provider *VersionedDBProvider) Close()
- func (provider *VersionedDBProvider) Drop(dbName string) error
- func (provider *VersionedDBProvider) GetDBHandle(dbName string, namespaceProvider statedb.NamespaceProvider) (statedb.VersionedDB, error)
- func (provider *VersionedDBProvider) ImportFromSnapshot(dbName string, savepoint *version.Height, itr statedb.FullScanIterator) error
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) GetMetadata ¶
func (*DBValue) GetVersion ¶
func (*DBValue) ProtoMessage ¶
func (*DBValue) ProtoMessage()
func (*DBValue) XXX_DiscardUnknown ¶
func (m *DBValue) XXX_DiscardUnknown()
func (*DBValue) XXX_Marshal ¶
func (*DBValue) XXX_Unmarshal ¶
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