Documentation ¶
Overview ¶
Package resultdb is a generated GoMock package.
Index ¶
- type MockResultDB
- func (m *MockResultDB) Close()
- func (m *MockResultDB) CommitBlock(blockInfo *serialization.BlockWithSerializedInfo, isCache bool) error
- func (m *MockResultDB) EXPECT() *MockResultDBMockRecorder
- func (m *MockResultDB) GetLastSavepoint() (uint64, error)
- func (m *MockResultDB) GetRWSetIndex(txId string) (*store.StoreInfo, error)
- func (m *MockResultDB) GetTxRWSet(txid string) (*common.TxRWSet, error)
- func (m *MockResultDB) InitGenesis(genesisBlock *serialization.BlockWithSerializedInfo) error
- func (m *MockResultDB) RestoreBlocks(blockInfos []*serialization.BlockWithSerializedInfo) error
- func (m *MockResultDB) ShrinkBlocks(txIdsMap map[uint64][]string, height uint64, bfdbPath string) error
- type MockResultDBMockRecorder
- func (mr *MockResultDBMockRecorder) Close() *gomock.Call
- func (mr *MockResultDBMockRecorder) CommitBlock(blockInfo, isCache interface{}) *gomock.Call
- func (mr *MockResultDBMockRecorder) GetLastSavepoint() *gomock.Call
- func (mr *MockResultDBMockRecorder) GetRWSetIndex(txId interface{}) *gomock.Call
- func (mr *MockResultDBMockRecorder) GetTxRWSet(txid interface{}) *gomock.Call
- func (mr *MockResultDBMockRecorder) InitGenesis(genesisBlock interface{}) *gomock.Call
- func (mr *MockResultDBMockRecorder) RestoreBlocks(blockInfos interface{}) *gomock.Call
- func (mr *MockResultDBMockRecorder) ShrinkBlocks(txIdsMap, height, bfdbPath interface{}) *gomock.Call
- type ResultDB
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MockResultDB ¶ added in v2.3.4
type MockResultDB struct {
// contains filtered or unexported fields
}
MockResultDB is a mock of ResultDB interface.
func NewMockResultDB ¶ added in v2.3.4
func NewMockResultDB(ctrl *gomock.Controller) *MockResultDB
NewMockResultDB creates a new mock instance.
func (*MockResultDB) Close ¶ added in v2.3.4
func (m *MockResultDB) Close()
Close mocks base method.
func (*MockResultDB) CommitBlock ¶ added in v2.3.4
func (m *MockResultDB) CommitBlock(blockInfo *serialization.BlockWithSerializedInfo, isCache bool) error
CommitBlock mocks base method.
func (*MockResultDB) EXPECT ¶ added in v2.3.4
func (m *MockResultDB) EXPECT() *MockResultDBMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockResultDB) GetLastSavepoint ¶ added in v2.3.4
func (m *MockResultDB) GetLastSavepoint() (uint64, error)
GetLastSavepoint mocks base method.
func (*MockResultDB) GetRWSetIndex ¶ added in v2.3.4
func (m *MockResultDB) GetRWSetIndex(txId string) (*store.StoreInfo, error)
GetRWSetIndex mocks base method.
func (*MockResultDB) GetTxRWSet ¶ added in v2.3.4
func (m *MockResultDB) GetTxRWSet(txid string) (*common.TxRWSet, error)
GetTxRWSet mocks base method.
func (*MockResultDB) InitGenesis ¶ added in v2.3.4
func (m *MockResultDB) InitGenesis(genesisBlock *serialization.BlockWithSerializedInfo) error
InitGenesis mocks base method.
func (*MockResultDB) RestoreBlocks ¶ added in v2.3.4
func (m *MockResultDB) RestoreBlocks(blockInfos []*serialization.BlockWithSerializedInfo) error
RestoreBlocks mocks base method.
type MockResultDBMockRecorder ¶ added in v2.3.4
type MockResultDBMockRecorder struct {
// contains filtered or unexported fields
}
MockResultDBMockRecorder is the mock recorder for MockResultDB.
func (*MockResultDBMockRecorder) Close ¶ added in v2.3.4
func (mr *MockResultDBMockRecorder) Close() *gomock.Call
Close indicates an expected call of Close.
func (*MockResultDBMockRecorder) CommitBlock ¶ added in v2.3.4
func (mr *MockResultDBMockRecorder) CommitBlock(blockInfo, isCache interface{}) *gomock.Call
CommitBlock indicates an expected call of CommitBlock.
func (*MockResultDBMockRecorder) GetLastSavepoint ¶ added in v2.3.4
func (mr *MockResultDBMockRecorder) GetLastSavepoint() *gomock.Call
GetLastSavepoint indicates an expected call of GetLastSavepoint.
func (*MockResultDBMockRecorder) GetRWSetIndex ¶ added in v2.3.4
func (mr *MockResultDBMockRecorder) GetRWSetIndex(txId interface{}) *gomock.Call
GetRWSetIndex indicates an expected call of GetRWSetIndex.
func (*MockResultDBMockRecorder) GetTxRWSet ¶ added in v2.3.4
func (mr *MockResultDBMockRecorder) GetTxRWSet(txid interface{}) *gomock.Call
GetTxRWSet indicates an expected call of GetTxRWSet.
func (*MockResultDBMockRecorder) InitGenesis ¶ added in v2.3.4
func (mr *MockResultDBMockRecorder) InitGenesis(genesisBlock interface{}) *gomock.Call
InitGenesis indicates an expected call of InitGenesis.
func (*MockResultDBMockRecorder) RestoreBlocks ¶ added in v2.3.4
func (mr *MockResultDBMockRecorder) RestoreBlocks(blockInfos interface{}) *gomock.Call
RestoreBlocks indicates an expected call of RestoreBlocks.
func (*MockResultDBMockRecorder) ShrinkBlocks ¶ added in v2.3.4
func (mr *MockResultDBMockRecorder) ShrinkBlocks(txIdsMap, height, bfdbPath interface{}) *gomock.Call
ShrinkBlocks indicates an expected call of ShrinkBlocks.
type ResultDB ¶
type ResultDB interface { InitGenesis(genesisBlock *serialization.BlockWithSerializedInfo) error // CommitBlock commits the block rwsets in an atomic operation CommitBlock(blockInfo *serialization.BlockWithSerializedInfo, isCache bool) error // ShrinkBlocks archive old blocks rwsets in an atomic operation ShrinkBlocks(txIdsMap map[uint64][]string, height uint64, bfdbPath string) error // RestoreBlocks restore blocks from outside serialized block data RestoreBlocks(blockInfos []*serialization.BlockWithSerializedInfo) error // GetTxRWSet returns an txRWSet for given txId, or returns nil if none exists. GetTxRWSet(txid string) (*commonPb.TxRWSet, error) // GetRWSetIndex returns the offset of the rwset in the file GetRWSetIndex(txId string) (*storePb.StoreInfo, error) // GetLastSavepoint returns the last block height GetLastSavepoint() (uint64, error) // Close is used to close database Close() }
ResultDB provides handle to rwSets instances