broker

package
v0.10.3-0...-930112e Latest Latest
Warning

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

Go to latest
Published: Nov 23, 2024 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Broker

type Broker interface {
	DataCoord
}

Broker is the interface for datanode to interact with other components.

func NewCoordBroker

func NewCoordBroker(dc types.DataCoordClient, serverID int64) Broker

type DataCoord

type DataCoord interface {
	AssignSegmentID(ctx context.Context, reqs ...*datapb.SegmentIDRequest) ([]typeutil.UniqueID, error)
	ReportTimeTick(ctx context.Context, msgs []*msgpb.DataNodeTtMsg) error
	GetSegmentInfo(ctx context.Context, segmentIDs []int64) ([]*datapb.SegmentInfo, error)
	UpdateChannelCheckpoint(ctx context.Context, channelCPs []*msgpb.MsgPosition) error
	SaveBinlogPaths(ctx context.Context, req *datapb.SaveBinlogPathsRequest) error
	DropVirtualChannel(ctx context.Context, req *datapb.DropVirtualChannelRequest) (*datapb.DropVirtualChannelResponse, error)
	UpdateSegmentStatistics(ctx context.Context, req *datapb.UpdateSegmentStatisticsRequest) error
}

DataCoord is the interface wraps `DataCoord` grpc call

type MockBroker

type MockBroker struct {
	mock.Mock
}

MockBroker is an autogenerated mock type for the Broker type

func NewMockBroker

func NewMockBroker(t interface {
	mock.TestingT
	Cleanup(func())
}) *MockBroker

NewMockBroker creates a new instance of MockBroker. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.

func (*MockBroker) AssignSegmentID

func (_m *MockBroker) AssignSegmentID(ctx context.Context, reqs ...*datapb.SegmentIDRequest) ([]int64, error)

AssignSegmentID provides a mock function with given fields: ctx, reqs

func (*MockBroker) DropVirtualChannel

DropVirtualChannel provides a mock function with given fields: ctx, req

func (*MockBroker) EXPECT

func (_m *MockBroker) EXPECT() *MockBroker_Expecter

func (*MockBroker) GetSegmentInfo

func (_m *MockBroker) GetSegmentInfo(ctx context.Context, segmentIDs []int64) ([]*datapb.SegmentInfo, error)

GetSegmentInfo provides a mock function with given fields: ctx, segmentIDs

func (*MockBroker) ReportTimeTick

func (_m *MockBroker) ReportTimeTick(ctx context.Context, msgs []*msgpb.DataNodeTtMsg) error

ReportTimeTick provides a mock function with given fields: ctx, msgs

func (*MockBroker) SaveBinlogPaths

func (_m *MockBroker) SaveBinlogPaths(ctx context.Context, req *datapb.SaveBinlogPathsRequest) error

SaveBinlogPaths provides a mock function with given fields: ctx, req

func (*MockBroker) UpdateChannelCheckpoint

func (_m *MockBroker) UpdateChannelCheckpoint(ctx context.Context, channelCPs []*msgpb.MsgPosition) error

UpdateChannelCheckpoint provides a mock function with given fields: ctx, channelCPs

func (*MockBroker) UpdateSegmentStatistics

func (_m *MockBroker) UpdateSegmentStatistics(ctx context.Context, req *datapb.UpdateSegmentStatisticsRequest) error

UpdateSegmentStatistics provides a mock function with given fields: ctx, req

type MockBroker_AssignSegmentID_Call

type MockBroker_AssignSegmentID_Call struct {
	*mock.Call
}

MockBroker_AssignSegmentID_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'AssignSegmentID'

func (*MockBroker_AssignSegmentID_Call) Return

func (*MockBroker_AssignSegmentID_Call) Run

func (*MockBroker_AssignSegmentID_Call) RunAndReturn

type MockBroker_DropVirtualChannel_Call

type MockBroker_DropVirtualChannel_Call struct {
	*mock.Call
}

MockBroker_DropVirtualChannel_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DropVirtualChannel'

func (*MockBroker_DropVirtualChannel_Call) Return

func (*MockBroker_DropVirtualChannel_Call) Run

type MockBroker_Expecter

type MockBroker_Expecter struct {
	// contains filtered or unexported fields
}

func (*MockBroker_Expecter) AssignSegmentID

func (_e *MockBroker_Expecter) AssignSegmentID(ctx interface{}, reqs ...interface{}) *MockBroker_AssignSegmentID_Call

