milvus/internal/mocks/mock_querynode.go
jaime 7f7c71ea7d
Decoupling client and server API in types interface (#27186)
Co-authored-by:: aoiasd <zhicheng.yue@zilliz.com>

Signed-off-by: jaime <yun.zhang@zilliz.com>
2023-09-26 09:57:25 +08:00

1646 lines
56 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"
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"
querypb "github.com/milvus-io/milvus/internal/proto/querypb"
)
// MockQueryNode is an autogenerated mock type for the QueryNodeComponent type
type MockQueryNode struct {
mock.Mock
}
type MockQueryNode_Expecter struct {
mock *mock.Mock
}
func (_m *MockQueryNode) EXPECT() *MockQueryNode_Expecter {
return &MockQueryNode_Expecter{mock: &_m.Mock}
}
// Delete provides a mock function with given fields: _a0, _a1
func (_m *MockQueryNode) Delete(_a0 context.Context, _a1 *querypb.DeleteRequest) (*commonpb.Status, error) {
ret := _m.Called(_a0, _a1)
var r0 *commonpb.Status
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, *querypb.DeleteRequest) (*commonpb.Status, error)); ok {
return rf(_a0, _a1)
}
if rf, ok := ret.Get(0).(func(context.Context, *querypb.DeleteRequest) *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, *querypb.DeleteRequest) error); ok {
r1 = rf(_a0, _a1)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// MockQueryNode_Delete_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Delete'
type MockQueryNode_Delete_Call struct {
*mock.Call
}
// Delete is a helper method to define mock.On call
// - _a0 context.Context
// - _a1 *querypb.DeleteRequest
func (_e *MockQueryNode_Expecter) Delete(_a0 interface{}, _a1 interface{}) *MockQueryNode_Delete_Call {
return &MockQueryNode_Delete_Call{Call: _e.mock.On("Delete", _a0, _a1)}
}
func (_c *MockQueryNode_Delete_Call) Run(run func(_a0 context.Context, _a1 *querypb.DeleteRequest)) *MockQueryNode_Delete_Call {
_c.Call.Run(func(args mock.Arguments) {
run(args[0].(context.Context), args[1].(*querypb.DeleteRequest))
})
return _c
}
func (_c *MockQueryNode_Delete_Call) Return(_a0 *commonpb.Status, _a1 error) *MockQueryNode_Delete_Call {
_c.Call.Return(_a0, _a1)
return _c
}
func (_c *MockQueryNode_Delete_Call) RunAndReturn(run func(context.Context, *querypb.DeleteRequest) (*commonpb.Status, error)) *MockQueryNode_Delete_Call {
_c.Call.Return(run)
return _c
}
// GetAddress provides a mock function with given fields:
func (_m *MockQueryNode) 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
}
// MockQueryNode_GetAddress_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetAddress'
type MockQueryNode_GetAddress_Call struct {
*mock.Call
}
// GetAddress is a helper method to define mock.On call
func (_e *MockQueryNode_Expecter) GetAddress() *MockQueryNode_GetAddress_Call {
return &MockQueryNode_GetAddress_Call{Call: _e.mock.On("GetAddress")}
}
func (_c *MockQueryNode_GetAddress_Call) Run(run func()) *MockQueryNode_GetAddress_Call {
_c.Call.Run(func(args mock.Arguments) {
run()
})
return _c
}
func (_c *MockQueryNode_GetAddress_Call) Return(_a0 string) *MockQueryNode_GetAddress_Call {
_c.Call.Return(_a0)
return _c
}
func (_c *MockQueryNode_GetAddress_Call) RunAndReturn(run func() string) *MockQueryNode_GetAddress_Call {
_c.Call.Return(run)
return _c
}
// GetComponentStates provides a mock function with given fields: _a0, _a1
func (_m *MockQueryNode) 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
}
// MockQueryNode_GetComponentStates_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetComponentStates'
type MockQueryNode_GetComponentStates_Call struct {
*mock.Call
}
// GetComponentStates is a helper method to define mock.On call
// - _a0 context.Context
// - _a1 *milvuspb.GetComponentStatesRequest
func (_e *MockQueryNode_Expecter) GetComponentStates(_a0 interface{}, _a1 interface{}) *MockQueryNode_GetComponentStates_Call {
return &MockQueryNode_GetComponentStates_Call{Call: _e.mock.On("GetComponentStates", _a0, _a1)}
}
func (_c *MockQueryNode_GetComponentStates_Call) Run(run func(_a0 context.Context, _a1 *milvuspb.GetComponentStatesRequest)) *MockQueryNode_GetComponentStates_Call {
_c.Call.Run(func(args mock.Arguments) {
run(args[0].(context.Context), args[1].(*milvuspb.GetComponentStatesRequest))
})
return _c
}
func (_c *MockQueryNode_GetComponentStates_Call) Return(_a0 *milvuspb.ComponentStates, _a1 error) *MockQueryNode_GetComponentStates_Call {
_c.Call.Return(_a0, _a1)
return _c
}
func (_c *MockQueryNode_GetComponentStates_Call) RunAndReturn(run func(context.Context, *milvuspb.GetComponentStatesRequest) (*milvuspb.ComponentStates, error)) *MockQueryNode_GetComponentStates_Call {
_c.Call.Return(run)
return _c
}
// GetDataDistribution provides a mock function with given fields: _a0, _a1
func (_m *MockQueryNode) GetDataDistribution(_a0 context.Context, _a1 *querypb.GetDataDistributionRequest) (*querypb.GetDataDistributionResponse, error) {
ret := _m.Called(_a0, _a1)
var r0 *querypb.GetDataDistributionResponse
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, *querypb.GetDataDistributionRequest) (*querypb.GetDataDistributionResponse, error)); ok {
return rf(_a0, _a1)
}
if rf, ok := ret.Get(0).(func(context.Context, *querypb.GetDataDistributionRequest) *querypb.GetDataDistributionResponse); ok {
r0 = rf(_a0, _a1)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(*querypb.GetDataDistributionResponse)
}
}
if rf, ok := ret.Get(1).(func(context.Context, *querypb.GetDataDistributionRequest) error); ok {
r1 = rf(_a0, _a1)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// MockQueryNode_GetDataDistribution_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetDataDistribution'
type MockQueryNode_GetDataDistribution_Call struct {
*mock.Call
}
// GetDataDistribution is a helper method to define mock.On call
// - _a0 context.Context
// - _a1 *querypb.GetDataDistributionRequest
func (_e *MockQueryNode_Expecter) GetDataDistribution(_a0 interface{}, _a1 interface{}) *MockQueryNode_GetDataDistribution_Call {
return &MockQueryNode_GetDataDistribution_Call{Call: _e.mock.On("GetDataDistribution", _a0, _a1)}
}
func (_c *MockQueryNode_GetDataDistribution_Call) Run(run func(_a0 context.Context, _a1 *querypb.GetDataDistributionRequest)) *MockQueryNode_GetDataDistribution_Call {
_c.Call.Run(func(args mock.Arguments) {
run(args[0].(context.Context), args[1].(*querypb.GetDataDistributionRequest))
})
return _c
}
func (_c *MockQueryNode_GetDataDistribution_Call) Return(_a0 *querypb.GetDataDistributionResponse, _a1 error) *MockQueryNode_GetDataDistribution_Call {
_c.Call.Return(_a0, _a1)
return _c
}
func (_c *MockQueryNode_GetDataDistribution_Call) RunAndReturn(run func(context.Context, *querypb.GetDataDistributionRequest) (*querypb.GetDataDistributionResponse, error)) *MockQueryNode_GetDataDistribution_Call {
_c.Call.Return(run)
return _c
}
// GetMetrics provides a mock function with given fields: _a0, _a1
func (_m *MockQueryNode) 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
}
// MockQueryNode_GetMetrics_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetMetrics'
type MockQueryNode_GetMetrics_Call struct {
*mock.Call
}
// GetMetrics is a helper method to define mock.On call
// - _a0 context.Context
// - _a1 *milvuspb.GetMetricsRequest
func (_e *MockQueryNode_Expecter) GetMetrics(_a0 interface{}, _a1 interface{}) *MockQueryNode_GetMetrics_Call {
return &MockQueryNode_GetMetrics_Call{Call: _e.mock.On("GetMetrics", _a0, _a1)}
}
func (_c *MockQueryNode_GetMetrics_Call) Run(run func(_a0 context.Context, _a1 *milvuspb.GetMetricsRequest)) *MockQueryNode_GetMetrics_Call {
_c.Call.Run(func(args mock.Arguments) {
run(args[0].(context.Context), args[1].(*milvuspb.GetMetricsRequest))
})
return _c
}
func (_c *MockQueryNode_GetMetrics_Call) Return(_a0 *milvuspb.GetMetricsResponse, _a1 error) *MockQueryNode_GetMetrics_Call {
_c.Call.Return(_a0, _a1)
return _c
}
func (_c *MockQueryNode_GetMetrics_Call) RunAndReturn(run func(context.Context, *milvuspb.GetMetricsRequest) (*milvuspb.GetMetricsResponse, error)) *MockQueryNode_GetMetrics_Call {
_c.Call.Return(run)
return _c
}
// GetSegmentInfo provides a mock function with given fields: _a0, _a1
func (_m *MockQueryNode) GetSegmentInfo(_a0 context.Context, _a1 *querypb.GetSegmentInfoRequest) (*querypb.GetSegmentInfoResponse, error) {
ret := _m.Called(_a0, _a1)
var r0 *querypb.GetSegmentInfoResponse
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, *querypb.GetSegmentInfoRequest) (*querypb.GetSegmentInfoResponse, error)); ok {
return rf(_a0, _a1)
}
if rf, ok := ret.Get(0).(func(context.Context, *querypb.GetSegmentInfoRequest) *querypb.GetSegmentInfoResponse); ok {
r0 = rf(_a0, _a1)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(*querypb.GetSegmentInfoResponse)
}
}
if rf, ok := ret.Get(1).(func(context.Context, *querypb.GetSegmentInfoRequest) error); ok {
r1 = rf(_a0, _a1)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// MockQueryNode_GetSegmentInfo_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetSegmentInfo'
type MockQueryNode_GetSegmentInfo_Call struct {
*mock.Call
}
// GetSegmentInfo is a helper method to define mock.On call
// - _a0 context.Context
// - _a1 *querypb.GetSegmentInfoRequest
func (_e *MockQueryNode_Expecter) GetSegmentInfo(_a0 interface{}, _a1 interface{}) *MockQueryNode_GetSegmentInfo_Call {
return &MockQueryNode_GetSegmentInfo_Call{Call: _e.mock.On("GetSegmentInfo", _a0, _a1)}
}
func (_c *MockQueryNode_GetSegmentInfo_Call) Run(run func(_a0 context.Context, _a1 *querypb.GetSegmentInfoRequest)) *MockQueryNode_GetSegmentInfo_Call {
_c.Call.Run(func(args mock.Arguments) {
run(args[0].(context.Context), args[1].(*querypb.GetSegmentInfoRequest))
})
return _c
}
func (_c *MockQueryNode_GetSegmentInfo_Call) Return(_a0 *querypb.GetSegmentInfoResponse, _a1 error) *MockQueryNode_GetSegmentInfo_Call {
_c.Call.Return(_a0, _a1)
return _c
}
func (_c *MockQueryNode_GetSegmentInfo_Call) RunAndReturn(run func(context.Context, *querypb.GetSegmentInfoRequest) (*querypb.GetSegmentInfoResponse, error)) *MockQueryNode_GetSegmentInfo_Call {
_c.Call.Return(run)
return _c
}
// GetStatistics provides a mock function with given fields: _a0, _a1
func (_m *MockQueryNode) GetStatistics(_a0 context.Context, _a1 *querypb.GetStatisticsRequest) (*internalpb.GetStatisticsResponse, error) {
ret := _m.Called(_a0, _a1)
var r0 *internalpb.GetStatisticsResponse
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, *querypb.GetStatisticsRequest) (*internalpb.GetStatisticsResponse, error)); ok {
return rf(_a0, _a1)
}
if rf, ok := ret.Get(0).(func(context.Context, *querypb.GetStatisticsRequest) *internalpb.GetStatisticsResponse); ok {
r0 = rf(_a0, _a1)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(*internalpb.GetStatisticsResponse)
}
}
if rf, ok := ret.Get(1).(func(context.Context, *querypb.GetStatisticsRequest) error); ok {
r1 = rf(_a0, _a1)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// MockQueryNode_GetStatistics_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetStatistics'
type MockQueryNode_GetStatistics_Call struct {
*mock.Call
}
// GetStatistics is a helper method to define mock.On call
// - _a0 context.Context
// - _a1 *querypb.GetStatisticsRequest
func (_e *MockQueryNode_Expecter) GetStatistics(_a0 interface{}, _a1 interface{}) *MockQueryNode_GetStatistics_Call {
return &MockQueryNode_GetStatistics_Call{Call: _e.mock.On("GetStatistics", _a0, _a1)}
}
func (_c *MockQueryNode_GetStatistics_Call) Run(run func(_a0 context.Context, _a1 *querypb.GetStatisticsRequest)) *MockQueryNode_GetStatistics_Call {
_c.Call.Run(func(args mock.Arguments) {
run(args[0].(context.Context), args[1].(*querypb.GetStatisticsRequest))
})
return _c
}
func (_c *MockQueryNode_GetStatistics_Call) Return(_a0 *internalpb.GetStatisticsResponse, _a1 error) *MockQueryNode_GetStatistics_Call {
_c.Call.Return(_a0, _a1)
return _c
}
func (_c *MockQueryNode_GetStatistics_Call) RunAndReturn(run func(context.Context, *querypb.GetStatisticsRequest) (*internalpb.GetStatisticsResponse, error)) *MockQueryNode_GetStatistics_Call {
_c.Call.Return(run)
return _c
}
// GetStatisticsChannel provides a mock function with given fields: _a0, _a1
func (_m *MockQueryNode) 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
}
// MockQueryNode_GetStatisticsChannel_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetStatisticsChannel'
type MockQueryNode_GetStatisticsChannel_Call struct {
*mock.Call
}
// GetStatisticsChannel is a helper method to define mock.On call
// - _a0 context.Context
// - _a1 *internalpb.GetStatisticsChannelRequest
func (_e *MockQueryNode_Expecter) GetStatisticsChannel(_a0 interface{}, _a1 interface{}) *MockQueryNode_GetStatisticsChannel_Call {
return &MockQueryNode_GetStatisticsChannel_Call{Call: _e.mock.On("GetStatisticsChannel", _a0, _a1)}
}
func (_c *MockQueryNode_GetStatisticsChannel_Call) Run(run func(_a0 context.Context, _a1 *internalpb.GetStatisticsChannelRequest)) *MockQueryNode_GetStatisticsChannel_Call {
_c.Call.Run(func(args mock.Arguments) {
run(args[0].(context.Context), args[1].(*internalpb.GetStatisticsChannelRequest))
})
return _c
}
func (_c *MockQueryNode_GetStatisticsChannel_Call) Return(_a0 *milvuspb.StringResponse, _a1 error) *MockQueryNode_GetStatisticsChannel_Call {
_c.Call.Return(_a0, _a1)
return _c
}
func (_c *MockQueryNode_GetStatisticsChannel_Call) RunAndReturn(run func(context.Context, *internalpb.GetStatisticsChannelRequest) (*milvuspb.StringResponse, error)) *MockQueryNode_GetStatisticsChannel_Call {
_c.Call.Return(run)
return _c
}
// GetTimeTickChannel provides a mock function with given fields: _a0, _a1
func (_m *MockQueryNode) GetTimeTickChannel(_a0 context.Context, _a1 *internalpb.GetTimeTickChannelRequest) (*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.GetTimeTickChannelRequest) (*milvuspb.StringResponse, error)); ok {
return rf(_a0, _a1)
}
if rf, ok := ret.Get(0).(func(context.Context, *internalpb.GetTimeTickChannelRequest) *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.GetTimeTickChannelRequest) error); ok {
r1 = rf(_a0, _a1)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// MockQueryNode_GetTimeTickChannel_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetTimeTickChannel'
type MockQueryNode_GetTimeTickChannel_Call struct {
*mock.Call
}
// GetTimeTickChannel is a helper method to define mock.On call
// - _a0 context.Context
// - _a1 *internalpb.GetTimeTickChannelRequest
func (_e *MockQueryNode_Expecter) GetTimeTickChannel(_a0 interface{}, _a1 interface{}) *MockQueryNode_GetTimeTickChannel_Call {
return &MockQueryNode_GetTimeTickChannel_Call{Call: _e.mock.On("GetTimeTickChannel", _a0, _a1)}
}
func (_c *MockQueryNode_GetTimeTickChannel_Call) Run(run func(_a0 context.Context, _a1 *internalpb.GetTimeTickChannelRequest)) *MockQueryNode_GetTimeTickChannel_Call {
_c.Call.Run(func(args mock.Arguments) {
run(args[0].(context.Context), args[1].(*internalpb.GetTimeTickChannelRequest))
})
return _c
}
func (_c *MockQueryNode_GetTimeTickChannel_Call) Return(_a0 *milvuspb.StringResponse, _a1 error) *MockQueryNode_GetTimeTickChannel_Call {
_c.Call.Return(_a0, _a1)
return _c
}
func (_c *MockQueryNode_GetTimeTickChannel_Call) RunAndReturn(run func(context.Context, *internalpb.GetTimeTickChannelRequest) (*milvuspb.StringResponse, error)) *MockQueryNode_GetTimeTickChannel_Call {
_c.Call.Return(run)
return _c
}
// Init provides a mock function with given fields:
func (_m *MockQueryNode) 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
}
// MockQueryNode_Init_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Init'
type MockQueryNode_Init_Call struct {
*mock.Call
}
// Init is a helper method to define mock.On call
func (_e *MockQueryNode_Expecter) Init() *MockQueryNode_Init_Call {
return &MockQueryNode_Init_Call{Call: _e.mock.On("Init")}
}
func (_c *MockQueryNode_Init_Call) Run(run func()) *MockQueryNode_Init_Call {
_c.Call.Run(func(args mock.Arguments) {
run()
})
return _c
}
func (_c *MockQueryNode_Init_Call) Return(_a0 error) *MockQueryNode_Init_Call {
_c.Call.Return(_a0)
return _c
}
func (_c *MockQueryNode_Init_Call) RunAndReturn(run func() error) *MockQueryNode_Init_Call {
_c.Call.Return(run)
return _c
}
// LoadPartitions provides a mock function with given fields: _a0, _a1
func (_m *MockQueryNode) LoadPartitions(_a0 context.Context, _a1 *querypb.LoadPartitionsRequest) (*commonpb.Status, error) {
ret := _m.Called(_a0, _a1)
var r0 *commonpb.Status
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, *querypb.LoadPartitionsRequest) (*commonpb.Status, error)); ok {
return rf(_a0, _a1)
}
if rf, ok := ret.Get(0).(func(context.Context, *querypb.LoadPartitionsRequest) *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, *querypb.LoadPartitionsRequest) error); ok {
r1 = rf(_a0, _a1)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// MockQueryNode_LoadPartitions_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'LoadPartitions'
type MockQueryNode_LoadPartitions_Call struct {
*mock.Call
}
// LoadPartitions is a helper method to define mock.On call
// - _a0 context.Context
// - _a1 *querypb.LoadPartitionsRequest
func (_e *MockQueryNode_Expecter) LoadPartitions(_a0 interface{}, _a1 interface{}) *MockQueryNode_LoadPartitions_Call {
return &MockQueryNode_LoadPartitions_Call{Call: _e.mock.On("LoadPartitions", _a0, _a1)}
}
func (_c *MockQueryNode_LoadPartitions_Call) Run(run func(_a0 context.Context, _a1 *querypb.LoadPartitionsRequest)) *MockQueryNode_LoadPartitions_Call {
_c.Call.Run(func(args mock.Arguments) {
run(args[0].(context.Context), args[1].(*querypb.LoadPartitionsRequest))
})
return _c
}
func (_c *MockQueryNode_LoadPartitions_Call) Return(_a0 *commonpb.Status, _a1 error) *MockQueryNode_LoadPartitions_Call {
_c.Call.Return(_a0, _a1)
return _c
}
func (_c *MockQueryNode_LoadPartitions_Call) RunAndReturn(run func(context.Context, *querypb.LoadPartitionsRequest) (*commonpb.Status, error)) *MockQueryNode_LoadPartitions_Call {
_c.Call.Return(run)
return _c
}
// LoadSegments provides a mock function with given fields: _a0, _a1
func (_m *MockQueryNode) LoadSegments(_a0 context.Context, _a1 *querypb.LoadSegmentsRequest) (*commonpb.Status, error) {
ret := _m.Called(_a0, _a1)
var r0 *commonpb.Status
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, *querypb.LoadSegmentsRequest) (*commonpb.Status, error)); ok {
return rf(_a0, _a1)
}
if rf, ok := ret.Get(0).(func(context.Context, *querypb.LoadSegmentsRequest) *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, *querypb.LoadSegmentsRequest) error); ok {
r1 = rf(_a0, _a1)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// MockQueryNode_LoadSegments_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'LoadSegments'
type MockQueryNode_LoadSegments_Call struct {
*mock.Call
}
// LoadSegments is a helper method to define mock.On call
// - _a0 context.Context
// - _a1 *querypb.LoadSegmentsRequest
func (_e *MockQueryNode_Expecter) LoadSegments(_a0 interface{}, _a1 interface{}) *MockQueryNode_LoadSegments_Call {
return &MockQueryNode_LoadSegments_Call{Call: _e.mock.On("LoadSegments", _a0, _a1)}
}
func (_c *MockQueryNode_LoadSegments_Call) Run(run func(_a0 context.Context, _a1 *querypb.LoadSegmentsRequest)) *MockQueryNode_LoadSegments_Call {
_c.Call.Run(func(args mock.Arguments) {
run(args[0].(context.Context), args[1].(*querypb.LoadSegmentsRequest))
})
return _c
}
func (_c *MockQueryNode_LoadSegments_Call) Return(_a0 *commonpb.Status, _a1 error) *MockQueryNode_LoadSegments_Call {
_c.Call.Return(_a0, _a1)
return _c
}
func (_c *MockQueryNode_LoadSegments_Call) RunAndReturn(run func(context.Context, *querypb.LoadSegmentsRequest) (*commonpb.Status, error)) *MockQueryNode_LoadSegments_Call {
_c.Call.Return(run)
return _c
}
// Query provides a mock function with given fields: _a0, _a1
func (_m *MockQueryNode) Query(_a0 context.Context, _a1 *querypb.QueryRequest) (*internalpb.RetrieveResults, error) {
ret := _m.Called(_a0, _a1)
var r0 *internalpb.RetrieveResults
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, *querypb.QueryRequest) (*internalpb.RetrieveResults, error)); ok {
return rf(_a0, _a1)
}
if rf, ok := ret.Get(0).(func(context.Context, *querypb.QueryRequest) *internalpb.RetrieveResults); ok {
r0 = rf(_a0, _a1)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(*internalpb.RetrieveResults)
}
}
if rf, ok := ret.Get(1).(func(context.Context, *querypb.QueryRequest) error); ok {
r1 = rf(_a0, _a1)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// MockQueryNode_Query_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Query'
type MockQueryNode_Query_Call struct {
*mock.Call
}
// Query is a helper method to define mock.On call
// - _a0 context.Context
// - _a1 *querypb.QueryRequest
func (_e *MockQueryNode_Expecter) Query(_a0 interface{}, _a1 interface{}) *MockQueryNode_Query_Call {
return &MockQueryNode_Query_Call{Call: _e.mock.On("Query", _a0, _a1)}
}
func (_c *MockQueryNode_Query_Call) Run(run func(_a0 context.Context, _a1 *querypb.QueryRequest)) *MockQueryNode_Query_Call {
_c.Call.Run(func(args mock.Arguments) {
run(args[0].(context.Context), args[1].(*querypb.QueryRequest))
})
return _c
}
func (_c *MockQueryNode_Query_Call) Return(_a0 *internalpb.RetrieveResults, _a1 error) *MockQueryNode_Query_Call {
_c.Call.Return(_a0, _a1)
return _c
}
func (_c *MockQueryNode_Query_Call) RunAndReturn(run func(context.Context, *querypb.QueryRequest) (*internalpb.RetrieveResults, error)) *MockQueryNode_Query_Call {
_c.Call.Return(run)
return _c
}
// QuerySegments provides a mock function with given fields: _a0, _a1
func (_m *MockQueryNode) QuerySegments(_a0 context.Context, _a1 *querypb.QueryRequest) (*internalpb.RetrieveResults, error) {
ret := _m.Called(_a0, _a1)
var r0 *internalpb.RetrieveResults
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, *querypb.QueryRequest) (*internalpb.RetrieveResults, error)); ok {
return rf(_a0, _a1)
}
if rf, ok := ret.Get(0).(func(context.Context, *querypb.QueryRequest) *internalpb.RetrieveResults); ok {
r0 = rf(_a0, _a1)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(*internalpb.RetrieveResults)
}
}
if rf, ok := ret.Get(1).(func(context.Context, *querypb.QueryRequest) error); ok {
r1 = rf(_a0, _a1)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// MockQueryNode_QuerySegments_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'QuerySegments'
type MockQueryNode_QuerySegments_Call struct {
*mock.Call
}
// QuerySegments is a helper method to define mock.On call
// - _a0 context.Context
// - _a1 *querypb.QueryRequest
func (_e *MockQueryNode_Expecter) QuerySegments(_a0 interface{}, _a1 interface{}) *MockQueryNode_QuerySegments_Call {
return &MockQueryNode_QuerySegments_Call{Call: _e.mock.On("QuerySegments", _a0, _a1)}
}
func (_c *MockQueryNode_QuerySegments_Call) Run(run func(_a0 context.Context, _a1 *querypb.QueryRequest)) *MockQueryNode_QuerySegments_Call {
_c.Call.Run(func(args mock.Arguments) {
run(args[0].(context.Context), args[1].(*querypb.QueryRequest))
})
return _c
}
func (_c *MockQueryNode_QuerySegments_Call) Return(_a0 *internalpb.RetrieveResults, _a1 error) *MockQueryNode_QuerySegments_Call {
_c.Call.Return(_a0, _a1)
return _c
}
func (_c *MockQueryNode_QuerySegments_Call) RunAndReturn(run func(context.Context, *querypb.QueryRequest) (*internalpb.RetrieveResults, error)) *MockQueryNode_QuerySegments_Call {
_c.Call.Return(run)
return _c
}
// QueryStream provides a mock function with given fields: _a0, _a1
func (_m *MockQueryNode) QueryStream(_a0 *querypb.QueryRequest, _a1 querypb.QueryNode_QueryStreamServer) error {
ret := _m.Called(_a0, _a1)
var r0 error
if rf, ok := ret.Get(0).(func(*querypb.QueryRequest, querypb.QueryNode_QueryStreamServer) error); ok {
r0 = rf(_a0, _a1)
} else {
r0 = ret.Error(0)
}
return r0
}
// MockQueryNode_QueryStream_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'QueryStream'
type MockQueryNode_QueryStream_Call struct {
*mock.Call
}
// QueryStream is a helper method to define mock.On call
// - _a0 *querypb.QueryRequest
// - _a1 querypb.QueryNode_QueryStreamServer
func (_e *MockQueryNode_Expecter) QueryStream(_a0 interface{}, _a1 interface{}) *MockQueryNode_QueryStream_Call {
return &MockQueryNode_QueryStream_Call{Call: _e.mock.On("QueryStream", _a0, _a1)}
}
func (_c *MockQueryNode_QueryStream_Call) Run(run func(_a0 *querypb.QueryRequest, _a1 querypb.QueryNode_QueryStreamServer)) *MockQueryNode_QueryStream_Call {
_c.Call.Run(func(args mock.Arguments) {
run(args[0].(*querypb.QueryRequest), args[1].(querypb.QueryNode_QueryStreamServer))
})
return _c
}
func (_c *MockQueryNode_QueryStream_Call) Return(_a0 error) *MockQueryNode_QueryStream_Call {
_c.Call.Return(_a0)
return _c
}
func (_c *MockQueryNode_QueryStream_Call) RunAndReturn(run func(*querypb.QueryRequest, querypb.QueryNode_QueryStreamServer) error) *MockQueryNode_QueryStream_Call {
_c.Call.Return(run)
return _c
}
// QueryStreamSegments provides a mock function with given fields: _a0, _a1
func (_m *MockQueryNode) QueryStreamSegments(_a0 *querypb.QueryRequest, _a1 querypb.QueryNode_QueryStreamSegmentsServer) error {
ret := _m.Called(_a0, _a1)
var r0 error
if rf, ok := ret.Get(0).(func(*querypb.QueryRequest, querypb.QueryNode_QueryStreamSegmentsServer) error); ok {
r0 = rf(_a0, _a1)
} else {
r0 = ret.Error(0)
}
return r0
}
// MockQueryNode_QueryStreamSegments_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'QueryStreamSegments'
type MockQueryNode_QueryStreamSegments_Call struct {
*mock.Call
}
// QueryStreamSegments is a helper method to define mock.On call
// - _a0 *querypb.QueryRequest
// - _a1 querypb.QueryNode_QueryStreamSegmentsServer
func (_e *MockQueryNode_Expecter) QueryStreamSegments(_a0 interface{}, _a1 interface{}) *MockQueryNode_QueryStreamSegments_Call {
return &MockQueryNode_QueryStreamSegments_Call{Call: _e.mock.On("QueryStreamSegments", _a0, _a1)}
}
func (_c *MockQueryNode_QueryStreamSegments_Call) Run(run func(_a0 *querypb.QueryRequest, _a1 querypb.QueryNode_QueryStreamSegmentsServer)) *MockQueryNode_QueryStreamSegments_Call {
_c.Call.Run(func(args mock.Arguments) {
run(args[0].(*querypb.QueryRequest), args[1].(querypb.QueryNode_QueryStreamSegmentsServer))
})
return _c
}
func (_c *MockQueryNode_QueryStreamSegments_Call) Return(_a0 error) *MockQueryNode_QueryStreamSegments_Call {
_c.Call.Return(_a0)
return _c
}
func (_c *MockQueryNode_QueryStreamSegments_Call) RunAndReturn(run func(*querypb.QueryRequest, querypb.QueryNode_QueryStreamSegmentsServer) error) *MockQueryNode_QueryStreamSegments_Call {
_c.Call.Return(run)
return _c
}
// Register provides a mock function with given fields:
func (_m *MockQueryNode) 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
}
// MockQueryNode_Register_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Register'
type MockQueryNode_Register_Call struct {
*mock.Call
}
// Register is a helper method to define mock.On call
func (_e *MockQueryNode_Expecter) Register() *MockQueryNode_Register_Call {
return &MockQueryNode_Register_Call{Call: _e.mock.On("Register")}
}
func (_c *MockQueryNode_Register_Call) Run(run func()) *MockQueryNode_Register_Call {
_c.Call.Run(func(args mock.Arguments) {
run()
})
return _c
}
func (_c *MockQueryNode_Register_Call) Return(_a0 error) *MockQueryNode_Register_Call {
_c.Call.Return(_a0)
return _c
}
func (_c *MockQueryNode_Register_Call) RunAndReturn(run func() error) *MockQueryNode_Register_Call {
_c.Call.Return(run)
return _c
}
// ReleaseCollection provides a mock function with given fields: _a0, _a1
func (_m *MockQueryNode) ReleaseCollection(_a0 context.Context, _a1 *querypb.ReleaseCollectionRequest) (*commonpb.Status, error) {
ret := _m.Called(_a0, _a1)
var r0 *commonpb.Status
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, *querypb.ReleaseCollectionRequest) (*commonpb.Status, error)); ok {
return rf(_a0, _a1)
}
if rf, ok := ret.Get(0).(func(context.Context, *querypb.ReleaseCollectionRequest) *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, *querypb.ReleaseCollectionRequest) error); ok {
r1 = rf(_a0, _a1)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// MockQueryNode_ReleaseCollection_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ReleaseCollection'
type MockQueryNode_ReleaseCollection_Call struct {
*mock.Call
}
// ReleaseCollection is a helper method to define mock.On call
// - _a0 context.Context
// - _a1 *querypb.ReleaseCollectionRequest
func (_e *MockQueryNode_Expecter) ReleaseCollection(_a0 interface{}, _a1 interface{}) *MockQueryNode_ReleaseCollection_Call {
return &MockQueryNode_ReleaseCollection_Call{Call: _e.mock.On("ReleaseCollection", _a0, _a1)}
}
func (_c *MockQueryNode_ReleaseCollection_Call) Run(run func(_a0 context.Context, _a1 *querypb.ReleaseCollectionRequest)) *MockQueryNode_ReleaseCollection_Call {
_c.Call.Run(func(args mock.Arguments) {
run(args[0].(context.Context), args[1].(*querypb.ReleaseCollectionRequest))
})
return _c
}
func (_c *MockQueryNode_ReleaseCollection_Call) Return(_a0 *commonpb.Status, _a1 error) *MockQueryNode_ReleaseCollection_Call {
_c.Call.Return(_a0, _a1)
return _c
}
func (_c *MockQueryNode_ReleaseCollection_Call) RunAndReturn(run func(context.Context, *querypb.ReleaseCollectionRequest) (*commonpb.Status, error)) *MockQueryNode_ReleaseCollection_Call {
_c.Call.Return(run)
return _c
}
// ReleasePartitions provides a mock function with given fields: _a0, _a1
func (_m *MockQueryNode) ReleasePartitions(_a0 context.Context, _a1 *querypb.ReleasePartitionsRequest) (*commonpb.Status, error) {
ret := _m.Called(_a0, _a1)
var r0 *commonpb.Status
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, *querypb.ReleasePartitionsRequest) (*commonpb.Status, error)); ok {
return rf(_a0, _a1)
}
if rf, ok := ret.Get(0).(func(context.Context, *querypb.ReleasePartitionsRequest) *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, *querypb.ReleasePartitionsRequest) error); ok {
r1 = rf(_a0, _a1)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// MockQueryNode_ReleasePartitions_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ReleasePartitions'
type MockQueryNode_ReleasePartitions_Call struct {
*mock.Call
}
// ReleasePartitions is a helper method to define mock.On call
// - _a0 context.Context
// - _a1 *querypb.ReleasePartitionsRequest
func (_e *MockQueryNode_Expecter) ReleasePartitions(_a0 interface{}, _a1 interface{}) *MockQueryNode_ReleasePartitions_Call {
return &MockQueryNode_ReleasePartitions_Call{Call: _e.mock.On("ReleasePartitions", _a0, _a1)}
}
func (_c *MockQueryNode_ReleasePartitions_Call) Run(run func(_a0 context.Context, _a1 *querypb.ReleasePartitionsRequest)) *MockQueryNode_ReleasePartitions_Call {
_c.Call.Run(func(args mock.Arguments) {
run(args[0].(context.Context), args[1].(*querypb.ReleasePartitionsRequest))
})
return _c
}
func (_c *MockQueryNode_ReleasePartitions_Call) Return(_a0 *commonpb.Status, _a1 error) *MockQueryNode_ReleasePartitions_Call {
_c.Call.Return(_a0, _a1)
return _c
}
func (_c *MockQueryNode_ReleasePartitions_Call) RunAndReturn(run func(context.Context, *querypb.ReleasePartitionsRequest) (*commonpb.Status, error)) *MockQueryNode_ReleasePartitions_Call {
_c.Call.Return(run)
return _c
}
// ReleaseSegments provides a mock function with given fields: _a0, _a1
func (_m *MockQueryNode) ReleaseSegments(_a0 context.Context, _a1 *querypb.ReleaseSegmentsRequest) (*commonpb.Status, error) {
ret := _m.Called(_a0, _a1)
var r0 *commonpb.Status
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, *querypb.ReleaseSegmentsRequest) (*commonpb.Status, error)); ok {
return rf(_a0, _a1)
}
if rf, ok := ret.Get(0).(func(context.Context, *querypb.ReleaseSegmentsRequest) *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, *querypb.ReleaseSegmentsRequest) error); ok {
r1 = rf(_a0, _a1)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// MockQueryNode_ReleaseSegments_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ReleaseSegments'
type MockQueryNode_ReleaseSegments_Call struct {
*mock.Call
}
// ReleaseSegments is a helper method to define mock.On call
// - _a0 context.Context
// - _a1 *querypb.ReleaseSegmentsRequest
func (_e *MockQueryNode_Expecter) ReleaseSegments(_a0 interface{}, _a1 interface{}) *MockQueryNode_ReleaseSegments_Call {
return &MockQueryNode_ReleaseSegments_Call{Call: _e.mock.On("ReleaseSegments", _a0, _a1)}
}
func (_c *MockQueryNode_ReleaseSegments_Call) Run(run func(_a0 context.Context, _a1 *querypb.ReleaseSegmentsRequest)) *MockQueryNode_ReleaseSegments_Call {
_c.Call.Run(func(args mock.Arguments) {
run(args[0].(context.Context), args[1].(*querypb.ReleaseSegmentsRequest))
})
return _c
}
func (_c *MockQueryNode_ReleaseSegments_Call) Return(_a0 *commonpb.Status, _a1 error) *MockQueryNode_ReleaseSegments_Call {
_c.Call.Return(_a0, _a1)
return _c
}
func (_c *MockQueryNode_ReleaseSegments_Call) RunAndReturn(run func(context.Context, *querypb.ReleaseSegmentsRequest) (*commonpb.Status, error)) *MockQueryNode_ReleaseSegments_Call {
_c.Call.Return(run)
return _c
}
// Search provides a mock function with given fields: _a0, _a1
func (_m *MockQueryNode) Search(_a0 context.Context, _a1 *querypb.SearchRequest) (*internalpb.SearchResults, error) {
ret := _m.Called(_a0, _a1)
var r0 *internalpb.SearchResults
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, *querypb.SearchRequest) (*internalpb.SearchResults, error)); ok {
return rf(_a0, _a1)
}
if rf, ok := ret.Get(0).(func(context.Context, *querypb.SearchRequest) *internalpb.SearchResults); ok {
r0 = rf(_a0, _a1)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(*internalpb.SearchResults)
}
}
if rf, ok := ret.Get(1).(func(context.Context, *querypb.SearchRequest) error); ok {
r1 = rf(_a0, _a1)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// MockQueryNode_Search_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Search'
type MockQueryNode_Search_Call struct {
*mock.Call
}
// Search is a helper method to define mock.On call
// - _a0 context.Context
// - _a1 *querypb.SearchRequest
func (_e *MockQueryNode_Expecter) Search(_a0 interface{}, _a1 interface{}) *MockQueryNode_Search_Call {
return &MockQueryNode_Search_Call{Call: _e.mock.On("Search", _a0, _a1)}
}
func (_c *MockQueryNode_Search_Call) Run(run func(_a0 context.Context, _a1 *querypb.SearchRequest)) *MockQueryNode_Search_Call {
_c.Call.Run(func(args mock.Arguments) {
run(args[0].(context.Context), args[1].(*querypb.SearchRequest))
})
return _c
}
func (_c *MockQueryNode_Search_Call) Return(_a0 *internalpb.SearchResults, _a1 error) *MockQueryNode_Search_Call {
_c.Call.Return(_a0, _a1)
return _c
}
func (_c *MockQueryNode_Search_Call) RunAndReturn(run func(context.Context, *querypb.SearchRequest) (*internalpb.SearchResults, error)) *MockQueryNode_Search_Call {
_c.Call.Return(run)
return _c
}
// SearchSegments provides a mock function with given fields: _a0, _a1
func (_m *MockQueryNode) SearchSegments(_a0 context.Context, _a1 *querypb.SearchRequest) (*internalpb.SearchResults, error) {
ret := _m.Called(_a0, _a1)
var r0 *internalpb.SearchResults
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, *querypb.SearchRequest) (*internalpb.SearchResults, error)); ok {
return rf(_a0, _a1)
}
if rf, ok := ret.Get(0).(func(context.Context, *querypb.SearchRequest) *internalpb.SearchResults); ok {
r0 = rf(_a0, _a1)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(*internalpb.SearchResults)
}
}
if rf, ok := ret.Get(1).(func(context.Context, *querypb.SearchRequest) error); ok {
r1 = rf(_a0, _a1)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// MockQueryNode_SearchSegments_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SearchSegments'
type MockQueryNode_SearchSegments_Call struct {
*mock.Call
}
// SearchSegments is a helper method to define mock.On call
// - _a0 context.Context
// - _a1 *querypb.SearchRequest
func (_e *MockQueryNode_Expecter) SearchSegments(_a0 interface{}, _a1 interface{}) *MockQueryNode_SearchSegments_Call {
return &MockQueryNode_SearchSegments_Call{Call: _e.mock.On("SearchSegments", _a0, _a1)}
}
func (_c *MockQueryNode_SearchSegments_Call) Run(run func(_a0 context.Context, _a1 *querypb.SearchRequest)) *MockQueryNode_SearchSegments_Call {
_c.Call.Run(func(args mock.Arguments) {
run(args[0].(context.Context), args[1].(*querypb.SearchRequest))
})
return _c
}
func (_c *MockQueryNode_SearchSegments_Call) Return(_a0 *internalpb.SearchResults, _a1 error) *MockQueryNode_SearchSegments_Call {
_c.Call.Return(_a0, _a1)
return _c
}
func (_c *MockQueryNode_SearchSegments_Call) RunAndReturn(run func(context.Context, *querypb.SearchRequest) (*internalpb.SearchResults, error)) *MockQueryNode_SearchSegments_Call {
_c.Call.Return(run)
return _c
}
// SetAddress provides a mock function with given fields: address
func (_m *MockQueryNode) SetAddress(address string) {
_m.Called(address)
}
// MockQueryNode_SetAddress_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetAddress'
type MockQueryNode_SetAddress_Call struct {
*mock.Call
}
// SetAddress is a helper method to define mock.On call
// - address string
func (_e *MockQueryNode_Expecter) SetAddress(address interface{}) *MockQueryNode_SetAddress_Call {
return &MockQueryNode_SetAddress_Call{Call: _e.mock.On("SetAddress", address)}
}
func (_c *MockQueryNode_SetAddress_Call) Run(run func(address string)) *MockQueryNode_SetAddress_Call {
_c.Call.Run(func(args mock.Arguments) {
run(args[0].(string))
})
return _c
}
func (_c *MockQueryNode_SetAddress_Call) Return() *MockQueryNode_SetAddress_Call {
_c.Call.Return()
return _c
}
func (_c *MockQueryNode_SetAddress_Call) RunAndReturn(run func(string)) *MockQueryNode_SetAddress_Call {
_c.Call.Return(run)
return _c
}
// SetEtcdClient provides a mock function with given fields: etcdClient
func (_m *MockQueryNode) SetEtcdClient(etcdClient *clientv3.Client) {
_m.Called(etcdClient)
}
// MockQueryNode_SetEtcdClient_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetEtcdClient'
type MockQueryNode_SetEtcdClient_Call struct {
*mock.Call
}
// SetEtcdClient is a helper method to define mock.On call
// - etcdClient *clientv3.Client
func (_e *MockQueryNode_Expecter) SetEtcdClient(etcdClient interface{}) *MockQueryNode_SetEtcdClient_Call {
return &MockQueryNode_SetEtcdClient_Call{Call: _e.mock.On("SetEtcdClient", etcdClient)}
}
func (_c *MockQueryNode_SetEtcdClient_Call) Run(run func(etcdClient *clientv3.Client)) *MockQueryNode_SetEtcdClient_Call {
_c.Call.Run(func(args mock.Arguments) {
run(args[0].(*clientv3.Client))
})
return _c
}
func (_c *MockQueryNode_SetEtcdClient_Call) Return() *MockQueryNode_SetEtcdClient_Call {
_c.Call.Return()
return _c
}
func (_c *MockQueryNode_SetEtcdClient_Call) RunAndReturn(run func(*clientv3.Client)) *MockQueryNode_SetEtcdClient_Call {
_c.Call.Return(run)
return _c
}
// ShowConfigurations provides a mock function with given fields: _a0, _a1
func (_m *MockQueryNode) 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
}
// MockQueryNode_ShowConfigurations_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ShowConfigurations'
type MockQueryNode_ShowConfigurations_Call struct {
*mock.Call
}
// ShowConfigurations is a helper method to define mock.On call
// - _a0 context.Context
// - _a1 *internalpb.ShowConfigurationsRequest
func (_e *MockQueryNode_Expecter) ShowConfigurations(_a0 interface{}, _a1 interface{}) *MockQueryNode_ShowConfigurations_Call {
return &MockQueryNode_ShowConfigurations_Call{Call: _e.mock.On("ShowConfigurations", _a0, _a1)}
}
func (_c *MockQueryNode_ShowConfigurations_Call) Run(run func(_a0 context.Context, _a1 *internalpb.ShowConfigurationsRequest)) *MockQueryNode_ShowConfigurations_Call {
_c.Call.Run(func(args mock.Arguments) {
run(args[0].(context.Context), args[1].(*internalpb.ShowConfigurationsRequest))
})
return _c
}
func (_c *MockQueryNode_ShowConfigurations_Call) Return(_a0 *internalpb.ShowConfigurationsResponse, _a1 error) *MockQueryNode_ShowConfigurations_Call {
_c.Call.Return(_a0, _a1)
return _c
}
func (_c *MockQueryNode_ShowConfigurations_Call) RunAndReturn(run func(context.Context, *internalpb.ShowConfigurationsRequest) (*internalpb.ShowConfigurationsResponse, error)) *MockQueryNode_ShowConfigurations_Call {
_c.Call.Return(run)
return _c
}
// Start provides a mock function with given fields:
func (_m *MockQueryNode) 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
}
// MockQueryNode_Start_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Start'
type MockQueryNode_Start_Call struct {
*mock.Call
}
// Start is a helper method to define mock.On call
func (_e *MockQueryNode_Expecter) Start() *MockQueryNode_Start_Call {
return &MockQueryNode_Start_Call{Call: _e.mock.On("Start")}
}
func (_c *MockQueryNode_Start_Call) Run(run func()) *MockQueryNode_Start_Call {
_c.Call.Run(func(args mock.Arguments) {
run()
})
return _c
}
func (_c *MockQueryNode_Start_Call) Return(_a0 error) *MockQueryNode_Start_Call {
_c.Call.Return(_a0)
return _c
}
func (_c *MockQueryNode_Start_Call) RunAndReturn(run func() error) *MockQueryNode_Start_Call {
_c.Call.Return(run)
return _c
}
// Stop provides a mock function with given fields:
func (_m *MockQueryNode) 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
}
// MockQueryNode_Stop_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Stop'
type MockQueryNode_Stop_Call struct {
*mock.Call
}
// Stop is a helper method to define mock.On call
func (_e *MockQueryNode_Expecter) Stop() *MockQueryNode_Stop_Call {
return &MockQueryNode_Stop_Call{Call: _e.mock.On("Stop")}
}
func (_c *MockQueryNode_Stop_Call) Run(run func()) *MockQueryNode_Stop_Call {
_c.Call.Run(func(args mock.Arguments) {
run()
})
return _c
}
func (_c *MockQueryNode_Stop_Call) Return(_a0 error) *MockQueryNode_Stop_Call {
_c.Call.Return(_a0)
return _c
}
func (_c *MockQueryNode_Stop_Call) RunAndReturn(run func() error) *MockQueryNode_Stop_Call {
_c.Call.Return(run)
return _c
}
// SyncDistribution provides a mock function with given fields: _a0, _a1
func (_m *MockQueryNode) SyncDistribution(_a0 context.Context, _a1 *querypb.SyncDistributionRequest) (*commonpb.Status, error) {
ret := _m.Called(_a0, _a1)
var r0 *commonpb.Status
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, *querypb.SyncDistributionRequest) (*commonpb.Status, error)); ok {
return rf(_a0, _a1)
}
if rf, ok := ret.Get(0).(func(context.Context, *querypb.SyncDistributionRequest) *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, *querypb.SyncDistributionRequest) error); ok {
r1 = rf(_a0, _a1)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// MockQueryNode_SyncDistribution_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SyncDistribution'
type MockQueryNode_SyncDistribution_Call struct {
*mock.Call
}
// SyncDistribution is a helper method to define mock.On call
// - _a0 context.Context
// - _a1 *querypb.SyncDistributionRequest
func (_e *MockQueryNode_Expecter) SyncDistribution(_a0 interface{}, _a1 interface{}) *MockQueryNode_SyncDistribution_Call {
return &MockQueryNode_SyncDistribution_Call{Call: _e.mock.On("SyncDistribution", _a0, _a1)}
}
func (_c *MockQueryNode_SyncDistribution_Call) Run(run func(_a0 context.Context, _a1 *querypb.SyncDistributionRequest)) *MockQueryNode_SyncDistribution_Call {
_c.Call.Run(func(args mock.Arguments) {
run(args[0].(context.Context), args[1].(*querypb.SyncDistributionRequest))
})
return _c
}
func (_c *MockQueryNode_SyncDistribution_Call) Return(_a0 *commonpb.Status, _a1 error) *MockQueryNode_SyncDistribution_Call {
_c.Call.Return(_a0, _a1)
return _c
}
func (_c *MockQueryNode_SyncDistribution_Call) RunAndReturn(run func(context.Context, *querypb.SyncDistributionRequest) (*commonpb.Status, error)) *MockQueryNode_SyncDistribution_Call {
_c.Call.Return(run)
return _c
}
// SyncReplicaSegments provides a mock function with given fields: _a0, _a1
func (_m *MockQueryNode) SyncReplicaSegments(_a0 context.Context, _a1 *querypb.SyncReplicaSegmentsRequest) (*commonpb.Status, error) {
ret := _m.Called(_a0, _a1)
var r0 *commonpb.Status
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, *querypb.SyncReplicaSegmentsRequest) (*commonpb.Status, error)); ok {
return rf(_a0, _a1)
}
if rf, ok := ret.Get(0).(func(context.Context, *querypb.SyncReplicaSegmentsRequest) *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, *querypb.SyncReplicaSegmentsRequest) error); ok {
r1 = rf(_a0, _a1)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// MockQueryNode_SyncReplicaSegments_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SyncReplicaSegments'
type MockQueryNode_SyncReplicaSegments_Call struct {
*mock.Call
}
// SyncReplicaSegments is a helper method to define mock.On call
// - _a0 context.Context
// - _a1 *querypb.SyncReplicaSegmentsRequest
func (_e *MockQueryNode_Expecter) SyncReplicaSegments(_a0 interface{}, _a1 interface{}) *MockQueryNode_SyncReplicaSegments_Call {
return &MockQueryNode_SyncReplicaSegments_Call{Call: _e.mock.On("SyncReplicaSegments", _a0, _a1)}
}
func (_c *MockQueryNode_SyncReplicaSegments_Call) Run(run func(_a0 context.Context, _a1 *querypb.SyncReplicaSegmentsRequest)) *MockQueryNode_SyncReplicaSegments_Call {
_c.Call.Run(func(args mock.Arguments) {
run(args[0].(context.Context), args[1].(*querypb.SyncReplicaSegmentsRequest))
})
return _c
}
func (_c *MockQueryNode_SyncReplicaSegments_Call) Return(_a0 *commonpb.Status, _a1 error) *MockQueryNode_SyncReplicaSegments_Call {
_c.Call.Return(_a0, _a1)
return _c
}
func (_c *MockQueryNode_SyncReplicaSegments_Call) RunAndReturn(run func(context.Context, *querypb.SyncReplicaSegmentsRequest) (*commonpb.Status, error)) *MockQueryNode_SyncReplicaSegments_Call {
_c.Call.Return(run)
return _c
}
// UnsubDmChannel provides a mock function with given fields: _a0, _a1
func (_m *MockQueryNode) UnsubDmChannel(_a0 context.Context, _a1 *querypb.UnsubDmChannelRequest) (*commonpb.Status, error) {
ret := _m.Called(_a0, _a1)
var r0 *commonpb.Status
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, *querypb.UnsubDmChannelRequest) (*commonpb.Status, error)); ok {
return rf(_a0, _a1)
}
if rf, ok := ret.Get(0).(func(context.Context, *querypb.UnsubDmChannelRequest) *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, *querypb.UnsubDmChannelRequest) error); ok {
r1 = rf(_a0, _a1)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// MockQueryNode_UnsubDmChannel_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UnsubDmChannel'
type MockQueryNode_UnsubDmChannel_Call struct {
*mock.Call
}
// UnsubDmChannel is a helper method to define mock.On call
// - _a0 context.Context
// - _a1 *querypb.UnsubDmChannelRequest
func (_e *MockQueryNode_Expecter) UnsubDmChannel(_a0 interface{}, _a1 interface{}) *MockQueryNode_UnsubDmChannel_Call {
return &MockQueryNode_UnsubDmChannel_Call{Call: _e.mock.On("UnsubDmChannel", _a0, _a1)}
}
func (_c *MockQueryNode_UnsubDmChannel_Call) Run(run func(_a0 context.Context, _a1 *querypb.UnsubDmChannelRequest)) *MockQueryNode_UnsubDmChannel_Call {
_c.Call.Run(func(args mock.Arguments) {
run(args[0].(context.Context), args[1].(*querypb.UnsubDmChannelRequest))
})
return _c
}
func (_c *MockQueryNode_UnsubDmChannel_Call) Return(_a0 *commonpb.Status, _a1 error) *MockQueryNode_UnsubDmChannel_Call {
_c.Call.Return(_a0, _a1)
return _c
}
func (_c *MockQueryNode_UnsubDmChannel_Call) RunAndReturn(run func(context.Context, *querypb.UnsubDmChannelRequest) (*commonpb.Status, error)) *MockQueryNode_UnsubDmChannel_Call {
_c.Call.Return(run)
return _c
}
// UpdateStateCode provides a mock function with given fields: stateCode
func (_m *MockQueryNode) UpdateStateCode(stateCode commonpb.StateCode) {
_m.Called(stateCode)
}
// MockQueryNode_UpdateStateCode_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UpdateStateCode'
type MockQueryNode_UpdateStateCode_Call struct {
*mock.Call
}
// UpdateStateCode is a helper method to define mock.On call
// - stateCode commonpb.StateCode
func (_e *MockQueryNode_Expecter) UpdateStateCode(stateCode interface{}) *MockQueryNode_UpdateStateCode_Call {
return &MockQueryNode_UpdateStateCode_Call{Call: _e.mock.On("UpdateStateCode", stateCode)}
}
func (_c *MockQueryNode_UpdateStateCode_Call) Run(run func(stateCode commonpb.StateCode)) *MockQueryNode_UpdateStateCode_Call {
_c.Call.Run(func(args mock.Arguments) {
run(args[0].(commonpb.StateCode))
})
return _c
}
func (_c *MockQueryNode_UpdateStateCode_Call) Return() *MockQueryNode_UpdateStateCode_Call {
_c.Call.Return()
return _c
}
func (_c *MockQueryNode_UpdateStateCode_Call) RunAndReturn(run func(commonpb.StateCode)) *MockQueryNode_UpdateStateCode_Call {
_c.Call.Return(run)
return _c
}
// WatchDmChannels provides a mock function with given fields: _a0, _a1
func (_m *MockQueryNode) WatchDmChannels(_a0 context.Context, _a1 *querypb.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, *querypb.WatchDmChannelsRequest) (*commonpb.Status, error)); ok {
return rf(_a0, _a1)
}
if rf, ok := ret.Get(0).(func(context.Context, *querypb.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, *querypb.WatchDmChannelsRequest) error); ok {
r1 = rf(_a0, _a1)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// MockQueryNode_WatchDmChannels_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'WatchDmChannels'
type MockQueryNode_WatchDmChannels_Call struct {
*mock.Call
}
// WatchDmChannels is a helper method to define mock.On call
// - _a0 context.Context
// - _a1 *querypb.WatchDmChannelsRequest
func (_e *MockQueryNode_Expecter) WatchDmChannels(_a0 interface{}, _a1 interface{}) *MockQueryNode_WatchDmChannels_Call {
return &MockQueryNode_WatchDmChannels_Call{Call: _e.mock.On("WatchDmChannels", _a0, _a1)}
}
func (_c *MockQueryNode_WatchDmChannels_Call) Run(run func(_a0 context.Context, _a1 *querypb.WatchDmChannelsRequest)) *MockQueryNode_WatchDmChannels_Call {
_c.Call.Run(func(args mock.Arguments) {
run(args[0].(context.Context), args[1].(*querypb.WatchDmChannelsRequest))
})
return _c
}
func (_c *MockQueryNode_WatchDmChannels_Call) Return(_a0 *commonpb.Status, _a1 error) *MockQueryNode_WatchDmChannels_Call {
_c.Call.Return(_a0, _a1)
return _c
}
func (_c *MockQueryNode_WatchDmChannels_Call) RunAndReturn(run func(context.Context, *querypb.WatchDmChannelsRequest) (*commonpb.Status, error)) *MockQueryNode_WatchDmChannels_Call {
_c.Call.Return(run)
return _c
}
// NewMockQueryNode creates a new instance of MockQueryNode. 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 NewMockQueryNode(t interface {
mock.TestingT
Cleanup(func())
}) *MockQueryNode {
mock := &MockQueryNode{}
mock.Mock.Test(t)
t.Cleanup(func() { mock.AssertExpectations(t) })
return mock
}