Documentation ¶
Index ¶
- type Broker
- type DataCoord
- type MockBroker
- func (_m *MockBroker) AssignSegmentID(ctx context.Context, reqs ...*datapb.SegmentIDRequest) ([]int64, error)
- func (_m *MockBroker) DropVirtualChannel(ctx context.Context, req *datapb.DropVirtualChannelRequest) (*datapb.DropVirtualChannelResponse, error)
- func (_m *MockBroker) EXPECT() *MockBroker_Expecter
- func (_m *MockBroker) GetSegmentInfo(ctx context.Context, segmentIDs []int64) ([]*datapb.SegmentInfo, error)
- func (_m *MockBroker) ReportTimeTick(ctx context.Context, msgs []*msgpb.DataNodeTtMsg) error
- func (_m *MockBroker) SaveBinlogPaths(ctx context.Context, req *datapb.SaveBinlogPathsRequest) error
- func (_m *MockBroker) UpdateChannelCheckpoint(ctx context.Context, channelCPs []*msgpb.MsgPosition) error
- func (_m *MockBroker) UpdateSegmentStatistics(ctx context.Context, req *datapb.UpdateSegmentStatisticsRequest) error
- type MockBroker_AssignSegmentID_Call
- func (_c *MockBroker_AssignSegmentID_Call) Return(_a0 []int64, _a1 error) *MockBroker_AssignSegmentID_Call
- func (_c *MockBroker_AssignSegmentID_Call) Run(run func(ctx context.Context, reqs ...*datapb.SegmentIDRequest)) *MockBroker_AssignSegmentID_Call
- func (_c *MockBroker_AssignSegmentID_Call) RunAndReturn(run func(context.Context, ...*datapb.SegmentIDRequest) ([]int64, error)) *MockBroker_AssignSegmentID_Call
- type MockBroker_DropVirtualChannel_Call
- func (_c *MockBroker_DropVirtualChannel_Call) Return(_a0 *datapb.DropVirtualChannelResponse, _a1 error) *MockBroker_DropVirtualChannel_Call
- func (_c *MockBroker_DropVirtualChannel_Call) Run(run func(ctx context.Context, req *datapb.DropVirtualChannelRequest)) *MockBroker_DropVirtualChannel_Call
- func (_c *MockBroker_DropVirtualChannel_Call) RunAndReturn(...) *MockBroker_DropVirtualChannel_Call
- type MockBroker_Expecter
- func (_e *MockBroker_Expecter) AssignSegmentID(ctx interface{}, reqs ...interface{}) *MockBroker_AssignSegmentID_Call
- func (_e *MockBroker_Expecter) DropVirtualChannel(ctx interface{}, req interface{}) *MockBroker_DropVirtualChannel_Call
- func (_e *MockBroker_Expecter) GetSegmentInfo(ctx interface{}, segmentIDs interface{}) *MockBroker_GetSegmentInfo_Call
- func (_e *MockBroker_Expecter) ReportTimeTick(ctx interface{}, msgs interface{}) *MockBroker_ReportTimeTick_Call
- func (_e *MockBroker_Expecter) SaveBinlogPaths(ctx interface{}, req interface{}) *MockBroker_SaveBinlogPaths_Call
- func (_e *MockBroker_Expecter) UpdateChannelCheckpoint(ctx interface{}, channelCPs interface{}) *MockBroker_UpdateChannelCheckpoint_Call
- func (_e *MockBroker_Expecter) UpdateSegmentStatistics(ctx interface{}, req interface{}) *MockBroker_UpdateSegmentStatistics_Call
- type MockBroker_GetSegmentInfo_Call
- func (_c *MockBroker_GetSegmentInfo_Call) Return(_a0 []*datapb.SegmentInfo, _a1 error) *MockBroker_GetSegmentInfo_Call
- func (_c *MockBroker_GetSegmentInfo_Call) Run(run func(ctx context.Context, segmentIDs []int64)) *MockBroker_GetSegmentInfo_Call
- func (_c *MockBroker_GetSegmentInfo_Call) RunAndReturn(run func(context.Context, []int64) ([]*datapb.SegmentInfo, error)) *MockBroker_GetSegmentInfo_Call
- type MockBroker_ReportTimeTick_Call
- func (_c *MockBroker_ReportTimeTick_Call) Return(_a0 error) *MockBroker_ReportTimeTick_Call
- func (_c *MockBroker_ReportTimeTick_Call) Run(run func(ctx context.Context, msgs []*msgpb.DataNodeTtMsg)) *MockBroker_ReportTimeTick_Call
- func (_c *MockBroker_ReportTimeTick_Call) RunAndReturn(run func(context.Context, []*msgpb.DataNodeTtMsg) error) *MockBroker_ReportTimeTick_Call
- type MockBroker_SaveBinlogPaths_Call
- func (_c *MockBroker_SaveBinlogPaths_Call) Return(_a0 error) *MockBroker_SaveBinlogPaths_Call
- func (_c *MockBroker_SaveBinlogPaths_Call) Run(run func(ctx context.Context, req *datapb.SaveBinlogPathsRequest)) *MockBroker_SaveBinlogPaths_Call
- func (_c *MockBroker_SaveBinlogPaths_Call) RunAndReturn(run func(context.Context, *datapb.SaveBinlogPathsRequest) error) *MockBroker_SaveBinlogPaths_Call
- type MockBroker_UpdateChannelCheckpoint_Call
- func (_c *MockBroker_UpdateChannelCheckpoint_Call) Return(_a0 error) *MockBroker_UpdateChannelCheckpoint_Call
- func (_c *MockBroker_UpdateChannelCheckpoint_Call) Run(run func(ctx context.Context, channelCPs []*msgpb.MsgPosition)) *MockBroker_UpdateChannelCheckpoint_Call
- func (_c *MockBroker_UpdateChannelCheckpoint_Call) RunAndReturn(run func(context.Context, []*msgpb.MsgPosition) error) *MockBroker_UpdateChannelCheckpoint_Call
- type MockBroker_UpdateSegmentStatistics_Call
- func (_c *MockBroker_UpdateSegmentStatistics_Call) Return(_a0 error) *MockBroker_UpdateSegmentStatistics_Call
- func (_c *MockBroker_UpdateSegmentStatistics_Call) Run(run func(ctx context.Context, req *datapb.UpdateSegmentStatisticsRequest)) *MockBroker_UpdateSegmentStatistics_Call
- func (_c *MockBroker_UpdateSegmentStatistics_Call) RunAndReturn(run func(context.Context, *datapb.UpdateSegmentStatisticsRequest) error) *MockBroker_UpdateSegmentStatistics_Call
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 ¶
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 ¶
func (_m *MockBroker) DropVirtualChannel(ctx context.Context, req *datapb.DropVirtualChannelRequest) (*datapb.DropVirtualChannelResponse, error)
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 ¶
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 (_c *MockBroker_AssignSegmentID_Call) Return(_a0 []int64, _a1 error) *MockBroker_AssignSegmentID_Call
func (*MockBroker_AssignSegmentID_Call) Run ¶
func (_c *MockBroker_AssignSegmentID_Call) Run(run func(ctx context.Context, reqs ...*datapb.SegmentIDRequest)) *MockBroker_AssignSegmentID_Call
func (*MockBroker_AssignSegmentID_Call) RunAndReturn ¶
func (_c *MockBroker_AssignSegmentID_Call) RunAndReturn(run func(context.Context, ...*datapb.SegmentIDRequest) ([]int64, error)) *MockBroker_AssignSegmentID_Call
type MockBroker_DropVirtualChannel_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 (_c *MockBroker_DropVirtualChannel_Call) Return(_a0 *datapb.DropVirtualChannelResponse, _a1 error) *MockBroker_DropVirtualChannel_Call
func (*MockBroker_DropVirtualChannel_Call) Run ¶
func (_c *MockBroker_DropVirtualChannel_Call) Run(run func(ctx context.Context, req *datapb.DropVirtualChannelRequest)) *MockBroker_DropVirtualChannel_Call
func (*MockBroker_DropVirtualChannel_Call) RunAndReturn ¶
func (_c *MockBroker_DropVirtualChannel_Call) RunAndReturn(run func(context.Context, *datapb.DropVirtualChannelRequest) (*datapb.DropVirtualChannelResponse, error)) *MockBroker_DropVirtualChannel_Call
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 ¶
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 (_c *MockBroker_GetSegmentInfo_Call) Return(_a0 []*datapb.SegmentInfo, _a1 error) *MockBroker_GetSegmentInfo_Call
func (*MockBroker_GetSegmentInfo_Call) Run ¶
func (_c *MockBroker_GetSegmentInfo_Call) Run(run func(ctx context.Context, segmentIDs []int64)) *MockBroker_GetSegmentInfo_Call
func (*MockBroker_GetSegmentInfo_Call) RunAndReturn ¶
func (_c *MockBroker_GetSegmentInfo_Call) RunAndReturn(run func(context.Context, []int64) ([]*datapb.SegmentInfo, error)) *MockBroker_GetSegmentInfo_Call
type MockBroker_ReportTimeTick_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 (_c *MockBroker_ReportTimeTick_Call) Return(_a0 error) *MockBroker_ReportTimeTick_Call
func (*MockBroker_ReportTimeTick_Call) Run ¶
func (_c *MockBroker_ReportTimeTick_Call) Run(run func(ctx context.Context, msgs []*msgpb.DataNodeTtMsg)) *MockBroker_ReportTimeTick_Call
func (*MockBroker_ReportTimeTick_Call) RunAndReturn ¶
func (_c *MockBroker_ReportTimeTick_Call) RunAndReturn(run func(context.Context, []*msgpb.DataNodeTtMsg) error) *MockBroker_ReportTimeTick_Call
type MockBroker_SaveBinlogPaths_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 (_c *MockBroker_SaveBinlogPaths_Call) Return(_a0 error) *MockBroker_SaveBinlogPaths_Call
func (*MockBroker_SaveBinlogPaths_Call) Run ¶
func (_c *MockBroker_SaveBinlogPaths_Call) Run(run func(ctx context.Context, req *datapb.SaveBinlogPathsRequest)) *MockBroker_SaveBinlogPaths_Call
func (*MockBroker_SaveBinlogPaths_Call) RunAndReturn ¶
func (_c *MockBroker_SaveBinlogPaths_Call) RunAndReturn(run func(context.Context, *datapb.SaveBinlogPathsRequest) error) *MockBroker_SaveBinlogPaths_Call
type MockBroker_UpdateChannelCheckpoint_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 (_c *MockBroker_UpdateChannelCheckpoint_Call) Return(_a0 error) *MockBroker_UpdateChannelCheckpoint_Call
func (*MockBroker_UpdateChannelCheckpoint_Call) Run ¶
func (_c *MockBroker_UpdateChannelCheckpoint_Call) Run(run func(ctx context.Context, channelCPs []*msgpb.MsgPosition)) *MockBroker_UpdateChannelCheckpoint_Call
func (*MockBroker_UpdateChannelCheckpoint_Call) RunAndReturn ¶
func (_c *MockBroker_UpdateChannelCheckpoint_Call) RunAndReturn(run func(context.Context, []*msgpb.MsgPosition) error) *MockBroker_UpdateChannelCheckpoint_Call
type MockBroker_UpdateSegmentStatistics_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 (_c *MockBroker_UpdateSegmentStatistics_Call) Return(_a0 error) *MockBroker_UpdateSegmentStatistics_Call
func (*MockBroker_UpdateSegmentStatistics_Call) Run ¶
func (_c *MockBroker_UpdateSegmentStatistics_Call) Run(run func(ctx context.Context, req *datapb.UpdateSegmentStatisticsRequest)) *MockBroker_UpdateSegmentStatistics_Call
func (*MockBroker_UpdateSegmentStatistics_Call) RunAndReturn ¶
func (_c *MockBroker_UpdateSegmentStatistics_Call) RunAndReturn(run func(context.Context, *datapb.UpdateSegmentStatisticsRequest) error) *MockBroker_UpdateSegmentStatistics_Call