AssignSegmentID is a helper method to define mock.On call

  • ctx context.Context
  • reqs ...*datapb.SegmentIDRequest

func (*MockBroker_Expecter) DropVirtualChannel

func (_e *MockBroker_Expecter) DropVirtualChannel(ctx interface{}, req interface{}) *MockBroker_DropVirtualChannel_Call

DropVirtualChannel is a helper method to define mock.On call

  • ctx context.Context
  • req *datapb.DropVirtualChannelRequest

func (*MockBroker_Expecter) GetSegmentInfo

func (_e *MockBroker_Expecter) GetSegmentInfo(ctx interface{}, segmentIDs interface{}) *MockBroker_GetSegmentInfo_Call

GetSegmentInfo is a helper method to define mock.On call

  • ctx context.Context
  • segmentIDs []int64

func (*MockBroker_Expecter) ReportTimeTick

func (_e *MockBroker_Expecter) ReportTimeTick(ctx interface{}, msgs interface{}) *MockBroker_ReportTimeTick_Call

ReportTimeTick is a helper method to define mock.On call

  • ctx context.Context
  • msgs []*msgpb.DataNodeTtMsg

func (*MockBroker_Expecter) SaveBinlogPaths

func (_e *MockBroker_Expecter) SaveBinlogPaths(ctx interface{}, req interface{}) *MockBroker_SaveBinlogPaths_Call

SaveBinlogPaths is a helper method to define mock.On call

  • ctx context.Context
  • req *datapb.SaveBinlogPathsRequest

func (*MockBroker_Expecter) UpdateChannelCheckpoint

func (_e *MockBroker_Expecter) UpdateChannelCheckpoint(ctx interface{}, channelCPs interface{}) *MockBroker_UpdateChannelCheckpoint_Call

UpdateChannelCheckpoint is a helper method to define mock.On call

  • ctx context.Context
  • channelCPs []*msgpb.MsgPosition

func (*MockBroker_Expecter) UpdateSegmentStatistics

func (_e *MockBroker_Expecter) UpdateSegmentStatistics(ctx interface{}, req interface{}) *MockBroker_UpdateSegmentStatistics_Call

UpdateSegmentStatistics is a helper method to define mock.On call

  • ctx context.Context
  • req *datapb.UpdateSegmentStatisticsRequest

type MockBroker_GetSegmentInfo_Call

type MockBroker_GetSegmentInfo_Call struct {
	*mock.Call
}

MockBroker_GetSegmentInfo_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetSegmentInfo'

func (*MockBroker_GetSegmentInfo_Call) Return

func (*MockBroker_GetSegmentInfo_Call) Run

func (*MockBroker_GetSegmentInfo_Call) RunAndReturn

type MockBroker_ReportTimeTick_Call

type MockBroker_ReportTimeTick_Call struct {
	*mock.Call
}

MockBroker_ReportTimeTick_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ReportTimeTick'

func (*MockBroker_ReportTimeTick_Call) Return

func (*MockBroker_ReportTimeTick_Call) Run

func (*MockBroker_ReportTimeTick_Call) RunAndReturn

type MockBroker_SaveBinlogPaths_Call

type MockBroker_SaveBinlogPaths_Call struct {
	*mock.Call
}

MockBroker_SaveBinlogPaths_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SaveBinlogPaths'

func (*MockBroker_SaveBinlogPaths_Call) Return

func (*MockBroker_SaveBinlogPaths_Call) Run

func (*MockBroker_SaveBinlogPaths_Call) RunAndReturn

type MockBroker_UpdateChannelCheckpoint_Call

type MockBroker_UpdateChannelCheckpoint_Call struct {
	*mock.Call
}

MockBroker_UpdateChannelCheckpoint_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UpdateChannelCheckpoint'

func (*MockBroker_UpdateChannelCheckpoint_Call) Return

func (*MockBroker_UpdateChannelCheckpoint_Call) Run

func (*MockBroker_UpdateChannelCheckpoint_Call) RunAndReturn

type MockBroker_UpdateSegmentStatistics_Call

type MockBroker_UpdateSegmentStatistics_Call struct {
	*mock.Call
}

MockBroker_UpdateSegmentStatistics_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UpdateSegmentStatistics'

func (*MockBroker_UpdateSegmentStatistics_Call) Return

func (*MockBroker_UpdateSegmentStatistics_Call) Run

Jump to

Keyboard shortcuts

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