Documentation
¶
Overview ¶
Package reportcommitter is a generated GoMock package.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func TestCommitBatch ¶ added in v0.12.0
func TestCommitBatch(t *testing.T, addr string, cb snpb.CommitBatchRequest)
func TestGetReport ¶
func TestGetReport(t *testing.T, addr string) []snpb.LogStreamUncommitReport
Types ¶
type Client ¶
type Client interface {
GetReport() (*snpb.GetReportResponse, error)
CommitBatch(snpb.CommitBatchRequest) error
Close() error
}
Client establishes a connection to a storage node for retrieving reports and sending commit results. GetReport and CommitBatch can be invoked concurrently by different goroutines. However, GetReport must not be invoked concurrently by multiple goroutines, and the same applies to CommitBatch.
func NewClientWithConn ¶
Clients connecting the same SN can use this method to multiplex streams. By doing that, it can decrease the use of channel buffer.
type MockClient ¶
type MockClient struct {
// contains filtered or unexported fields
}
MockClient is a mock of Client interface.
func NewMockClient ¶
func NewMockClient(ctrl *gomock.Controller) *MockClient
NewMockClient creates a new mock instance.
func (*MockClient) CommitBatch ¶ added in v0.7.0
func (m *MockClient) CommitBatch(arg0 snpb.CommitBatchRequest) error
CommitBatch mocks base method.
func (*MockClient) EXPECT ¶
func (m *MockClient) EXPECT() *MockClientMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockClient) GetReport ¶
func (m *MockClient) GetReport() (*snpb.GetReportResponse, error)
GetReport mocks base method.
type MockClientMockRecorder ¶
type MockClientMockRecorder struct {
// contains filtered or unexported fields
}
MockClientMockRecorder is the mock recorder for MockClient.
func (*MockClientMockRecorder) Close ¶
func (mr *MockClientMockRecorder) Close() *gomock.Call
Close indicates an expected call of Close.
func (*MockClientMockRecorder) CommitBatch ¶ added in v0.7.0
func (mr *MockClientMockRecorder) CommitBatch(arg0 any) *gomock.Call
CommitBatch indicates an expected call of CommitBatch.
func (*MockClientMockRecorder) GetReport ¶
func (mr *MockClientMockRecorder) GetReport() *gomock.Call
GetReport indicates an expected call of GetReport.