milvus/internal/mocks/mock_datanode.go
aoiasd 354ab2f55e
enhance: sync file resource to querynode and datanode (#44480)
relate:https://github.com/milvus-io/milvus/issues/43687
Support use file resource with sync mode.
Auto download or remove file resource to local when user add or remove
file resource.
Sync file resource to node when find new node session.

---------

Signed-off-by: aoiasd <zhicheng.yue@zilliz.com>
2025-12-04 16:23:11 +08:00

2291 lines
74 KiB
Go

// Code generated by mockery v2.53.3. 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/pkg/v2/proto/datapb"
internalpb "github.com/milvus-io/milvus/pkg/v2/proto/internalpb"
milvuspb "github.com/milvus-io/milvus-proto/go-api/v2/milvuspb"
mock "github.com/stretchr/testify/mock"
workerpb "github.com/milvus-io/milvus/pkg/v2/proto/workerpb"
)
// 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)
if len(ret) == 0 {
panic("no return value specified for CheckChannelOperationProgress")
}
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)
if len(ret) == 0 {
panic("no return value specified for CompactionV2")
}
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
}
// CreateJob provides a mock function with given fields: _a0, _a1
func (_m *MockDataNode) CreateJob(_a0 context.Context, _a1 *workerpb.CreateJobRequest) (*commonpb.Status, error) {
ret := _m.Called(_a0, _a1)
if len(ret) == 0 {
panic("no return value specified for CreateJob")
}
var r0 *commonpb.Status
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, *workerpb.CreateJobRequest) (*commonpb.Status, error)); ok {
return rf(_a0, _a1)
}
if rf, ok := ret.Get(0).(func(context.Context, *workerpb.CreateJobRequest) *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, *workerpb.CreateJobRequest) error); ok {
r1 = rf(_a0, _a1)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// MockDataNode_CreateJob_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CreateJob'
type MockDataNode_CreateJob_Call struct {
*mock.Call
}
// CreateJob is a helper method to define mock.On call
// - _a0 context.Context
// - _a1 *workerpb.CreateJobRequest
func (_e *MockDataNode_Expecter) CreateJob(_a0 interface{}, _a1 interface{}) *MockDataNode_CreateJob_Call {
return &MockDataNode_CreateJob_Call{Call: _e.mock.On("CreateJob", _a0, _a1)}
}
func (_c *MockDataNode_CreateJob_Call) Run(run func(_a0 context.Context, _a1 *workerpb.CreateJobRequest)) *MockDataNode_CreateJob_Call {
_c.Call.Run(func(args mock.Arguments) {
run(args[0].(context.Context), args[1].(*workerpb.CreateJobRequest))
})
return _c
}
func (_c *MockDataNode_CreateJob_Call) Return(_a0 *commonpb.Status, _a1 error) *MockDataNode_CreateJob_Call {
_c.Call.Return(_a0, _a1)
return _c
}
func (_c *MockDataNode_CreateJob_Call) RunAndReturn(run func(context.Context, *workerpb.CreateJobRequest) (*commonpb.Status, error)) *MockDataNode_CreateJob_Call {
_c.Call.Return(run)
return _c
}
// CreateJobV2 provides a mock function with given fields: _a0, _a1
func (_m *MockDataNode) CreateJobV2(_a0 context.Context, _a1 *workerpb.CreateJobV2Request) (*commonpb.Status, error) {
ret := _m.Called(_a0, _a1)
if len(ret) == 0 {
panic("no return value specified for CreateJobV2")
}
var r0 *commonpb.Status
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, *workerpb.CreateJobV2Request) (*commonpb.Status, error)); ok {
return rf(_a0, _a1)
}
if rf, ok := ret.Get(0).(func(context.Context, *workerpb.CreateJobV2Request) *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, *workerpb.CreateJobV2Request) error); ok {
r1 = rf(_a0, _a1)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// MockDataNode_CreateJobV2_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CreateJobV2'
type MockDataNode_CreateJobV2_Call struct {
*mock.Call
}
// CreateJobV2 is a helper method to define mock.On call
// - _a0 context.Context
// - _a1 *workerpb.CreateJobV2Request
func (_e *MockDataNode_Expecter) CreateJobV2(_a0 interface{}, _a1 interface{}) *MockDataNode_CreateJobV2_Call {
return &MockDataNode_CreateJobV2_Call{Call: _e.mock.On("CreateJobV2", _a0, _a1)}
}
func (_c *MockDataNode_CreateJobV2_Call) Run(run func(_a0 context.Context, _a1 *workerpb.CreateJobV2Request)) *MockDataNode_CreateJobV2_Call {
_c.Call.Run(func(args mock.Arguments) {
run(args[0].(context.Context), args[1].(*workerpb.CreateJobV2Request))
})
return _c
}
func (_c *MockDataNode_CreateJobV2_Call) Return(_a0 *commonpb.Status, _a1 error) *MockDataNode_CreateJobV2_Call {
_c.Call.Return(_a0, _a1)
return _c
}
func (_c *MockDataNode_CreateJobV2_Call) RunAndReturn(run func(context.Context, *workerpb.CreateJobV2Request) (*commonpb.Status, error)) *MockDataNode_CreateJobV2_Call {
_c.Call.Return(run)
return _c
}
// CreateTask provides a mock function with given fields: _a0, _a1
func (_m *MockDataNode) CreateTask(_a0 context.Context, _a1 *workerpb.CreateTaskRequest) (*commonpb.Status, error) {
ret := _m.Called(_a0, _a1)
if len(ret) == 0 {
panic("no return value specified for CreateTask")
}
var r0 *commonpb.Status
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, *workerpb.CreateTaskRequest) (*commonpb.Status, error)); ok {
return rf(_a0, _a1)
}
if rf, ok := ret.Get(0).(func(context.Context, *workerpb.CreateTaskRequest) *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, *workerpb.CreateTaskRequest) error); ok {
r1 = rf(_a0, _a1)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// MockDataNode_CreateTask_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CreateTask'
type MockDataNode_CreateTask_Call struct {
*mock.Call
}
// CreateTask is a helper method to define mock.On call
// - _a0 context.Context
// - _a1 *workerpb.CreateTaskRequest
func (_e *MockDataNode_Expecter) CreateTask(_a0 interface{}, _a1 interface{}) *MockDataNode_CreateTask_Call {
return &MockDataNode_CreateTask_Call{Call: _e.mock.On("CreateTask", _a0, _a1)}
}
func (_c *MockDataNode_CreateTask_Call) Run(run func(_a0 context.Context, _a1 *workerpb.CreateTaskRequest)) *MockDataNode_CreateTask_Call {
_c.Call.Run(func(args mock.Arguments) {
run(args[0].(context.Context), args[1].(*workerpb.CreateTaskRequest))
})
return _c
}
func (_c *MockDataNode_CreateTask_Call) Return(_a0 *commonpb.Status, _a1 error) *MockDataNode_CreateTask_Call {
_c.Call.Return(_a0, _a1)
return _c
}
func (_c *MockDataNode_CreateTask_Call) RunAndReturn(run func(context.Context, *workerpb.CreateTaskRequest) (*commonpb.Status, error)) *MockDataNode_CreateTask_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)
if len(ret) == 0 {
panic("no return value specified for DropCompactionPlan")
}
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)
if len(ret) == 0 {
panic("no return value specified for DropImport")
}
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
}
// DropJobs provides a mock function with given fields: _a0, _a1
func (_m *MockDataNode) DropJobs(_a0 context.Context, _a1 *workerpb.DropJobsRequest) (*commonpb.Status, error) {
ret := _m.Called(_a0, _a1)
if len(ret) == 0 {
panic("no return value specified for DropJobs")
}
var r0 *commonpb.Status
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, *workerpb.DropJobsRequest) (*commonpb.Status, error)); ok {
return rf(_a0, _a1)
}
if rf, ok := ret.Get(0).(func(context.Context, *workerpb.DropJobsRequest) *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, *workerpb.DropJobsRequest) error); ok {
r1 = rf(_a0, _a1)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// MockDataNode_DropJobs_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DropJobs'
type MockDataNode_DropJobs_Call struct {
*mock.Call
}
// DropJobs is a helper method to define mock.On call
// - _a0 context.Context
// - _a1 *workerpb.DropJobsRequest
func (_e *MockDataNode_Expecter) DropJobs(_a0 interface{}, _a1 interface{}) *MockDataNode_DropJobs_Call {
return &MockDataNode_DropJobs_Call{Call: _e.mock.On("DropJobs", _a0, _a1)}
}
func (_c *MockDataNode_DropJobs_Call) Run(run func(_a0 context.Context, _a1 *workerpb.DropJobsRequest)) *MockDataNode_DropJobs_Call {
_c.Call.Run(func(args mock.Arguments) {
run(args[0].(context.Context), args[1].(*workerpb.DropJobsRequest))
})
return _c
}
func (_c *MockDataNode_DropJobs_Call) Return(_a0 *commonpb.Status, _a1 error) *MockDataNode_DropJobs_Call {
_c.Call.Return(_a0, _a1)
return _c
}
func (_c *MockDataNode_DropJobs_Call) RunAndReturn(run func(context.Context, *workerpb.DropJobsRequest) (*commonpb.Status, error)) *MockDataNode_DropJobs_Call {
_c.Call.Return(run)
return _c
}
// DropJobsV2 provides a mock function with given fields: _a0, _a1
func (_m *MockDataNode) DropJobsV2(_a0 context.Context, _a1 *workerpb.DropJobsV2Request) (*commonpb.Status, error) {
ret := _m.Called(_a0, _a1)
if len(ret) == 0 {
panic("no return value specified for DropJobsV2")
}
var r0 *commonpb.Status
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, *workerpb.DropJobsV2Request) (*commonpb.Status, error)); ok {
return rf(_a0, _a1)
}
if rf, ok := ret.Get(0).(func(context.Context, *workerpb.DropJobsV2Request) *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, *workerpb.DropJobsV2Request) error); ok {
r1 = rf(_a0, _a1)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// MockDataNode_DropJobsV2_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DropJobsV2'
type MockDataNode_DropJobsV2_Call struct {
*mock.Call
}
// DropJobsV2 is a helper method to define mock.On call
// - _a0 context.Context
// - _a1 *workerpb.DropJobsV2Request
func (_e *MockDataNode_Expecter) DropJobsV2(_a0 interface{}, _a1 interface{}) *MockDataNode_DropJobsV2_Call {
return &MockDataNode_DropJobsV2_Call{Call: _e.mock.On("DropJobsV2", _a0, _a1)}
}
func (_c *MockDataNode_DropJobsV2_Call) Run(run func(_a0 context.Context, _a1 *workerpb.DropJobsV2Request)) *MockDataNode_DropJobsV2_Call {
_c.Call.Run(func(args mock.Arguments) {
run(args[0].(context.Context), args[1].(*workerpb.DropJobsV2Request))
})
return _c
}
func (_c *MockDataNode_DropJobsV2_Call) Return(_a0 *commonpb.Status, _a1 error) *MockDataNode_DropJobsV2_Call {
_c.Call.Return(_a0, _a1)
return _c
}
func (_c *MockDataNode_DropJobsV2_Call) RunAndReturn(run func(context.Context, *workerpb.DropJobsV2Request) (*commonpb.Status, error)) *MockDataNode_DropJobsV2_Call {
_c.Call.Return(run)
return _c
}
// DropTask provides a mock function with given fields: _a0, _a1
func (_m *MockDataNode) DropTask(_a0 context.Context, _a1 *workerpb.DropTaskRequest) (*commonpb.Status, error) {
ret := _m.Called(_a0, _a1)
if len(ret) == 0 {
panic("no return value specified for DropTask")
}
var r0 *commonpb.Status
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, *workerpb.DropTaskRequest) (*commonpb.Status, error)); ok {
return rf(_a0, _a1)
}
if rf, ok := ret.Get(0).(func(context.Context, *workerpb.DropTaskRequest) *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, *workerpb.DropTaskRequest) error); ok {
r1 = rf(_a0, _a1)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// MockDataNode_DropTask_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DropTask'
type MockDataNode_DropTask_Call struct {
*mock.Call
}
// DropTask is a helper method to define mock.On call
// - _a0 context.Context
// - _a1 *workerpb.DropTaskRequest
func (_e *MockDataNode_Expecter) DropTask(_a0 interface{}, _a1 interface{}) *MockDataNode_DropTask_Call {
return &MockDataNode_DropTask_Call{Call: _e.mock.On("DropTask", _a0, _a1)}
}
func (_c *MockDataNode_DropTask_Call) Run(run func(_a0 context.Context, _a1 *workerpb.DropTaskRequest)) *MockDataNode_DropTask_Call {
_c.Call.Run(func(args mock.Arguments) {
run(args[0].(context.Context), args[1].(*workerpb.DropTaskRequest))
})
return _c
}
func (_c *MockDataNode_DropTask_Call) Return(_a0 *commonpb.Status, _a1 error) *MockDataNode_DropTask_Call {
_c.Call.Return(_a0, _a1)
return _c
}
func (_c *MockDataNode_DropTask_Call) RunAndReturn(run func(context.Context, *workerpb.DropTaskRequest) (*commonpb.Status, error)) *MockDataNode_DropTask_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)
if len(ret) == 0 {
panic("no return value specified for FlushChannels")
}
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)
if len(ret) == 0 {
panic("no return value specified for FlushSegments")
}
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 no fields
func (_m *MockDataNode) GetAddress() string {
ret := _m.Called()
if len(ret) == 0 {
panic("no return value specified for GetAddress")
}
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)
if len(ret) == 0 {
panic("no return value specified for GetCompactionState")
}
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)
if len(ret) == 0 {
panic("no return value specified for GetComponentStates")
}
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
}
// GetJobStats provides a mock function with given fields: _a0, _a1
func (_m *MockDataNode) GetJobStats(_a0 context.Context, _a1 *workerpb.GetJobStatsRequest) (*workerpb.GetJobStatsResponse, error) {
ret := _m.Called(_a0, _a1)
if len(ret) == 0 {
panic("no return value specified for GetJobStats")
}
var r0 *workerpb.GetJobStatsResponse
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, *workerpb.GetJobStatsRequest) (*workerpb.GetJobStatsResponse, error)); ok {
return rf(_a0, _a1)
}
if rf, ok := ret.Get(0).(func(context.Context, *workerpb.GetJobStatsRequest) *workerpb.GetJobStatsResponse); ok {
r0 = rf(_a0, _a1)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(*workerpb.GetJobStatsResponse)
}
}
if rf, ok := ret.Get(1).(func(context.Context, *workerpb.GetJobStatsRequest) error); ok {
r1 = rf(_a0, _a1)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// MockDataNode_GetJobStats_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetJobStats'
type MockDataNode_GetJobStats_Call struct {
*mock.Call
}
// GetJobStats is a helper method to define mock.On call
// - _a0 context.Context
// - _a1 *workerpb.GetJobStatsRequest
func (_e *MockDataNode_Expecter) GetJobStats(_a0 interface{}, _a1 interface{}) *MockDataNode_GetJobStats_Call {
return &MockDataNode_GetJobStats_Call{Call: _e.mock.On("GetJobStats", _a0, _a1)}
}
func (_c *MockDataNode_GetJobStats_Call) Run(run func(_a0 context.Context, _a1 *workerpb.GetJobStatsRequest)) *MockDataNode_GetJobStats_Call {
_c.Call.Run(func(args mock.Arguments) {
run(args[0].(context.Context), args[1].(*workerpb.GetJobStatsRequest))
})
return _c
}
func (_c *MockDataNode_GetJobStats_Call) Return(_a0 *workerpb.GetJobStatsResponse, _a1 error) *MockDataNode_GetJobStats_Call {
_c.Call.Return(_a0, _a1)
return _c
}
func (_c *MockDataNode_GetJobStats_Call) RunAndReturn(run func(context.Context, *workerpb.GetJobStatsRequest) (*workerpb.GetJobStatsResponse, error)) *MockDataNode_GetJobStats_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)
if len(ret) == 0 {
panic("no return value specified for GetMetrics")
}
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 no fields
func (_m *MockDataNode) GetNodeID() int64 {
ret := _m.Called()
if len(ret) == 0 {
panic("no return value specified for GetNodeID")
}
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 no fields
func (_m *MockDataNode) GetStateCode() commonpb.StateCode {
ret := _m.Called()
if len(ret) == 0 {
panic("no return value specified for GetStateCode")
}
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)
if len(ret) == 0 {
panic("no return value specified for GetStatisticsChannel")
}
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)
if len(ret) == 0 {
panic("no return value specified for ImportV2")
}
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 no fields
func (_m *MockDataNode) Init() error {
ret := _m.Called()
if len(ret) == 0 {
panic("no return value specified for Init")
}
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)
if len(ret) == 0 {
panic("no return value specified for NotifyChannelOperation")
}
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)
if len(ret) == 0 {
panic("no return value specified for PreImport")
}
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)
if len(ret) == 0 {
panic("no return value specified for QueryImport")
}
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
}
// QueryJobs provides a mock function with given fields: _a0, _a1
func (_m *MockDataNode) QueryJobs(_a0 context.Context, _a1 *workerpb.QueryJobsRequest) (*workerpb.QueryJobsResponse, error) {
ret := _m.Called(_a0, _a1)
if len(ret) == 0 {
panic("no return value specified for QueryJobs")
}
var r0 *workerpb.QueryJobsResponse
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, *workerpb.QueryJobsRequest) (*workerpb.QueryJobsResponse, error)); ok {
return rf(_a0, _a1)
}
if rf, ok := ret.Get(0).(func(context.Context, *workerpb.QueryJobsRequest) *workerpb.QueryJobsResponse); ok {
r0 = rf(_a0, _a1)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(*workerpb.QueryJobsResponse)
}
}
if rf, ok := ret.Get(1).(func(context.Context, *workerpb.QueryJobsRequest) error); ok {
r1 = rf(_a0, _a1)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// MockDataNode_QueryJobs_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'QueryJobs'
type MockDataNode_QueryJobs_Call struct {
*mock.Call
}
// QueryJobs is a helper method to define mock.On call
// - _a0 context.Context
// - _a1 *workerpb.QueryJobsRequest
func (_e *MockDataNode_Expecter) QueryJobs(_a0 interface{}, _a1 interface{}) *MockDataNode_QueryJobs_Call {
return &MockDataNode_QueryJobs_Call{Call: _e.mock.On("QueryJobs", _a0, _a1)}
}
func (_c *MockDataNode_QueryJobs_Call) Run(run func(_a0 context.Context, _a1 *workerpb.QueryJobsRequest)) *MockDataNode_QueryJobs_Call {
_c.Call.Run(func(args mock.Arguments) {
run(args[0].(context.Context), args[1].(*workerpb.QueryJobsRequest))
})
return _c
}
func (_c *MockDataNode_QueryJobs_Call) Return(_a0 *workerpb.QueryJobsResponse, _a1 error) *MockDataNode_QueryJobs_Call {
_c.Call.Return(_a0, _a1)
return _c
}
func (_c *MockDataNode_QueryJobs_Call) RunAndReturn(run func(context.Context, *workerpb.QueryJobsRequest) (*workerpb.QueryJobsResponse, error)) *MockDataNode_QueryJobs_Call {
_c.Call.Return(run)
return _c
}
// QueryJobsV2 provides a mock function with given fields: _a0, _a1
func (_m *MockDataNode) QueryJobsV2(_a0 context.Context, _a1 *workerpb.QueryJobsV2Request) (*workerpb.QueryJobsV2Response, error) {
ret := _m.Called(_a0, _a1)
if len(ret) == 0 {
panic("no return value specified for QueryJobsV2")
}
var r0 *workerpb.QueryJobsV2Response
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, *workerpb.QueryJobsV2Request) (*workerpb.QueryJobsV2Response, error)); ok {
return rf(_a0, _a1)
}
if rf, ok := ret.Get(0).(func(context.Context, *workerpb.QueryJobsV2Request) *workerpb.QueryJobsV2Response); ok {
r0 = rf(_a0, _a1)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(*workerpb.QueryJobsV2Response)
}
}
if rf, ok := ret.Get(1).(func(context.Context, *workerpb.QueryJobsV2Request) error); ok {
r1 = rf(_a0, _a1)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// MockDataNode_QueryJobsV2_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'QueryJobsV2'
type MockDataNode_QueryJobsV2_Call struct {
*mock.Call
}
// QueryJobsV2 is a helper method to define mock.On call
// - _a0 context.Context
// - _a1 *workerpb.QueryJobsV2Request
func (_e *MockDataNode_Expecter) QueryJobsV2(_a0 interface{}, _a1 interface{}) *MockDataNode_QueryJobsV2_Call {
return &MockDataNode_QueryJobsV2_Call{Call: _e.mock.On("QueryJobsV2", _a0, _a1)}
}
func (_c *MockDataNode_QueryJobsV2_Call) Run(run func(_a0 context.Context, _a1 *workerpb.QueryJobsV2Request)) *MockDataNode_QueryJobsV2_Call {
_c.Call.Run(func(args mock.Arguments) {
run(args[0].(context.Context), args[1].(*workerpb.QueryJobsV2Request))
})
return _c
}
func (_c *MockDataNode_QueryJobsV2_Call) Return(_a0 *workerpb.QueryJobsV2Response, _a1 error) *MockDataNode_QueryJobsV2_Call {
_c.Call.Return(_a0, _a1)
return _c
}
func (_c *MockDataNode_QueryJobsV2_Call) RunAndReturn(run func(context.Context, *workerpb.QueryJobsV2Request) (*workerpb.QueryJobsV2Response, error)) *MockDataNode_QueryJobsV2_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)
if len(ret) == 0 {
panic("no return value specified for QueryPreImport")
}
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)
if len(ret) == 0 {
panic("no return value specified for QuerySlot")
}
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
}
// QueryTask provides a mock function with given fields: _a0, _a1
func (_m *MockDataNode) QueryTask(_a0 context.Context, _a1 *workerpb.QueryTaskRequest) (*workerpb.QueryTaskResponse, error) {
ret := _m.Called(_a0, _a1)
if len(ret) == 0 {
panic("no return value specified for QueryTask")
}
var r0 *workerpb.QueryTaskResponse
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, *workerpb.QueryTaskRequest) (*workerpb.QueryTaskResponse, error)); ok {
return rf(_a0, _a1)
}
if rf, ok := ret.Get(0).(func(context.Context, *workerpb.QueryTaskRequest) *workerpb.QueryTaskResponse); ok {
r0 = rf(_a0, _a1)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(*workerpb.QueryTaskResponse)
}
}
if rf, ok := ret.Get(1).(func(context.Context, *workerpb.QueryTaskRequest) error); ok {
r1 = rf(_a0, _a1)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// MockDataNode_QueryTask_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'QueryTask'
type MockDataNode_QueryTask_Call struct {
*mock.Call
}
// QueryTask is a helper method to define mock.On call
// - _a0 context.Context
// - _a1 *workerpb.QueryTaskRequest
func (_e *MockDataNode_Expecter) QueryTask(_a0 interface{}, _a1 interface{}) *MockDataNode_QueryTask_Call {
return &MockDataNode_QueryTask_Call{Call: _e.mock.On("QueryTask", _a0, _a1)}
}
func (_c *MockDataNode_QueryTask_Call) Run(run func(_a0 context.Context, _a1 *workerpb.QueryTaskRequest)) *MockDataNode_QueryTask_Call {
_c.Call.Run(func(args mock.Arguments) {
run(args[0].(context.Context), args[1].(*workerpb.QueryTaskRequest))
})
return _c
}
func (_c *MockDataNode_QueryTask_Call) Return(_a0 *workerpb.QueryTaskResponse, _a1 error) *MockDataNode_QueryTask_Call {
_c.Call.Return(_a0, _a1)
return _c
}
func (_c *MockDataNode_QueryTask_Call) RunAndReturn(run func(context.Context, *workerpb.QueryTaskRequest) (*workerpb.QueryTaskResponse, error)) *MockDataNode_QueryTask_Call {
_c.Call.Return(run)
return _c
}
// Register provides a mock function with no fields
func (_m *MockDataNode) Register() error {
ret := _m.Called()
if len(ret) == 0 {
panic("no return value specified for Register")
}
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)
if len(ret) == 0 {
panic("no return value specified for ResendSegmentStats")
}
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.Run(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.Run(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)
if len(ret) == 0 {
panic("no return value specified for ShowConfigurations")
}
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 no fields
func (_m *MockDataNode) Start() error {
ret := _m.Called()
if len(ret) == 0 {
panic("no return value specified for Start")
}
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 no fields
func (_m *MockDataNode) Stop() error {
ret := _m.Called()
if len(ret) == 0 {
panic("no return value specified for Stop")
}
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
}
// SyncFileResource provides a mock function with given fields: _a0, _a1
func (_m *MockDataNode) SyncFileResource(_a0 context.Context, _a1 *internalpb.SyncFileResourceRequest) (*commonpb.Status, error) {
ret := _m.Called(_a0, _a1)
if len(ret) == 0 {
panic("no return value specified for SyncFileResource")
}
var r0 *commonpb.Status
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, *internalpb.SyncFileResourceRequest) (*commonpb.Status, error)); ok {
return rf(_a0, _a1)
}
if rf, ok := ret.Get(0).(func(context.Context, *internalpb.SyncFileResourceRequest) *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, *internalpb.SyncFileResourceRequest) error); ok {
r1 = rf(_a0, _a1)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// MockDataNode_SyncFileResource_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SyncFileResource'
type MockDataNode_SyncFileResource_Call struct {
*mock.Call
}
// SyncFileResource is a helper method to define mock.On call
// - _a0 context.Context
// - _a1 *internalpb.SyncFileResourceRequest
func (_e *MockDataNode_Expecter) SyncFileResource(_a0 interface{}, _a1 interface{}) *MockDataNode_SyncFileResource_Call {
return &MockDataNode_SyncFileResource_Call{Call: _e.mock.On("SyncFileResource", _a0, _a1)}
}
func (_c *MockDataNode_SyncFileResource_Call) Run(run func(_a0 context.Context, _a1 *internalpb.SyncFileResourceRequest)) *MockDataNode_SyncFileResource_Call {
_c.Call.Run(func(args mock.Arguments) {
run(args[0].(context.Context), args[1].(*internalpb.SyncFileResourceRequest))
})
return _c
}
func (_c *MockDataNode_SyncFileResource_Call) Return(_a0 *commonpb.Status, _a1 error) *MockDataNode_SyncFileResource_Call {
_c.Call.Return(_a0, _a1)
return _c
}
func (_c *MockDataNode_SyncFileResource_Call) RunAndReturn(run func(context.Context, *internalpb.SyncFileResourceRequest) (*commonpb.Status, error)) *MockDataNode_SyncFileResource_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)
if len(ret) == 0 {
panic("no return value specified for SyncSegments")
}
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.Run(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)
if len(ret) == 0 {
panic("no return value specified for WatchDmChannels")
}
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
}