reportcommitter

package
v0.20.0 Latest Latest
Warning

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

Go to latest
Published: Mar 5, 2024 License: Apache-2.0 Imports: 11 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 TestCommit

func TestCommit(t *testing.T, addr string, cr snpb.CommitRequest)

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)
	Commit(snpb.CommitRequest) error
	CommitBatch(snpb.CommitBatchRequest) error
	Close() error
}

Client contains the functionality of bi-directional communication about local log stream and global log stream.

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

func (m *MockClient) Commit(arg0 snpb.CommitRequest) error

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

func (mr *MockClientMockRecorder) Commit(arg0 any) *gomock.Call

Commit indicates an expected call of Commit.

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