mirror of
https://gitee.com/milvus-io/milvus.git
synced 2025-12-07 01:28:27 +08:00
Due to the removal of injection and syncSegments from the compaction, we need to ensure that no compaction is successfully executed during the rolling upgrade. This PR renames Compaction to CompactionV2, with the following effects: - New datacoord + old datanode: Utilizes the CompactionV2 interface, resulting in the datanode error "CompactionV2 not implemented," causing compaction to fail; - Old datacoord + new datanode: Utilizes the CompactionV1 interface, resulting in the datanode error "CompactionV1 not implemented," causing compaction to fail. issue: https://github.com/milvus-io/milvus/issues/32809 Signed-off-by: bigsheeper <yihao.dai@zilliz.com>
1618 lines
54 KiB
Go
1618 lines
54 KiB
Go
// Code generated by mockery v2.32.4. DO NOT EDIT.
|
|
|
|
package mocks
|
|
|
|
import (
|
|
context "context"
|
|
|
|
commonpb "github.com/milvus-io/milvus-proto/go-api/v2/commonpb"
|
|
clientv3 "go.etcd.io/etcd/client/v3"
|
|
|
|
datapb "github.com/milvus-io/milvus/internal/proto/datapb"
|
|
|
|
internalpb "github.com/milvus-io/milvus/internal/proto/internalpb"
|
|
|
|
milvuspb "github.com/milvus-io/milvus-proto/go-api/v2/milvuspb"
|
|
|
|
mock "github.com/stretchr/testify/mock"
|
|
|
|
types "github.com/milvus-io/milvus/internal/types"
|
|
)
|
|
|
|
// MockDataNode is an autogenerated mock type for the DataNodeComponent type
|
|
type MockDataNode struct {
|
|
mock.Mock
|
|
}
|
|
|
|
type MockDataNode_Expecter struct {
|
|
mock *mock.Mock
|
|
}
|
|
|
|
func (_m *MockDataNode) EXPECT() *MockDataNode_Expecter {
|
|
return &MockDataNode_Expecter{mock: &_m.Mock}
|
|
}
|
|
|
|
// CheckChannelOperationProgress provides a mock function with given fields: _a0, _a1
|
|
func (_m *MockDataNode) CheckChannelOperationProgress(_a0 context.Context, _a1 *datapb.ChannelWatchInfo) (*datapb.ChannelOperationProgressResponse, error) {
|
|
ret := _m.Called(_a0, _a1)
|
|
|
|
var r0 *datapb.ChannelOperationProgressResponse
|
|
var r1 error
|
|
if rf, ok := ret.Get(0).(func(context.Context, *datapb.ChannelWatchInfo) (*datapb.ChannelOperationProgressResponse, error)); ok {
|
|
return rf(_a0, _a1)
|
|
}
|
|
if rf, ok := ret.Get(0).(func(context.Context, *datapb.ChannelWatchInfo) *datapb.ChannelOperationProgressResponse); ok {
|
|
r0 = rf(_a0, _a1)
|
|
} else {
|
|
if ret.Get(0) != nil {
|
|
r0 = ret.Get(0).(*datapb.ChannelOperationProgressResponse)
|
|
}
|
|
}
|
|
|
|
if rf, ok := ret.Get(1).(func(context.Context, *datapb.ChannelWatchInfo) error); ok {
|
|
r1 = rf(_a0, _a1)
|
|
} else {
|
|
r1 = ret.Error(1)
|
|
}
|
|
|
|
return r0, r1
|
|
}
|
|
|
|
// MockDataNode_CheckChannelOperationProgress_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CheckChannelOperationProgress'
|
|
type MockDataNode_CheckChannelOperationProgress_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// CheckChannelOperationProgress is a helper method to define mock.On call
|
|
// - _a0 context.Context
|
|
// - _a1 *datapb.ChannelWatchInfo
|
|
func (_e *MockDataNode_Expecter) CheckChannelOperationProgress(_a0 interface{}, _a1 interface{}) *MockDataNode_CheckChannelOperationProgress_Call {
|
|
return &MockDataNode_CheckChannelOperationProgress_Call{Call: _e.mock.On("CheckChannelOperationProgress", _a0, _a1)}
|
|
}
|
|
|
|
func (_c *MockDataNode_CheckChannelOperationProgress_Call) Run(run func(_a0 context.Context, _a1 *datapb.ChannelWatchInfo)) *MockDataNode_CheckChannelOperationProgress_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
run(args[0].(context.Context), args[1].(*datapb.ChannelWatchInfo))
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *MockDataNode_CheckChannelOperationProgress_Call) Return(_a0 *datapb.ChannelOperationProgressResponse, _a1 error) *MockDataNode_CheckChannelOperationProgress_Call {
|
|
_c.Call.Return(_a0, _a1)
|
|
return _c
|
|
}
|
|
|
|
func (_c *MockDataNode_CheckChannelOperationProgress_Call) RunAndReturn(run func(context.Context, *datapb.ChannelWatchInfo) (*datapb.ChannelOperationProgressResponse, error)) *MockDataNode_CheckChannelOperationProgress_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// CompactionV2 provides a mock function with given fields: _a0, _a1
|
|
func (_m *MockDataNode) CompactionV2(_a0 context.Context, _a1 *datapb.CompactionPlan) (*commonpb.Status, error) {
|
|
ret := _m.Called(_a0, _a1)
|
|
|
|
var r0 *commonpb.Status
|
|
var r1 error
|
|
if rf, ok := ret.Get(0).(func(context.Context, *datapb.CompactionPlan) (*commonpb.Status, error)); ok {
|
|
return rf(_a0, _a1)
|
|
}
|
|
if rf, ok := ret.Get(0).(func(context.Context, *datapb.CompactionPlan) *commonpb.Status); ok {
|
|
r0 = rf(_a0, _a1)
|
|
} else {
|
|
if ret.Get(0) != nil {
|
|
r0 = ret.Get(0).(*commonpb.Status)
|
|
}
|
|
}
|
|
|
|
if rf, ok := ret.Get(1).(func(context.Context, *datapb.CompactionPlan) error); ok {
|
|
r1 = rf(_a0, _a1)
|
|
} else {
|
|
r1 = ret.Error(1)
|
|
}
|
|
|
|
return r0, r1
|
|
}
|
|
|
|
// MockDataNode_CompactionV2_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CompactionV2'
|
|
type MockDataNode_CompactionV2_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// CompactionV2 is a helper method to define mock.On call
|
|
// - _a0 context.Context
|
|
// - _a1 *datapb.CompactionPlan
|
|
func (_e *MockDataNode_Expecter) CompactionV2(_a0 interface{}, _a1 interface{}) *MockDataNode_CompactionV2_Call {
|
|
return &MockDataNode_CompactionV2_Call{Call: _e.mock.On("CompactionV2", _a0, _a1)}
|
|
}
|
|
|
|
func (_c *MockDataNode_CompactionV2_Call) Run(run func(_a0 context.Context, _a1 *datapb.CompactionPlan)) *MockDataNode_CompactionV2_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
run(args[0].(context.Context), args[1].(*datapb.CompactionPlan))
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *MockDataNode_CompactionV2_Call) Return(_a0 *commonpb.Status, _a1 error) *MockDataNode_CompactionV2_Call {
|
|
_c.Call.Return(_a0, _a1)
|
|
return _c
|
|
}
|
|
|
|
func (_c *MockDataNode_CompactionV2_Call) RunAndReturn(run func(context.Context, *datapb.CompactionPlan) (*commonpb.Status, error)) *MockDataNode_CompactionV2_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// DropCompactionPlan provides a mock function with given fields: _a0, _a1
|
|
func (_m *MockDataNode) DropCompactionPlan(_a0 context.Context, _a1 *datapb.DropCompactionPlanRequest) (*commonpb.Status, error) {
|
|
ret := _m.Called(_a0, _a1)
|
|
|
|
var r0 *commonpb.Status
|
|
var r1 error
|
|
if rf, ok := ret.Get(0).(func(context.Context, *datapb.DropCompactionPlanRequest) (*commonpb.Status, error)); ok {
|
|
return rf(_a0, _a1)
|
|
}
|
|
if rf, ok := ret.Get(0).(func(context.Context, *datapb.DropCompactionPlanRequest) *commonpb.Status); ok {
|
|
r0 = rf(_a0, _a1)
|
|
} else {
|
|
if ret.Get(0) != nil {
|
|
r0 = ret.Get(0).(*commonpb.Status)
|
|
}
|
|
}
|
|
|
|
if rf, ok := ret.Get(1).(func(context.Context, *datapb.DropCompactionPlanRequest) error); ok {
|
|
r1 = rf(_a0, _a1)
|
|
} else {
|
|
r1 = ret.Error(1)
|
|
}
|
|
|
|
return r0, r1
|
|
}
|
|
|
|
// MockDataNode_DropCompactionPlan_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DropCompactionPlan'
|
|
type MockDataNode_DropCompactionPlan_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// DropCompactionPlan is a helper method to define mock.On call
|
|
// - _a0 context.Context
|
|
// - _a1 *datapb.DropCompactionPlanRequest
|
|
func (_e *MockDataNode_Expecter) DropCompactionPlan(_a0 interface{}, _a1 interface{}) *MockDataNode_DropCompactionPlan_Call {
|
|
return &MockDataNode_DropCompactionPlan_Call{Call: _e.mock.On("DropCompactionPlan", _a0, _a1)}
|
|
}
|
|
|
|
func (_c *MockDataNode_DropCompactionPlan_Call) Run(run func(_a0 context.Context, _a1 *datapb.DropCompactionPlanRequest)) *MockDataNode_DropCompactionPlan_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
run(args[0].(context.Context), args[1].(*datapb.DropCompactionPlanRequest))
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *MockDataNode_DropCompactionPlan_Call) Return(_a0 *commonpb.Status, _a1 error) *MockDataNode_DropCompactionPlan_Call {
|
|
_c.Call.Return(_a0, _a1)
|
|
return _c
|
|
}
|
|
|
|
func (_c *MockDataNode_DropCompactionPlan_Call) RunAndReturn(run func(context.Context, *datapb.DropCompactionPlanRequest) (*commonpb.Status, error)) *MockDataNode_DropCompactionPlan_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// DropImport provides a mock function with given fields: _a0, _a1
|
|
func (_m *MockDataNode) DropImport(_a0 context.Context, _a1 *datapb.DropImportRequest) (*commonpb.Status, error) {
|
|
ret := _m.Called(_a0, _a1)
|
|
|
|
var r0 *commonpb.Status
|
|
var r1 error
|
|
if rf, ok := ret.Get(0).(func(context.Context, *datapb.DropImportRequest) (*commonpb.Status, error)); ok {
|
|
return rf(_a0, _a1)
|
|
}
|
|
if rf, ok := ret.Get(0).(func(context.Context, *datapb.DropImportRequest) *commonpb.Status); ok {
|
|
r0 = rf(_a0, _a1)
|
|
} else {
|
|
if ret.Get(0) != nil {
|
|
r0 = ret.Get(0).(*commonpb.Status)
|
|
}
|
|
}
|
|
|
|
if rf, ok := ret.Get(1).(func(context.Context, *datapb.DropImportRequest) error); ok {
|
|
r1 = rf(_a0, _a1)
|
|
} else {
|
|
r1 = ret.Error(1)
|
|
}
|
|
|
|
return r0, r1
|
|
}
|
|
|
|
// MockDataNode_DropImport_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DropImport'
|
|
type MockDataNode_DropImport_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// DropImport is a helper method to define mock.On call
|
|
// - _a0 context.Context
|
|
// - _a1 *datapb.DropImportRequest
|
|
func (_e *MockDataNode_Expecter) DropImport(_a0 interface{}, _a1 interface{}) *MockDataNode_DropImport_Call {
|
|
return &MockDataNode_DropImport_Call{Call: _e.mock.On("DropImport", _a0, _a1)}
|
|
}
|
|
|
|
func (_c *MockDataNode_DropImport_Call) Run(run func(_a0 context.Context, _a1 *datapb.DropImportRequest)) *MockDataNode_DropImport_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
run(args[0].(context.Context), args[1].(*datapb.DropImportRequest))
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *MockDataNode_DropImport_Call) Return(_a0 *commonpb.Status, _a1 error) *MockDataNode_DropImport_Call {
|
|
_c.Call.Return(_a0, _a1)
|
|
return _c
|
|
}
|
|
|
|
func (_c *MockDataNode_DropImport_Call) RunAndReturn(run func(context.Context, *datapb.DropImportRequest) (*commonpb.Status, error)) *MockDataNode_DropImport_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// FlushChannels provides a mock function with given fields: _a0, _a1
|
|
func (_m *MockDataNode) FlushChannels(_a0 context.Context, _a1 *datapb.FlushChannelsRequest) (*commonpb.Status, error) {
|
|
ret := _m.Called(_a0, _a1)
|
|
|
|
var r0 *commonpb.Status
|
|
var r1 error
|
|
if rf, ok := ret.Get(0).(func(context.Context, *datapb.FlushChannelsRequest) (*commonpb.Status, error)); ok {
|
|
return rf(_a0, _a1)
|
|
}
|
|
if rf, ok := ret.Get(0).(func(context.Context, *datapb.FlushChannelsRequest) *commonpb.Status); ok {
|
|
r0 = rf(_a0, _a1)
|
|
} else {
|
|
if ret.Get(0) != nil {
|
|
r0 = ret.Get(0).(*commonpb.Status)
|
|
}
|
|
}
|
|
|
|
if rf, ok := ret.Get(1).(func(context.Context, *datapb.FlushChannelsRequest) error); ok {
|
|
r1 = rf(_a0, _a1)
|
|
} else {
|
|
r1 = ret.Error(1)
|
|
}
|
|
|
|
return r0, r1
|
|
}
|
|
|
|
// MockDataNode_FlushChannels_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'FlushChannels'
|
|
type MockDataNode_FlushChannels_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// FlushChannels is a helper method to define mock.On call
|
|
// - _a0 context.Context
|
|
// - _a1 *datapb.FlushChannelsRequest
|
|
func (_e *MockDataNode_Expecter) FlushChannels(_a0 interface{}, _a1 interface{}) *MockDataNode_FlushChannels_Call {
|
|
return &MockDataNode_FlushChannels_Call{Call: _e.mock.On("FlushChannels", _a0, _a1)}
|
|
}
|
|
|
|
func (_c *MockDataNode_FlushChannels_Call) Run(run func(_a0 context.Context, _a1 *datapb.FlushChannelsRequest)) *MockDataNode_FlushChannels_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
run(args[0].(context.Context), args[1].(*datapb.FlushChannelsRequest))
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *MockDataNode_FlushChannels_Call) Return(_a0 *commonpb.Status, _a1 error) *MockDataNode_FlushChannels_Call {
|
|
_c.Call.Return(_a0, _a1)
|
|
return _c
|
|
}
|
|
|
|
func (_c *MockDataNode_FlushChannels_Call) RunAndReturn(run func(context.Context, *datapb.FlushChannelsRequest) (*commonpb.Status, error)) *MockDataNode_FlushChannels_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// FlushSegments provides a mock function with given fields: _a0, _a1
|
|
func (_m *MockDataNode) FlushSegments(_a0 context.Context, _a1 *datapb.FlushSegmentsRequest) (*commonpb.Status, error) {
|
|
ret := _m.Called(_a0, _a1)
|
|
|
|
var r0 *commonpb.Status
|
|
var r1 error
|
|
if rf, ok := ret.Get(0).(func(context.Context, *datapb.FlushSegmentsRequest) (*commonpb.Status, error)); ok {
|
|
return rf(_a0, _a1)
|
|
}
|
|
if rf, ok := ret.Get(0).(func(context.Context, *datapb.FlushSegmentsRequest) *commonpb.Status); ok {
|
|
r0 = rf(_a0, _a1)
|
|
} else {
|
|
if ret.Get(0) != nil {
|
|
r0 = ret.Get(0).(*commonpb.Status)
|
|
}
|
|
}
|
|
|
|
if rf, ok := ret.Get(1).(func(context.Context, *datapb.FlushSegmentsRequest) error); ok {
|
|
r1 = rf(_a0, _a1)
|
|
} else {
|
|
r1 = ret.Error(1)
|
|
}
|
|
|
|
return r0, r1
|
|
}
|
|
|
|
// MockDataNode_FlushSegments_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'FlushSegments'
|
|
type MockDataNode_FlushSegments_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// FlushSegments is a helper method to define mock.On call
|
|
// - _a0 context.Context
|
|
// - _a1 *datapb.FlushSegmentsRequest
|
|
func (_e *MockDataNode_Expecter) FlushSegments(_a0 interface{}, _a1 interface{}) *MockDataNode_FlushSegments_Call {
|
|
return &MockDataNode_FlushSegments_Call{Call: _e.mock.On("FlushSegments", _a0, _a1)}
|
|
}
|
|
|
|
func (_c *MockDataNode_FlushSegments_Call) Run(run func(_a0 context.Context, _a1 *datapb.FlushSegmentsRequest)) *MockDataNode_FlushSegments_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
run(args[0].(context.Context), args[1].(*datapb.FlushSegmentsRequest))
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *MockDataNode_FlushSegments_Call) Return(_a0 *commonpb.Status, _a1 error) *MockDataNode_FlushSegments_Call {
|
|
_c.Call.Return(_a0, _a1)
|
|
return _c
|
|
}
|
|
|
|
func (_c *MockDataNode_FlushSegments_Call) RunAndReturn(run func(context.Context, *datapb.FlushSegmentsRequest) (*commonpb.Status, error)) *MockDataNode_FlushSegments_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// GetAddress provides a mock function with given fields:
|
|
func (_m *MockDataNode) GetAddress() string {
|
|
ret := _m.Called()
|
|
|
|
var r0 string
|
|
if rf, ok := ret.Get(0).(func() string); ok {
|
|
r0 = rf()
|
|
} else {
|
|
r0 = ret.Get(0).(string)
|
|
}
|
|
|
|
return r0
|
|
}
|
|
|
|
// MockDataNode_GetAddress_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetAddress'
|
|
type MockDataNode_GetAddress_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// GetAddress is a helper method to define mock.On call
|
|
func (_e *MockDataNode_Expecter) GetAddress() *MockDataNode_GetAddress_Call {
|
|
return &MockDataNode_GetAddress_Call{Call: _e.mock.On("GetAddress")}
|
|
}
|
|
|
|
func (_c *MockDataNode_GetAddress_Call) Run(run func()) *MockDataNode_GetAddress_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
run()
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *MockDataNode_GetAddress_Call) Return(_a0 string) *MockDataNode_GetAddress_Call {
|
|
_c.Call.Return(_a0)
|
|
return _c
|
|
}
|
|
|
|
func (_c *MockDataNode_GetAddress_Call) RunAndReturn(run func() string) *MockDataNode_GetAddress_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// GetCompactionState provides a mock function with given fields: _a0, _a1
|
|
func (_m *MockDataNode) GetCompactionState(_a0 context.Context, _a1 *datapb.CompactionStateRequest) (*datapb.CompactionStateResponse, error) {
|
|
ret := _m.Called(_a0, _a1)
|
|
|
|
var r0 *datapb.CompactionStateResponse
|
|
var r1 error
|
|
if rf, ok := ret.Get(0).(func(context.Context, *datapb.CompactionStateRequest) (*datapb.CompactionStateResponse, error)); ok {
|
|
return rf(_a0, _a1)
|
|
}
|
|
if rf, ok := ret.Get(0).(func(context.Context, *datapb.CompactionStateRequest) *datapb.CompactionStateResponse); ok {
|
|
r0 = rf(_a0, _a1)
|
|
} else {
|
|
if ret.Get(0) != nil {
|
|
r0 = ret.Get(0).(*datapb.CompactionStateResponse)
|
|
}
|
|
}
|
|
|
|
if rf, ok := ret.Get(1).(func(context.Context, *datapb.CompactionStateRequest) error); ok {
|
|
r1 = rf(_a0, _a1)
|
|
} else {
|
|
r1 = ret.Error(1)
|
|
}
|
|
|
|
return r0, r1
|
|
}
|
|
|
|
// MockDataNode_GetCompactionState_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetCompactionState'
|
|
type MockDataNode_GetCompactionState_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// GetCompactionState is a helper method to define mock.On call
|
|
// - _a0 context.Context
|
|
// - _a1 *datapb.CompactionStateRequest
|
|
func (_e *MockDataNode_Expecter) GetCompactionState(_a0 interface{}, _a1 interface{}) *MockDataNode_GetCompactionState_Call {
|
|
return &MockDataNode_GetCompactionState_Call{Call: _e.mock.On("GetCompactionState", _a0, _a1)}
|
|
}
|
|
|
|
func (_c *MockDataNode_GetCompactionState_Call) Run(run func(_a0 context.Context, _a1 *datapb.CompactionStateRequest)) *MockDataNode_GetCompactionState_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
run(args[0].(context.Context), args[1].(*datapb.CompactionStateRequest))
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *MockDataNode_GetCompactionState_Call) Return(_a0 *datapb.CompactionStateResponse, _a1 error) *MockDataNode_GetCompactionState_Call {
|
|
_c.Call.Return(_a0, _a1)
|
|
return _c
|
|
}
|
|
|
|
func (_c *MockDataNode_GetCompactionState_Call) RunAndReturn(run func(context.Context, *datapb.CompactionStateRequest) (*datapb.CompactionStateResponse, error)) *MockDataNode_GetCompactionState_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// GetComponentStates provides a mock function with given fields: _a0, _a1
|
|
func (_m *MockDataNode) GetComponentStates(_a0 context.Context, _a1 *milvuspb.GetComponentStatesRequest) (*milvuspb.ComponentStates, error) {
|
|
ret := _m.Called(_a0, _a1)
|
|
|
|
var r0 *milvuspb.ComponentStates
|
|
var r1 error
|
|
if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.GetComponentStatesRequest) (*milvuspb.ComponentStates, error)); ok {
|
|
return rf(_a0, _a1)
|
|
}
|
|
if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.GetComponentStatesRequest) *milvuspb.ComponentStates); ok {
|
|
r0 = rf(_a0, _a1)
|
|
} else {
|
|
if ret.Get(0) != nil {
|
|
r0 = ret.Get(0).(*milvuspb.ComponentStates)
|
|
}
|
|
}
|
|
|
|
if rf, ok := ret.Get(1).(func(context.Context, *milvuspb.GetComponentStatesRequest) error); ok {
|
|
r1 = rf(_a0, _a1)
|
|
} else {
|
|
r1 = ret.Error(1)
|
|
}
|
|
|
|
return r0, r1
|
|
}
|
|
|
|
// MockDataNode_GetComponentStates_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetComponentStates'
|
|
type MockDataNode_GetComponentStates_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// GetComponentStates is a helper method to define mock.On call
|
|
// - _a0 context.Context
|
|
// - _a1 *milvuspb.GetComponentStatesRequest
|
|
func (_e *MockDataNode_Expecter) GetComponentStates(_a0 interface{}, _a1 interface{}) *MockDataNode_GetComponentStates_Call {
|
|
return &MockDataNode_GetComponentStates_Call{Call: _e.mock.On("GetComponentStates", _a0, _a1)}
|
|
}
|
|
|
|
func (_c *MockDataNode_GetComponentStates_Call) Run(run func(_a0 context.Context, _a1 *milvuspb.GetComponentStatesRequest)) *MockDataNode_GetComponentStates_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
run(args[0].(context.Context), args[1].(*milvuspb.GetComponentStatesRequest))
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *MockDataNode_GetComponentStates_Call) Return(_a0 *milvuspb.ComponentStates, _a1 error) *MockDataNode_GetComponentStates_Call {
|
|
_c.Call.Return(_a0, _a1)
|
|
return _c
|
|
}
|
|
|
|
func (_c *MockDataNode_GetComponentStates_Call) RunAndReturn(run func(context.Context, *milvuspb.GetComponentStatesRequest) (*milvuspb.ComponentStates, error)) *MockDataNode_GetComponentStates_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// GetMetrics provides a mock function with given fields: _a0, _a1
|
|
func (_m *MockDataNode) GetMetrics(_a0 context.Context, _a1 *milvuspb.GetMetricsRequest) (*milvuspb.GetMetricsResponse, error) {
|
|
ret := _m.Called(_a0, _a1)
|
|
|
|
var r0 *milvuspb.GetMetricsResponse
|
|
var r1 error
|
|
if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.GetMetricsRequest) (*milvuspb.GetMetricsResponse, error)); ok {
|
|
return rf(_a0, _a1)
|
|
}
|
|
if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.GetMetricsRequest) *milvuspb.GetMetricsResponse); ok {
|
|
r0 = rf(_a0, _a1)
|
|
} else {
|
|
if ret.Get(0) != nil {
|
|
r0 = ret.Get(0).(*milvuspb.GetMetricsResponse)
|
|
}
|
|
}
|
|
|
|
if rf, ok := ret.Get(1).(func(context.Context, *milvuspb.GetMetricsRequest) error); ok {
|
|
r1 = rf(_a0, _a1)
|
|
} else {
|
|
r1 = ret.Error(1)
|
|
}
|
|
|
|
return r0, r1
|
|
}
|
|
|
|
// MockDataNode_GetMetrics_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetMetrics'
|
|
type MockDataNode_GetMetrics_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// GetMetrics is a helper method to define mock.On call
|
|
// - _a0 context.Context
|
|
// - _a1 *milvuspb.GetMetricsRequest
|
|
func (_e *MockDataNode_Expecter) GetMetrics(_a0 interface{}, _a1 interface{}) *MockDataNode_GetMetrics_Call {
|
|
return &MockDataNode_GetMetrics_Call{Call: _e.mock.On("GetMetrics", _a0, _a1)}
|
|
}
|
|
|
|
func (_c *MockDataNode_GetMetrics_Call) Run(run func(_a0 context.Context, _a1 *milvuspb.GetMetricsRequest)) *MockDataNode_GetMetrics_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
run(args[0].(context.Context), args[1].(*milvuspb.GetMetricsRequest))
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *MockDataNode_GetMetrics_Call) Return(_a0 *milvuspb.GetMetricsResponse, _a1 error) *MockDataNode_GetMetrics_Call {
|
|
_c.Call.Return(_a0, _a1)
|
|
return _c
|
|
}
|
|
|
|
func (_c *MockDataNode_GetMetrics_Call) RunAndReturn(run func(context.Context, *milvuspb.GetMetricsRequest) (*milvuspb.GetMetricsResponse, error)) *MockDataNode_GetMetrics_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// GetNodeID provides a mock function with given fields:
|
|
func (_m *MockDataNode) GetNodeID() int64 {
|
|
ret := _m.Called()
|
|
|
|
var r0 int64
|
|
if rf, ok := ret.Get(0).(func() int64); ok {
|
|
r0 = rf()
|
|
} else {
|
|
r0 = ret.Get(0).(int64)
|
|
}
|
|
|
|
return r0
|
|
}
|
|
|
|
// MockDataNode_GetNodeID_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetNodeID'
|
|
type MockDataNode_GetNodeID_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// GetNodeID is a helper method to define mock.On call
|
|
func (_e *MockDataNode_Expecter) GetNodeID() *MockDataNode_GetNodeID_Call {
|
|
return &MockDataNode_GetNodeID_Call{Call: _e.mock.On("GetNodeID")}
|
|
}
|
|
|
|
func (_c *MockDataNode_GetNodeID_Call) Run(run func()) *MockDataNode_GetNodeID_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
run()
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *MockDataNode_GetNodeID_Call) Return(_a0 int64) *MockDataNode_GetNodeID_Call {
|
|
_c.Call.Return(_a0)
|
|
return _c
|
|
}
|
|
|
|
func (_c *MockDataNode_GetNodeID_Call) RunAndReturn(run func() int64) *MockDataNode_GetNodeID_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// GetStateCode provides a mock function with given fields:
|
|
func (_m *MockDataNode) GetStateCode() commonpb.StateCode {
|
|
ret := _m.Called()
|
|
|
|
var r0 commonpb.StateCode
|
|
if rf, ok := ret.Get(0).(func() commonpb.StateCode); ok {
|
|
r0 = rf()
|
|
} else {
|
|
r0 = ret.Get(0).(commonpb.StateCode)
|
|
}
|
|
|
|
return r0
|
|
}
|
|
|
|
// MockDataNode_GetStateCode_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetStateCode'
|
|
type MockDataNode_GetStateCode_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// GetStateCode is a helper method to define mock.On call
|
|
func (_e *MockDataNode_Expecter) GetStateCode() *MockDataNode_GetStateCode_Call {
|
|
return &MockDataNode_GetStateCode_Call{Call: _e.mock.On("GetStateCode")}
|
|
}
|
|
|
|
func (_c *MockDataNode_GetStateCode_Call) Run(run func()) *MockDataNode_GetStateCode_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
run()
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *MockDataNode_GetStateCode_Call) Return(_a0 commonpb.StateCode) *MockDataNode_GetStateCode_Call {
|
|
_c.Call.Return(_a0)
|
|
return _c
|
|
}
|
|
|
|
func (_c *MockDataNode_GetStateCode_Call) RunAndReturn(run func() commonpb.StateCode) *MockDataNode_GetStateCode_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// GetStatisticsChannel provides a mock function with given fields: _a0, _a1
|
|
func (_m *MockDataNode) GetStatisticsChannel(_a0 context.Context, _a1 *internalpb.GetStatisticsChannelRequest) (*milvuspb.StringResponse, error) {
|
|
ret := _m.Called(_a0, _a1)
|
|
|
|
var r0 *milvuspb.StringResponse
|
|
var r1 error
|
|
if rf, ok := ret.Get(0).(func(context.Context, *internalpb.GetStatisticsChannelRequest) (*milvuspb.StringResponse, error)); ok {
|
|
return rf(_a0, _a1)
|
|
}
|
|
if rf, ok := ret.Get(0).(func(context.Context, *internalpb.GetStatisticsChannelRequest) *milvuspb.StringResponse); ok {
|
|
r0 = rf(_a0, _a1)
|
|
} else {
|
|
if ret.Get(0) != nil {
|
|
r0 = ret.Get(0).(*milvuspb.StringResponse)
|
|
}
|
|
}
|
|
|
|
if rf, ok := ret.Get(1).(func(context.Context, *internalpb.GetStatisticsChannelRequest) error); ok {
|
|
r1 = rf(_a0, _a1)
|
|
} else {
|
|
r1 = ret.Error(1)
|
|
}
|
|
|
|
return r0, r1
|
|
}
|
|
|
|
// MockDataNode_GetStatisticsChannel_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetStatisticsChannel'
|
|
type MockDataNode_GetStatisticsChannel_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// GetStatisticsChannel is a helper method to define mock.On call
|
|
// - _a0 context.Context
|
|
// - _a1 *internalpb.GetStatisticsChannelRequest
|
|
func (_e *MockDataNode_Expecter) GetStatisticsChannel(_a0 interface{}, _a1 interface{}) *MockDataNode_GetStatisticsChannel_Call {
|
|
return &MockDataNode_GetStatisticsChannel_Call{Call: _e.mock.On("GetStatisticsChannel", _a0, _a1)}
|
|
}
|
|
|
|
func (_c *MockDataNode_GetStatisticsChannel_Call) Run(run func(_a0 context.Context, _a1 *internalpb.GetStatisticsChannelRequest)) *MockDataNode_GetStatisticsChannel_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
run(args[0].(context.Context), args[1].(*internalpb.GetStatisticsChannelRequest))
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *MockDataNode_GetStatisticsChannel_Call) Return(_a0 *milvuspb.StringResponse, _a1 error) *MockDataNode_GetStatisticsChannel_Call {
|
|
_c.Call.Return(_a0, _a1)
|
|
return _c
|
|
}
|
|
|
|
func (_c *MockDataNode_GetStatisticsChannel_Call) RunAndReturn(run func(context.Context, *internalpb.GetStatisticsChannelRequest) (*milvuspb.StringResponse, error)) *MockDataNode_GetStatisticsChannel_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// ImportV2 provides a mock function with given fields: _a0, _a1
|
|
func (_m *MockDataNode) ImportV2(_a0 context.Context, _a1 *datapb.ImportRequest) (*commonpb.Status, error) {
|
|
ret := _m.Called(_a0, _a1)
|
|
|
|
var r0 *commonpb.Status
|
|
var r1 error
|
|
if rf, ok := ret.Get(0).(func(context.Context, *datapb.ImportRequest) (*commonpb.Status, error)); ok {
|
|
return rf(_a0, _a1)
|
|
}
|
|
if rf, ok := ret.Get(0).(func(context.Context, *datapb.ImportRequest) *commonpb.Status); ok {
|
|
r0 = rf(_a0, _a1)
|
|
} else {
|
|
if ret.Get(0) != nil {
|
|
r0 = ret.Get(0).(*commonpb.Status)
|
|
}
|
|
}
|
|
|
|
if rf, ok := ret.Get(1).(func(context.Context, *datapb.ImportRequest) error); ok {
|
|
r1 = rf(_a0, _a1)
|
|
} else {
|
|
r1 = ret.Error(1)
|
|
}
|
|
|
|
return r0, r1
|
|
}
|
|
|
|
// MockDataNode_ImportV2_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ImportV2'
|
|
type MockDataNode_ImportV2_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// ImportV2 is a helper method to define mock.On call
|
|
// - _a0 context.Context
|
|
// - _a1 *datapb.ImportRequest
|
|
func (_e *MockDataNode_Expecter) ImportV2(_a0 interface{}, _a1 interface{}) *MockDataNode_ImportV2_Call {
|
|
return &MockDataNode_ImportV2_Call{Call: _e.mock.On("ImportV2", _a0, _a1)}
|
|
}
|
|
|
|
func (_c *MockDataNode_ImportV2_Call) Run(run func(_a0 context.Context, _a1 *datapb.ImportRequest)) *MockDataNode_ImportV2_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
run(args[0].(context.Context), args[1].(*datapb.ImportRequest))
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *MockDataNode_ImportV2_Call) Return(_a0 *commonpb.Status, _a1 error) *MockDataNode_ImportV2_Call {
|
|
_c.Call.Return(_a0, _a1)
|
|
return _c
|
|
}
|
|
|
|
func (_c *MockDataNode_ImportV2_Call) RunAndReturn(run func(context.Context, *datapb.ImportRequest) (*commonpb.Status, error)) *MockDataNode_ImportV2_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// Init provides a mock function with given fields:
|
|
func (_m *MockDataNode) Init() error {
|
|
ret := _m.Called()
|
|
|
|
var r0 error
|
|
if rf, ok := ret.Get(0).(func() error); ok {
|
|
r0 = rf()
|
|
} else {
|
|
r0 = ret.Error(0)
|
|
}
|
|
|
|
return r0
|
|
}
|
|
|
|
// MockDataNode_Init_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Init'
|
|
type MockDataNode_Init_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// Init is a helper method to define mock.On call
|
|
func (_e *MockDataNode_Expecter) Init() *MockDataNode_Init_Call {
|
|
return &MockDataNode_Init_Call{Call: _e.mock.On("Init")}
|
|
}
|
|
|
|
func (_c *MockDataNode_Init_Call) Run(run func()) *MockDataNode_Init_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
run()
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *MockDataNode_Init_Call) Return(_a0 error) *MockDataNode_Init_Call {
|
|
_c.Call.Return(_a0)
|
|
return _c
|
|
}
|
|
|
|
func (_c *MockDataNode_Init_Call) RunAndReturn(run func() error) *MockDataNode_Init_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// NotifyChannelOperation provides a mock function with given fields: _a0, _a1
|
|
func (_m *MockDataNode) NotifyChannelOperation(_a0 context.Context, _a1 *datapb.ChannelOperationsRequest) (*commonpb.Status, error) {
|
|
ret := _m.Called(_a0, _a1)
|
|
|
|
var r0 *commonpb.Status
|
|
var r1 error
|
|
if rf, ok := ret.Get(0).(func(context.Context, *datapb.ChannelOperationsRequest) (*commonpb.Status, error)); ok {
|
|
return rf(_a0, _a1)
|
|
}
|
|
if rf, ok := ret.Get(0).(func(context.Context, *datapb.ChannelOperationsRequest) *commonpb.Status); ok {
|
|
r0 = rf(_a0, _a1)
|
|
} else {
|
|
if ret.Get(0) != nil {
|
|
r0 = ret.Get(0).(*commonpb.Status)
|
|
}
|
|
}
|
|
|
|
if rf, ok := ret.Get(1).(func(context.Context, *datapb.ChannelOperationsRequest) error); ok {
|
|
r1 = rf(_a0, _a1)
|
|
} else {
|
|
r1 = ret.Error(1)
|
|
}
|
|
|
|
return r0, r1
|
|
}
|
|
|
|
// MockDataNode_NotifyChannelOperation_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'NotifyChannelOperation'
|
|
type MockDataNode_NotifyChannelOperation_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// NotifyChannelOperation is a helper method to define mock.On call
|
|
// - _a0 context.Context
|
|
// - _a1 *datapb.ChannelOperationsRequest
|
|
func (_e *MockDataNode_Expecter) NotifyChannelOperation(_a0 interface{}, _a1 interface{}) *MockDataNode_NotifyChannelOperation_Call {
|
|
return &MockDataNode_NotifyChannelOperation_Call{Call: _e.mock.On("NotifyChannelOperation", _a0, _a1)}
|
|
}
|
|
|
|
func (_c *MockDataNode_NotifyChannelOperation_Call) Run(run func(_a0 context.Context, _a1 *datapb.ChannelOperationsRequest)) *MockDataNode_NotifyChannelOperation_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
run(args[0].(context.Context), args[1].(*datapb.ChannelOperationsRequest))
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *MockDataNode_NotifyChannelOperation_Call) Return(_a0 *commonpb.Status, _a1 error) *MockDataNode_NotifyChannelOperation_Call {
|
|
_c.Call.Return(_a0, _a1)
|
|
return _c
|
|
}
|
|
|
|
func (_c *MockDataNode_NotifyChannelOperation_Call) RunAndReturn(run func(context.Context, *datapb.ChannelOperationsRequest) (*commonpb.Status, error)) *MockDataNode_NotifyChannelOperation_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// PreImport provides a mock function with given fields: _a0, _a1
|
|
func (_m *MockDataNode) PreImport(_a0 context.Context, _a1 *datapb.PreImportRequest) (*commonpb.Status, error) {
|
|
ret := _m.Called(_a0, _a1)
|
|
|
|
var r0 *commonpb.Status
|
|
var r1 error
|
|
if rf, ok := ret.Get(0).(func(context.Context, *datapb.PreImportRequest) (*commonpb.Status, error)); ok {
|
|
return rf(_a0, _a1)
|
|
}
|
|
if rf, ok := ret.Get(0).(func(context.Context, *datapb.PreImportRequest) *commonpb.Status); ok {
|
|
r0 = rf(_a0, _a1)
|
|
} else {
|
|
if ret.Get(0) != nil {
|
|
r0 = ret.Get(0).(*commonpb.Status)
|
|
}
|
|
}
|
|
|
|
if rf, ok := ret.Get(1).(func(context.Context, *datapb.PreImportRequest) error); ok {
|
|
r1 = rf(_a0, _a1)
|
|
} else {
|
|
r1 = ret.Error(1)
|
|
}
|
|
|
|
return r0, r1
|
|
}
|
|
|
|
// MockDataNode_PreImport_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'PreImport'
|
|
type MockDataNode_PreImport_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// PreImport is a helper method to define mock.On call
|
|
// - _a0 context.Context
|
|
// - _a1 *datapb.PreImportRequest
|
|
func (_e *MockDataNode_Expecter) PreImport(_a0 interface{}, _a1 interface{}) *MockDataNode_PreImport_Call {
|
|
return &MockDataNode_PreImport_Call{Call: _e.mock.On("PreImport", _a0, _a1)}
|
|
}
|
|
|
|
func (_c *MockDataNode_PreImport_Call) Run(run func(_a0 context.Context, _a1 *datapb.PreImportRequest)) *MockDataNode_PreImport_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
run(args[0].(context.Context), args[1].(*datapb.PreImportRequest))
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *MockDataNode_PreImport_Call) Return(_a0 *commonpb.Status, _a1 error) *MockDataNode_PreImport_Call {
|
|
_c.Call.Return(_a0, _a1)
|
|
return _c
|
|
}
|
|
|
|
func (_c *MockDataNode_PreImport_Call) RunAndReturn(run func(context.Context, *datapb.PreImportRequest) (*commonpb.Status, error)) *MockDataNode_PreImport_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// QueryImport provides a mock function with given fields: _a0, _a1
|
|
func (_m *MockDataNode) QueryImport(_a0 context.Context, _a1 *datapb.QueryImportRequest) (*datapb.QueryImportResponse, error) {
|
|
ret := _m.Called(_a0, _a1)
|
|
|
|
var r0 *datapb.QueryImportResponse
|
|
var r1 error
|
|
if rf, ok := ret.Get(0).(func(context.Context, *datapb.QueryImportRequest) (*datapb.QueryImportResponse, error)); ok {
|
|
return rf(_a0, _a1)
|
|
}
|
|
if rf, ok := ret.Get(0).(func(context.Context, *datapb.QueryImportRequest) *datapb.QueryImportResponse); ok {
|
|
r0 = rf(_a0, _a1)
|
|
} else {
|
|
if ret.Get(0) != nil {
|
|
r0 = ret.Get(0).(*datapb.QueryImportResponse)
|
|
}
|
|
}
|
|
|
|
if rf, ok := ret.Get(1).(func(context.Context, *datapb.QueryImportRequest) error); ok {
|
|
r1 = rf(_a0, _a1)
|
|
} else {
|
|
r1 = ret.Error(1)
|
|
}
|
|
|
|
return r0, r1
|
|
}
|
|
|
|
// MockDataNode_QueryImport_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'QueryImport'
|
|
type MockDataNode_QueryImport_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// QueryImport is a helper method to define mock.On call
|
|
// - _a0 context.Context
|
|
// - _a1 *datapb.QueryImportRequest
|
|
func (_e *MockDataNode_Expecter) QueryImport(_a0 interface{}, _a1 interface{}) *MockDataNode_QueryImport_Call {
|
|
return &MockDataNode_QueryImport_Call{Call: _e.mock.On("QueryImport", _a0, _a1)}
|
|
}
|
|
|
|
func (_c *MockDataNode_QueryImport_Call) Run(run func(_a0 context.Context, _a1 *datapb.QueryImportRequest)) *MockDataNode_QueryImport_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
run(args[0].(context.Context), args[1].(*datapb.QueryImportRequest))
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *MockDataNode_QueryImport_Call) Return(_a0 *datapb.QueryImportResponse, _a1 error) *MockDataNode_QueryImport_Call {
|
|
_c.Call.Return(_a0, _a1)
|
|
return _c
|
|
}
|
|
|
|
func (_c *MockDataNode_QueryImport_Call) RunAndReturn(run func(context.Context, *datapb.QueryImportRequest) (*datapb.QueryImportResponse, error)) *MockDataNode_QueryImport_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// QueryPreImport provides a mock function with given fields: _a0, _a1
|
|
func (_m *MockDataNode) QueryPreImport(_a0 context.Context, _a1 *datapb.QueryPreImportRequest) (*datapb.QueryPreImportResponse, error) {
|
|
ret := _m.Called(_a0, _a1)
|
|
|
|
var r0 *datapb.QueryPreImportResponse
|
|
var r1 error
|
|
if rf, ok := ret.Get(0).(func(context.Context, *datapb.QueryPreImportRequest) (*datapb.QueryPreImportResponse, error)); ok {
|
|
return rf(_a0, _a1)
|
|
}
|
|
if rf, ok := ret.Get(0).(func(context.Context, *datapb.QueryPreImportRequest) *datapb.QueryPreImportResponse); ok {
|
|
r0 = rf(_a0, _a1)
|
|
} else {
|
|
if ret.Get(0) != nil {
|
|
r0 = ret.Get(0).(*datapb.QueryPreImportResponse)
|
|
}
|
|
}
|
|
|
|
if rf, ok := ret.Get(1).(func(context.Context, *datapb.QueryPreImportRequest) error); ok {
|
|
r1 = rf(_a0, _a1)
|
|
} else {
|
|
r1 = ret.Error(1)
|
|
}
|
|
|
|
return r0, r1
|
|
}
|
|
|
|
// MockDataNode_QueryPreImport_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'QueryPreImport'
|
|
type MockDataNode_QueryPreImport_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// QueryPreImport is a helper method to define mock.On call
|
|
// - _a0 context.Context
|
|
// - _a1 *datapb.QueryPreImportRequest
|
|
func (_e *MockDataNode_Expecter) QueryPreImport(_a0 interface{}, _a1 interface{}) *MockDataNode_QueryPreImport_Call {
|
|
return &MockDataNode_QueryPreImport_Call{Call: _e.mock.On("QueryPreImport", _a0, _a1)}
|
|
}
|
|
|
|
func (_c *MockDataNode_QueryPreImport_Call) Run(run func(_a0 context.Context, _a1 *datapb.QueryPreImportRequest)) *MockDataNode_QueryPreImport_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
run(args[0].(context.Context), args[1].(*datapb.QueryPreImportRequest))
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *MockDataNode_QueryPreImport_Call) Return(_a0 *datapb.QueryPreImportResponse, _a1 error) *MockDataNode_QueryPreImport_Call {
|
|
_c.Call.Return(_a0, _a1)
|
|
return _c
|
|
}
|
|
|
|
func (_c *MockDataNode_QueryPreImport_Call) RunAndReturn(run func(context.Context, *datapb.QueryPreImportRequest) (*datapb.QueryPreImportResponse, error)) *MockDataNode_QueryPreImport_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// QuerySlot provides a mock function with given fields: _a0, _a1
|
|
func (_m *MockDataNode) QuerySlot(_a0 context.Context, _a1 *datapb.QuerySlotRequest) (*datapb.QuerySlotResponse, error) {
|
|
ret := _m.Called(_a0, _a1)
|
|
|
|
var r0 *datapb.QuerySlotResponse
|
|
var r1 error
|
|
if rf, ok := ret.Get(0).(func(context.Context, *datapb.QuerySlotRequest) (*datapb.QuerySlotResponse, error)); ok {
|
|
return rf(_a0, _a1)
|
|
}
|
|
if rf, ok := ret.Get(0).(func(context.Context, *datapb.QuerySlotRequest) *datapb.QuerySlotResponse); ok {
|
|
r0 = rf(_a0, _a1)
|
|
} else {
|
|
if ret.Get(0) != nil {
|
|
r0 = ret.Get(0).(*datapb.QuerySlotResponse)
|
|
}
|
|
}
|
|
|
|
if rf, ok := ret.Get(1).(func(context.Context, *datapb.QuerySlotRequest) error); ok {
|
|
r1 = rf(_a0, _a1)
|
|
} else {
|
|
r1 = ret.Error(1)
|
|
}
|
|
|
|
return r0, r1
|
|
}
|
|
|
|
// MockDataNode_QuerySlot_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'QuerySlot'
|
|
type MockDataNode_QuerySlot_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// QuerySlot is a helper method to define mock.On call
|
|
// - _a0 context.Context
|
|
// - _a1 *datapb.QuerySlotRequest
|
|
func (_e *MockDataNode_Expecter) QuerySlot(_a0 interface{}, _a1 interface{}) *MockDataNode_QuerySlot_Call {
|
|
return &MockDataNode_QuerySlot_Call{Call: _e.mock.On("QuerySlot", _a0, _a1)}
|
|
}
|
|
|
|
func (_c *MockDataNode_QuerySlot_Call) Run(run func(_a0 context.Context, _a1 *datapb.QuerySlotRequest)) *MockDataNode_QuerySlot_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
run(args[0].(context.Context), args[1].(*datapb.QuerySlotRequest))
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *MockDataNode_QuerySlot_Call) Return(_a0 *datapb.QuerySlotResponse, _a1 error) *MockDataNode_QuerySlot_Call {
|
|
_c.Call.Return(_a0, _a1)
|
|
return _c
|
|
}
|
|
|
|
func (_c *MockDataNode_QuerySlot_Call) RunAndReturn(run func(context.Context, *datapb.QuerySlotRequest) (*datapb.QuerySlotResponse, error)) *MockDataNode_QuerySlot_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// Register provides a mock function with given fields:
|
|
func (_m *MockDataNode) Register() error {
|
|
ret := _m.Called()
|
|
|
|
var r0 error
|
|
if rf, ok := ret.Get(0).(func() error); ok {
|
|
r0 = rf()
|
|
} else {
|
|
r0 = ret.Error(0)
|
|
}
|
|
|
|
return r0
|
|
}
|
|
|
|
// MockDataNode_Register_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Register'
|
|
type MockDataNode_Register_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// Register is a helper method to define mock.On call
|
|
func (_e *MockDataNode_Expecter) Register() *MockDataNode_Register_Call {
|
|
return &MockDataNode_Register_Call{Call: _e.mock.On("Register")}
|
|
}
|
|
|
|
func (_c *MockDataNode_Register_Call) Run(run func()) *MockDataNode_Register_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
run()
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *MockDataNode_Register_Call) Return(_a0 error) *MockDataNode_Register_Call {
|
|
_c.Call.Return(_a0)
|
|
return _c
|
|
}
|
|
|
|
func (_c *MockDataNode_Register_Call) RunAndReturn(run func() error) *MockDataNode_Register_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// ResendSegmentStats provides a mock function with given fields: _a0, _a1
|
|
func (_m *MockDataNode) ResendSegmentStats(_a0 context.Context, _a1 *datapb.ResendSegmentStatsRequest) (*datapb.ResendSegmentStatsResponse, error) {
|
|
ret := _m.Called(_a0, _a1)
|
|
|
|
var r0 *datapb.ResendSegmentStatsResponse
|
|
var r1 error
|
|
if rf, ok := ret.Get(0).(func(context.Context, *datapb.ResendSegmentStatsRequest) (*datapb.ResendSegmentStatsResponse, error)); ok {
|
|
return rf(_a0, _a1)
|
|
}
|
|
if rf, ok := ret.Get(0).(func(context.Context, *datapb.ResendSegmentStatsRequest) *datapb.ResendSegmentStatsResponse); ok {
|
|
r0 = rf(_a0, _a1)
|
|
} else {
|
|
if ret.Get(0) != nil {
|
|
r0 = ret.Get(0).(*datapb.ResendSegmentStatsResponse)
|
|
}
|
|
}
|
|
|
|
if rf, ok := ret.Get(1).(func(context.Context, *datapb.ResendSegmentStatsRequest) error); ok {
|
|
r1 = rf(_a0, _a1)
|
|
} else {
|
|
r1 = ret.Error(1)
|
|
}
|
|
|
|
return r0, r1
|
|
}
|
|
|
|
// MockDataNode_ResendSegmentStats_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ResendSegmentStats'
|
|
type MockDataNode_ResendSegmentStats_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// ResendSegmentStats is a helper method to define mock.On call
|
|
// - _a0 context.Context
|
|
// - _a1 *datapb.ResendSegmentStatsRequest
|
|
func (_e *MockDataNode_Expecter) ResendSegmentStats(_a0 interface{}, _a1 interface{}) *MockDataNode_ResendSegmentStats_Call {
|
|
return &MockDataNode_ResendSegmentStats_Call{Call: _e.mock.On("ResendSegmentStats", _a0, _a1)}
|
|
}
|
|
|
|
func (_c *MockDataNode_ResendSegmentStats_Call) Run(run func(_a0 context.Context, _a1 *datapb.ResendSegmentStatsRequest)) *MockDataNode_ResendSegmentStats_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
run(args[0].(context.Context), args[1].(*datapb.ResendSegmentStatsRequest))
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *MockDataNode_ResendSegmentStats_Call) Return(_a0 *datapb.ResendSegmentStatsResponse, _a1 error) *MockDataNode_ResendSegmentStats_Call {
|
|
_c.Call.Return(_a0, _a1)
|
|
return _c
|
|
}
|
|
|
|
func (_c *MockDataNode_ResendSegmentStats_Call) RunAndReturn(run func(context.Context, *datapb.ResendSegmentStatsRequest) (*datapb.ResendSegmentStatsResponse, error)) *MockDataNode_ResendSegmentStats_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// SetAddress provides a mock function with given fields: address
|
|
func (_m *MockDataNode) SetAddress(address string) {
|
|
_m.Called(address)
|
|
}
|
|
|
|
// MockDataNode_SetAddress_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetAddress'
|
|
type MockDataNode_SetAddress_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// SetAddress is a helper method to define mock.On call
|
|
// - address string
|
|
func (_e *MockDataNode_Expecter) SetAddress(address interface{}) *MockDataNode_SetAddress_Call {
|
|
return &MockDataNode_SetAddress_Call{Call: _e.mock.On("SetAddress", address)}
|
|
}
|
|
|
|
func (_c *MockDataNode_SetAddress_Call) Run(run func(address string)) *MockDataNode_SetAddress_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
run(args[0].(string))
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *MockDataNode_SetAddress_Call) Return() *MockDataNode_SetAddress_Call {
|
|
_c.Call.Return()
|
|
return _c
|
|
}
|
|
|
|
func (_c *MockDataNode_SetAddress_Call) RunAndReturn(run func(string)) *MockDataNode_SetAddress_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// SetDataCoordClient provides a mock function with given fields: dataCoord
|
|
func (_m *MockDataNode) SetDataCoordClient(dataCoord types.DataCoordClient) error {
|
|
ret := _m.Called(dataCoord)
|
|
|
|
var r0 error
|
|
if rf, ok := ret.Get(0).(func(types.DataCoordClient) error); ok {
|
|
r0 = rf(dataCoord)
|
|
} else {
|
|
r0 = ret.Error(0)
|
|
}
|
|
|
|
return r0
|
|
}
|
|
|
|
// MockDataNode_SetDataCoordClient_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetDataCoordClient'
|
|
type MockDataNode_SetDataCoordClient_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// SetDataCoordClient is a helper method to define mock.On call
|
|
// - dataCoord types.DataCoordClient
|
|
func (_e *MockDataNode_Expecter) SetDataCoordClient(dataCoord interface{}) *MockDataNode_SetDataCoordClient_Call {
|
|
return &MockDataNode_SetDataCoordClient_Call{Call: _e.mock.On("SetDataCoordClient", dataCoord)}
|
|
}
|
|
|
|
func (_c *MockDataNode_SetDataCoordClient_Call) Run(run func(dataCoord types.DataCoordClient)) *MockDataNode_SetDataCoordClient_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
run(args[0].(types.DataCoordClient))
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *MockDataNode_SetDataCoordClient_Call) Return(_a0 error) *MockDataNode_SetDataCoordClient_Call {
|
|
_c.Call.Return(_a0)
|
|
return _c
|
|
}
|
|
|
|
func (_c *MockDataNode_SetDataCoordClient_Call) RunAndReturn(run func(types.DataCoordClient) error) *MockDataNode_SetDataCoordClient_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// SetEtcdClient provides a mock function with given fields: etcdClient
|
|
func (_m *MockDataNode) SetEtcdClient(etcdClient *clientv3.Client) {
|
|
_m.Called(etcdClient)
|
|
}
|
|
|
|
// MockDataNode_SetEtcdClient_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetEtcdClient'
|
|
type MockDataNode_SetEtcdClient_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// SetEtcdClient is a helper method to define mock.On call
|
|
// - etcdClient *clientv3.Client
|
|
func (_e *MockDataNode_Expecter) SetEtcdClient(etcdClient interface{}) *MockDataNode_SetEtcdClient_Call {
|
|
return &MockDataNode_SetEtcdClient_Call{Call: _e.mock.On("SetEtcdClient", etcdClient)}
|
|
}
|
|
|
|
func (_c *MockDataNode_SetEtcdClient_Call) Run(run func(etcdClient *clientv3.Client)) *MockDataNode_SetEtcdClient_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
run(args[0].(*clientv3.Client))
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *MockDataNode_SetEtcdClient_Call) Return() *MockDataNode_SetEtcdClient_Call {
|
|
_c.Call.Return()
|
|
return _c
|
|
}
|
|
|
|
func (_c *MockDataNode_SetEtcdClient_Call) RunAndReturn(run func(*clientv3.Client)) *MockDataNode_SetEtcdClient_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// SetRootCoordClient provides a mock function with given fields: rootCoord
|
|
func (_m *MockDataNode) SetRootCoordClient(rootCoord types.RootCoordClient) error {
|
|
ret := _m.Called(rootCoord)
|
|
|
|
var r0 error
|
|
if rf, ok := ret.Get(0).(func(types.RootCoordClient) error); ok {
|
|
r0 = rf(rootCoord)
|
|
} else {
|
|
r0 = ret.Error(0)
|
|
}
|
|
|
|
return r0
|
|
}
|
|
|
|
// MockDataNode_SetRootCoordClient_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetRootCoordClient'
|
|
type MockDataNode_SetRootCoordClient_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// SetRootCoordClient is a helper method to define mock.On call
|
|
// - rootCoord types.RootCoordClient
|
|
func (_e *MockDataNode_Expecter) SetRootCoordClient(rootCoord interface{}) *MockDataNode_SetRootCoordClient_Call {
|
|
return &MockDataNode_SetRootCoordClient_Call{Call: _e.mock.On("SetRootCoordClient", rootCoord)}
|
|
}
|
|
|
|
func (_c *MockDataNode_SetRootCoordClient_Call) Run(run func(rootCoord types.RootCoordClient)) *MockDataNode_SetRootCoordClient_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
run(args[0].(types.RootCoordClient))
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *MockDataNode_SetRootCoordClient_Call) Return(_a0 error) *MockDataNode_SetRootCoordClient_Call {
|
|
_c.Call.Return(_a0)
|
|
return _c
|
|
}
|
|
|
|
func (_c *MockDataNode_SetRootCoordClient_Call) RunAndReturn(run func(types.RootCoordClient) error) *MockDataNode_SetRootCoordClient_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// ShowConfigurations provides a mock function with given fields: _a0, _a1
|
|
func (_m *MockDataNode) ShowConfigurations(_a0 context.Context, _a1 *internalpb.ShowConfigurationsRequest) (*internalpb.ShowConfigurationsResponse, error) {
|
|
ret := _m.Called(_a0, _a1)
|
|
|
|
var r0 *internalpb.ShowConfigurationsResponse
|
|
var r1 error
|
|
if rf, ok := ret.Get(0).(func(context.Context, *internalpb.ShowConfigurationsRequest) (*internalpb.ShowConfigurationsResponse, error)); ok {
|
|
return rf(_a0, _a1)
|
|
}
|
|
if rf, ok := ret.Get(0).(func(context.Context, *internalpb.ShowConfigurationsRequest) *internalpb.ShowConfigurationsResponse); ok {
|
|
r0 = rf(_a0, _a1)
|
|
} else {
|
|
if ret.Get(0) != nil {
|
|
r0 = ret.Get(0).(*internalpb.ShowConfigurationsResponse)
|
|
}
|
|
}
|
|
|
|
if rf, ok := ret.Get(1).(func(context.Context, *internalpb.ShowConfigurationsRequest) error); ok {
|
|
r1 = rf(_a0, _a1)
|
|
} else {
|
|
r1 = ret.Error(1)
|
|
}
|
|
|
|
return r0, r1
|
|
}
|
|
|
|
// MockDataNode_ShowConfigurations_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ShowConfigurations'
|
|
type MockDataNode_ShowConfigurations_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// ShowConfigurations is a helper method to define mock.On call
|
|
// - _a0 context.Context
|
|
// - _a1 *internalpb.ShowConfigurationsRequest
|
|
func (_e *MockDataNode_Expecter) ShowConfigurations(_a0 interface{}, _a1 interface{}) *MockDataNode_ShowConfigurations_Call {
|
|
return &MockDataNode_ShowConfigurations_Call{Call: _e.mock.On("ShowConfigurations", _a0, _a1)}
|
|
}
|
|
|
|
func (_c *MockDataNode_ShowConfigurations_Call) Run(run func(_a0 context.Context, _a1 *internalpb.ShowConfigurationsRequest)) *MockDataNode_ShowConfigurations_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
run(args[0].(context.Context), args[1].(*internalpb.ShowConfigurationsRequest))
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *MockDataNode_ShowConfigurations_Call) Return(_a0 *internalpb.ShowConfigurationsResponse, _a1 error) *MockDataNode_ShowConfigurations_Call {
|
|
_c.Call.Return(_a0, _a1)
|
|
return _c
|
|
}
|
|
|
|
func (_c *MockDataNode_ShowConfigurations_Call) RunAndReturn(run func(context.Context, *internalpb.ShowConfigurationsRequest) (*internalpb.ShowConfigurationsResponse, error)) *MockDataNode_ShowConfigurations_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// Start provides a mock function with given fields:
|
|
func (_m *MockDataNode) Start() error {
|
|
ret := _m.Called()
|
|
|
|
var r0 error
|
|
if rf, ok := ret.Get(0).(func() error); ok {
|
|
r0 = rf()
|
|
} else {
|
|
r0 = ret.Error(0)
|
|
}
|
|
|
|
return r0
|
|
}
|
|
|
|
// MockDataNode_Start_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Start'
|
|
type MockDataNode_Start_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// Start is a helper method to define mock.On call
|
|
func (_e *MockDataNode_Expecter) Start() *MockDataNode_Start_Call {
|
|
return &MockDataNode_Start_Call{Call: _e.mock.On("Start")}
|
|
}
|
|
|
|
func (_c *MockDataNode_Start_Call) Run(run func()) *MockDataNode_Start_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
run()
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *MockDataNode_Start_Call) Return(_a0 error) *MockDataNode_Start_Call {
|
|
_c.Call.Return(_a0)
|
|
return _c
|
|
}
|
|
|
|
func (_c *MockDataNode_Start_Call) RunAndReturn(run func() error) *MockDataNode_Start_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// Stop provides a mock function with given fields:
|
|
func (_m *MockDataNode) Stop() error {
|
|
ret := _m.Called()
|
|
|
|
var r0 error
|
|
if rf, ok := ret.Get(0).(func() error); ok {
|
|
r0 = rf()
|
|
} else {
|
|
r0 = ret.Error(0)
|
|
}
|
|
|
|
return r0
|
|
}
|
|
|
|
// MockDataNode_Stop_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Stop'
|
|
type MockDataNode_Stop_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// Stop is a helper method to define mock.On call
|
|
func (_e *MockDataNode_Expecter) Stop() *MockDataNode_Stop_Call {
|
|
return &MockDataNode_Stop_Call{Call: _e.mock.On("Stop")}
|
|
}
|
|
|
|
func (_c *MockDataNode_Stop_Call) Run(run func()) *MockDataNode_Stop_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
run()
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *MockDataNode_Stop_Call) Return(_a0 error) *MockDataNode_Stop_Call {
|
|
_c.Call.Return(_a0)
|
|
return _c
|
|
}
|
|
|
|
func (_c *MockDataNode_Stop_Call) RunAndReturn(run func() error) *MockDataNode_Stop_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// SyncSegments provides a mock function with given fields: _a0, _a1
|
|
func (_m *MockDataNode) SyncSegments(_a0 context.Context, _a1 *datapb.SyncSegmentsRequest) (*commonpb.Status, error) {
|
|
ret := _m.Called(_a0, _a1)
|
|
|
|
var r0 *commonpb.Status
|
|
var r1 error
|
|
if rf, ok := ret.Get(0).(func(context.Context, *datapb.SyncSegmentsRequest) (*commonpb.Status, error)); ok {
|
|
return rf(_a0, _a1)
|
|
}
|
|
if rf, ok := ret.Get(0).(func(context.Context, *datapb.SyncSegmentsRequest) *commonpb.Status); ok {
|
|
r0 = rf(_a0, _a1)
|
|
} else {
|
|
if ret.Get(0) != nil {
|
|
r0 = ret.Get(0).(*commonpb.Status)
|
|
}
|
|
}
|
|
|
|
if rf, ok := ret.Get(1).(func(context.Context, *datapb.SyncSegmentsRequest) error); ok {
|
|
r1 = rf(_a0, _a1)
|
|
} else {
|
|
r1 = ret.Error(1)
|
|
}
|
|
|
|
return r0, r1
|
|
}
|
|
|
|
// MockDataNode_SyncSegments_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SyncSegments'
|
|
type MockDataNode_SyncSegments_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// SyncSegments is a helper method to define mock.On call
|
|
// - _a0 context.Context
|
|
// - _a1 *datapb.SyncSegmentsRequest
|
|
func (_e *MockDataNode_Expecter) SyncSegments(_a0 interface{}, _a1 interface{}) *MockDataNode_SyncSegments_Call {
|
|
return &MockDataNode_SyncSegments_Call{Call: _e.mock.On("SyncSegments", _a0, _a1)}
|
|
}
|
|
|
|
func (_c *MockDataNode_SyncSegments_Call) Run(run func(_a0 context.Context, _a1 *datapb.SyncSegmentsRequest)) *MockDataNode_SyncSegments_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
run(args[0].(context.Context), args[1].(*datapb.SyncSegmentsRequest))
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *MockDataNode_SyncSegments_Call) Return(_a0 *commonpb.Status, _a1 error) *MockDataNode_SyncSegments_Call {
|
|
_c.Call.Return(_a0, _a1)
|
|
return _c
|
|
}
|
|
|
|
func (_c *MockDataNode_SyncSegments_Call) RunAndReturn(run func(context.Context, *datapb.SyncSegmentsRequest) (*commonpb.Status, error)) *MockDataNode_SyncSegments_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// UpdateStateCode provides a mock function with given fields: stateCode
|
|
func (_m *MockDataNode) UpdateStateCode(stateCode commonpb.StateCode) {
|
|
_m.Called(stateCode)
|
|
}
|
|
|
|
// MockDataNode_UpdateStateCode_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UpdateStateCode'
|
|
type MockDataNode_UpdateStateCode_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// UpdateStateCode is a helper method to define mock.On call
|
|
// - stateCode commonpb.StateCode
|
|
func (_e *MockDataNode_Expecter) UpdateStateCode(stateCode interface{}) *MockDataNode_UpdateStateCode_Call {
|
|
return &MockDataNode_UpdateStateCode_Call{Call: _e.mock.On("UpdateStateCode", stateCode)}
|
|
}
|
|
|
|
func (_c *MockDataNode_UpdateStateCode_Call) Run(run func(stateCode commonpb.StateCode)) *MockDataNode_UpdateStateCode_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
run(args[0].(commonpb.StateCode))
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *MockDataNode_UpdateStateCode_Call) Return() *MockDataNode_UpdateStateCode_Call {
|
|
_c.Call.Return()
|
|
return _c
|
|
}
|
|
|
|
func (_c *MockDataNode_UpdateStateCode_Call) RunAndReturn(run func(commonpb.StateCode)) *MockDataNode_UpdateStateCode_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// WatchDmChannels provides a mock function with given fields: _a0, _a1
|
|
func (_m *MockDataNode) WatchDmChannels(_a0 context.Context, _a1 *datapb.WatchDmChannelsRequest) (*commonpb.Status, error) {
|
|
ret := _m.Called(_a0, _a1)
|
|
|
|
var r0 *commonpb.Status
|
|
var r1 error
|
|
if rf, ok := ret.Get(0).(func(context.Context, *datapb.WatchDmChannelsRequest) (*commonpb.Status, error)); ok {
|
|
return rf(_a0, _a1)
|
|
}
|
|
if rf, ok := ret.Get(0).(func(context.Context, *datapb.WatchDmChannelsRequest) *commonpb.Status); ok {
|
|
r0 = rf(_a0, _a1)
|
|
} else {
|
|
if ret.Get(0) != nil {
|
|
r0 = ret.Get(0).(*commonpb.Status)
|
|
}
|
|
}
|
|
|
|
if rf, ok := ret.Get(1).(func(context.Context, *datapb.WatchDmChannelsRequest) error); ok {
|
|
r1 = rf(_a0, _a1)
|
|
} else {
|
|
r1 = ret.Error(1)
|
|
}
|
|
|
|
return r0, r1
|
|
}
|
|
|
|
// MockDataNode_WatchDmChannels_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'WatchDmChannels'
|
|
type MockDataNode_WatchDmChannels_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// WatchDmChannels is a helper method to define mock.On call
|
|
// - _a0 context.Context
|
|
// - _a1 *datapb.WatchDmChannelsRequest
|
|
func (_e *MockDataNode_Expecter) WatchDmChannels(_a0 interface{}, _a1 interface{}) *MockDataNode_WatchDmChannels_Call {
|
|
return &MockDataNode_WatchDmChannels_Call{Call: _e.mock.On("WatchDmChannels", _a0, _a1)}
|
|
}
|
|
|
|
func (_c *MockDataNode_WatchDmChannels_Call) Run(run func(_a0 context.Context, _a1 *datapb.WatchDmChannelsRequest)) *MockDataNode_WatchDmChannels_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
run(args[0].(context.Context), args[1].(*datapb.WatchDmChannelsRequest))
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *MockDataNode_WatchDmChannels_Call) Return(_a0 *commonpb.Status, _a1 error) *MockDataNode_WatchDmChannels_Call {
|
|
_c.Call.Return(_a0, _a1)
|
|
return _c
|
|
}
|
|
|
|
func (_c *MockDataNode_WatchDmChannels_Call) RunAndReturn(run func(context.Context, *datapb.WatchDmChannelsRequest) (*commonpb.Status, error)) *MockDataNode_WatchDmChannels_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// NewMockDataNode creates a new instance of MockDataNode. 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 NewMockDataNode(t interface {
|
|
mock.TestingT
|
|
Cleanup(func())
|
|
}) *MockDataNode {
|
|
mock := &MockDataNode{}
|
|
mock.Mock.Test(t)
|
|
|
|
t.Cleanup(func() { mock.AssertExpectations(t) })
|
|
|
|
return mock
|
|
}
|