reportcommitter

package
v0.28.1 Latest Latest
Warning

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

Go to latest
Published: Jun 22, 2025 License: Apache-2.0 Imports: 9 Imported by: 0

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 NewClient

func NewClient(ctx context.Context, address string, grpcDialOptions ...grpc.DialOption) (cl Client, err error)

func NewClientWithConn

func NewClientWithConn(ctx context.Context, rpcConn *rpc.Conn) (Client, error)

Clients connecting the same SN can use this method to multiplex streams. By doing that, it can decrease the use of channel buffer.

func TestNewClient

func TestNewClient(t *testing.T, addr string) (Client, func())

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) Close

func (m *MockClient) Close() error

Close mocks base method.

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL