mirror of
https://gitee.com/milvus-io/milvus.git
synced 2025-12-28 22:45:26 +08:00
issue: https://github.com/milvus-io/milvus/issues/45890 ComputePhraseMatchSlop accepts three pararms: 1. A string: query text 2. Some trings: data texts 3. Analyzer params, Slop will be calculated for the query text with each data text in the context of phrase match where they are tokenized with tokenizer with analyzer params. So two array will be returned: 1. is_match: is phrase match can sucess 2. slop: the related slop if phrase match can sucess, or -1 is cannot. --------- Signed-off-by: SpadeA <tangchenjie1210@gmail.com>
3052 lines
113 KiB
Go
3052 lines
113 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"
|
|
|
|
grpc "google.golang.org/grpc"
|
|
|
|
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"
|
|
|
|
querypb "github.com/milvus-io/milvus/pkg/v2/proto/querypb"
|
|
)
|
|
|
|
// MockQueryCoordClient is an autogenerated mock type for the QueryCoordClient type
|
|
type MockQueryCoordClient struct {
|
|
mock.Mock
|
|
}
|
|
|
|
type MockQueryCoordClient_Expecter struct {
|
|
mock *mock.Mock
|
|
}
|
|
|
|
func (_m *MockQueryCoordClient) EXPECT() *MockQueryCoordClient_Expecter {
|
|
return &MockQueryCoordClient_Expecter{mock: &_m.Mock}
|
|
}
|
|
|
|
// ActivateChecker provides a mock function with given fields: ctx, in, opts
|
|
func (_m *MockQueryCoordClient) ActivateChecker(ctx context.Context, in *querypb.ActivateCheckerRequest, opts ...grpc.CallOption) (*commonpb.Status, error) {
|
|
_va := make([]interface{}, len(opts))
|
|
for _i := range opts {
|
|
_va[_i] = opts[_i]
|
|
}
|
|
var _ca []interface{}
|
|
_ca = append(_ca, ctx, in)
|
|
_ca = append(_ca, _va...)
|
|
ret := _m.Called(_ca...)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for ActivateChecker")
|
|
}
|
|
|
|
var r0 *commonpb.Status
|
|
var r1 error
|
|
if rf, ok := ret.Get(0).(func(context.Context, *querypb.ActivateCheckerRequest, ...grpc.CallOption) (*commonpb.Status, error)); ok {
|
|
return rf(ctx, in, opts...)
|
|
}
|
|
if rf, ok := ret.Get(0).(func(context.Context, *querypb.ActivateCheckerRequest, ...grpc.CallOption) *commonpb.Status); ok {
|
|
r0 = rf(ctx, in, opts...)
|
|
} else {
|
|
if ret.Get(0) != nil {
|
|
r0 = ret.Get(0).(*commonpb.Status)
|
|
}
|
|
}
|
|
|
|
if rf, ok := ret.Get(1).(func(context.Context, *querypb.ActivateCheckerRequest, ...grpc.CallOption) error); ok {
|
|
r1 = rf(ctx, in, opts...)
|
|
} else {
|
|
r1 = ret.Error(1)
|
|
}
|
|
|
|
return r0, r1
|
|
}
|
|
|
|
// MockQueryCoordClient_ActivateChecker_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ActivateChecker'
|
|
type MockQueryCoordClient_ActivateChecker_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// ActivateChecker is a helper method to define mock.On call
|
|
// - ctx context.Context
|
|
// - in *querypb.ActivateCheckerRequest
|
|
// - opts ...grpc.CallOption
|
|
func (_e *MockQueryCoordClient_Expecter) ActivateChecker(ctx interface{}, in interface{}, opts ...interface{}) *MockQueryCoordClient_ActivateChecker_Call {
|
|
return &MockQueryCoordClient_ActivateChecker_Call{Call: _e.mock.On("ActivateChecker",
|
|
append([]interface{}{ctx, in}, opts...)...)}
|
|
}
|
|
|
|
func (_c *MockQueryCoordClient_ActivateChecker_Call) Run(run func(ctx context.Context, in *querypb.ActivateCheckerRequest, opts ...grpc.CallOption)) *MockQueryCoordClient_ActivateChecker_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
variadicArgs := make([]grpc.CallOption, len(args)-2)
|
|
for i, a := range args[2:] {
|
|
if a != nil {
|
|
variadicArgs[i] = a.(grpc.CallOption)
|
|
}
|
|
}
|
|
run(args[0].(context.Context), args[1].(*querypb.ActivateCheckerRequest), variadicArgs...)
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *MockQueryCoordClient_ActivateChecker_Call) Return(_a0 *commonpb.Status, _a1 error) *MockQueryCoordClient_ActivateChecker_Call {
|
|
_c.Call.Return(_a0, _a1)
|
|
return _c
|
|
}
|
|
|
|
func (_c *MockQueryCoordClient_ActivateChecker_Call) RunAndReturn(run func(context.Context, *querypb.ActivateCheckerRequest, ...grpc.CallOption) (*commonpb.Status, error)) *MockQueryCoordClient_ActivateChecker_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// CheckBalanceStatus provides a mock function with given fields: ctx, in, opts
|
|
func (_m *MockQueryCoordClient) CheckBalanceStatus(ctx context.Context, in *querypb.CheckBalanceStatusRequest, opts ...grpc.CallOption) (*querypb.CheckBalanceStatusResponse, error) {
|
|
_va := make([]interface{}, len(opts))
|
|
for _i := range opts {
|
|
_va[_i] = opts[_i]
|
|
}
|
|
var _ca []interface{}
|
|
_ca = append(_ca, ctx, in)
|
|
_ca = append(_ca, _va...)
|
|
ret := _m.Called(_ca...)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for CheckBalanceStatus")
|
|
}
|
|
|
|
var r0 *querypb.CheckBalanceStatusResponse
|
|
var r1 error
|
|
if rf, ok := ret.Get(0).(func(context.Context, *querypb.CheckBalanceStatusRequest, ...grpc.CallOption) (*querypb.CheckBalanceStatusResponse, error)); ok {
|
|
return rf(ctx, in, opts...)
|
|
}
|
|
if rf, ok := ret.Get(0).(func(context.Context, *querypb.CheckBalanceStatusRequest, ...grpc.CallOption) *querypb.CheckBalanceStatusResponse); ok {
|
|
r0 = rf(ctx, in, opts...)
|
|
} else {
|
|
if ret.Get(0) != nil {
|
|
r0 = ret.Get(0).(*querypb.CheckBalanceStatusResponse)
|
|
}
|
|
}
|
|
|
|
if rf, ok := ret.Get(1).(func(context.Context, *querypb.CheckBalanceStatusRequest, ...grpc.CallOption) error); ok {
|
|
r1 = rf(ctx, in, opts...)
|
|
} else {
|
|
r1 = ret.Error(1)
|
|
}
|
|
|
|
return r0, r1
|
|
}
|
|
|
|
// MockQueryCoordClient_CheckBalanceStatus_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CheckBalanceStatus'
|
|
type MockQueryCoordClient_CheckBalanceStatus_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// CheckBalanceStatus is a helper method to define mock.On call
|
|
// - ctx context.Context
|
|
// - in *querypb.CheckBalanceStatusRequest
|
|
// - opts ...grpc.CallOption
|
|
func (_e *MockQueryCoordClient_Expecter) CheckBalanceStatus(ctx interface{}, in interface{}, opts ...interface{}) *MockQueryCoordClient_CheckBalanceStatus_Call {
|
|
return &MockQueryCoordClient_CheckBalanceStatus_Call{Call: _e.mock.On("CheckBalanceStatus",
|
|
append([]interface{}{ctx, in}, opts...)...)}
|
|
}
|
|
|
|
func (_c *MockQueryCoordClient_CheckBalanceStatus_Call) Run(run func(ctx context.Context, in *querypb.CheckBalanceStatusRequest, opts ...grpc.CallOption)) *MockQueryCoordClient_CheckBalanceStatus_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
variadicArgs := make([]grpc.CallOption, len(args)-2)
|
|
for i, a := range args[2:] {
|
|
if a != nil {
|
|
variadicArgs[i] = a.(grpc.CallOption)
|
|
}
|
|
}
|
|
run(args[0].(context.Context), args[1].(*querypb.CheckBalanceStatusRequest), variadicArgs...)
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *MockQueryCoordClient_CheckBalanceStatus_Call) Return(_a0 *querypb.CheckBalanceStatusResponse, _a1 error) *MockQueryCoordClient_CheckBalanceStatus_Call {
|
|
_c.Call.Return(_a0, _a1)
|
|
return _c
|
|
}
|
|
|
|
func (_c *MockQueryCoordClient_CheckBalanceStatus_Call) RunAndReturn(run func(context.Context, *querypb.CheckBalanceStatusRequest, ...grpc.CallOption) (*querypb.CheckBalanceStatusResponse, error)) *MockQueryCoordClient_CheckBalanceStatus_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// CheckHealth provides a mock function with given fields: ctx, in, opts
|
|
func (_m *MockQueryCoordClient) CheckHealth(ctx context.Context, in *milvuspb.CheckHealthRequest, opts ...grpc.CallOption) (*milvuspb.CheckHealthResponse, error) {
|
|
_va := make([]interface{}, len(opts))
|
|
for _i := range opts {
|
|
_va[_i] = opts[_i]
|
|
}
|
|
var _ca []interface{}
|
|
_ca = append(_ca, ctx, in)
|
|
_ca = append(_ca, _va...)
|
|
ret := _m.Called(_ca...)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for CheckHealth")
|
|
}
|
|
|
|
var r0 *milvuspb.CheckHealthResponse
|
|
var r1 error
|
|
if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.CheckHealthRequest, ...grpc.CallOption) (*milvuspb.CheckHealthResponse, error)); ok {
|
|
return rf(ctx, in, opts...)
|
|
}
|
|
if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.CheckHealthRequest, ...grpc.CallOption) *milvuspb.CheckHealthResponse); ok {
|
|
r0 = rf(ctx, in, opts...)
|
|
} else {
|
|
if ret.Get(0) != nil {
|
|
r0 = ret.Get(0).(*milvuspb.CheckHealthResponse)
|
|
}
|
|
}
|
|
|
|
if rf, ok := ret.Get(1).(func(context.Context, *milvuspb.CheckHealthRequest, ...grpc.CallOption) error); ok {
|
|
r1 = rf(ctx, in, opts...)
|
|
} else {
|
|
r1 = ret.Error(1)
|
|
}
|
|
|
|
return r0, r1
|
|
}
|
|
|
|
// MockQueryCoordClient_CheckHealth_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CheckHealth'
|
|
type MockQueryCoordClient_CheckHealth_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// CheckHealth is a helper method to define mock.On call
|
|
// - ctx context.Context
|
|
// - in *milvuspb.CheckHealthRequest
|
|
// - opts ...grpc.CallOption
|
|
func (_e *MockQueryCoordClient_Expecter) CheckHealth(ctx interface{}, in interface{}, opts ...interface{}) *MockQueryCoordClient_CheckHealth_Call {
|
|
return &MockQueryCoordClient_CheckHealth_Call{Call: _e.mock.On("CheckHealth",
|
|
append([]interface{}{ctx, in}, opts...)...)}
|
|
}
|
|
|
|
func (_c *MockQueryCoordClient_CheckHealth_Call) Run(run func(ctx context.Context, in *milvuspb.CheckHealthRequest, opts ...grpc.CallOption)) *MockQueryCoordClient_CheckHealth_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
variadicArgs := make([]grpc.CallOption, len(args)-2)
|
|
for i, a := range args[2:] {
|
|
if a != nil {
|
|
variadicArgs[i] = a.(grpc.CallOption)
|
|
}
|
|
}
|
|
run(args[0].(context.Context), args[1].(*milvuspb.CheckHealthRequest), variadicArgs...)
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *MockQueryCoordClient_CheckHealth_Call) Return(_a0 *milvuspb.CheckHealthResponse, _a1 error) *MockQueryCoordClient_CheckHealth_Call {
|
|
_c.Call.Return(_a0, _a1)
|
|
return _c
|
|
}
|
|
|
|
func (_c *MockQueryCoordClient_CheckHealth_Call) RunAndReturn(run func(context.Context, *milvuspb.CheckHealthRequest, ...grpc.CallOption) (*milvuspb.CheckHealthResponse, error)) *MockQueryCoordClient_CheckHealth_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// CheckQueryNodeDistribution provides a mock function with given fields: ctx, in, opts
|
|
func (_m *MockQueryCoordClient) CheckQueryNodeDistribution(ctx context.Context, in *querypb.CheckQueryNodeDistributionRequest, opts ...grpc.CallOption) (*commonpb.Status, error) {
|
|
_va := make([]interface{}, len(opts))
|
|
for _i := range opts {
|
|
_va[_i] = opts[_i]
|
|
}
|
|
var _ca []interface{}
|
|
_ca = append(_ca, ctx, in)
|
|
_ca = append(_ca, _va...)
|
|
ret := _m.Called(_ca...)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for CheckQueryNodeDistribution")
|
|
}
|
|
|
|
var r0 *commonpb.Status
|
|
var r1 error
|
|
if rf, ok := ret.Get(0).(func(context.Context, *querypb.CheckQueryNodeDistributionRequest, ...grpc.CallOption) (*commonpb.Status, error)); ok {
|
|
return rf(ctx, in, opts...)
|
|
}
|
|
if rf, ok := ret.Get(0).(func(context.Context, *querypb.CheckQueryNodeDistributionRequest, ...grpc.CallOption) *commonpb.Status); ok {
|
|
r0 = rf(ctx, in, opts...)
|
|
} else {
|
|
if ret.Get(0) != nil {
|
|
r0 = ret.Get(0).(*commonpb.Status)
|
|
}
|
|
}
|
|
|
|
if rf, ok := ret.Get(1).(func(context.Context, *querypb.CheckQueryNodeDistributionRequest, ...grpc.CallOption) error); ok {
|
|
r1 = rf(ctx, in, opts...)
|
|
} else {
|
|
r1 = ret.Error(1)
|
|
}
|
|
|
|
return r0, r1
|
|
}
|
|
|
|
// MockQueryCoordClient_CheckQueryNodeDistribution_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CheckQueryNodeDistribution'
|
|
type MockQueryCoordClient_CheckQueryNodeDistribution_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// CheckQueryNodeDistribution is a helper method to define mock.On call
|
|
// - ctx context.Context
|
|
// - in *querypb.CheckQueryNodeDistributionRequest
|
|
// - opts ...grpc.CallOption
|
|
func (_e *MockQueryCoordClient_Expecter) CheckQueryNodeDistribution(ctx interface{}, in interface{}, opts ...interface{}) *MockQueryCoordClient_CheckQueryNodeDistribution_Call {
|
|
return &MockQueryCoordClient_CheckQueryNodeDistribution_Call{Call: _e.mock.On("CheckQueryNodeDistribution",
|
|
append([]interface{}{ctx, in}, opts...)...)}
|
|
}
|
|
|
|
func (_c *MockQueryCoordClient_CheckQueryNodeDistribution_Call) Run(run func(ctx context.Context, in *querypb.CheckQueryNodeDistributionRequest, opts ...grpc.CallOption)) *MockQueryCoordClient_CheckQueryNodeDistribution_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
variadicArgs := make([]grpc.CallOption, len(args)-2)
|
|
for i, a := range args[2:] {
|
|
if a != nil {
|
|
variadicArgs[i] = a.(grpc.CallOption)
|
|
}
|
|
}
|
|
run(args[0].(context.Context), args[1].(*querypb.CheckQueryNodeDistributionRequest), variadicArgs...)
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *MockQueryCoordClient_CheckQueryNodeDistribution_Call) Return(_a0 *commonpb.Status, _a1 error) *MockQueryCoordClient_CheckQueryNodeDistribution_Call {
|
|
_c.Call.Return(_a0, _a1)
|
|
return _c
|
|
}
|
|
|
|
func (_c *MockQueryCoordClient_CheckQueryNodeDistribution_Call) RunAndReturn(run func(context.Context, *querypb.CheckQueryNodeDistributionRequest, ...grpc.CallOption) (*commonpb.Status, error)) *MockQueryCoordClient_CheckQueryNodeDistribution_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// Close provides a mock function with no fields
|
|
func (_m *MockQueryCoordClient) Close() error {
|
|
ret := _m.Called()
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for Close")
|
|
}
|
|
|
|
var r0 error
|
|
if rf, ok := ret.Get(0).(func() error); ok {
|
|
r0 = rf()
|
|
} else {
|
|
r0 = ret.Error(0)
|
|
}
|
|
|
|
return r0
|
|
}
|
|
|
|
// MockQueryCoordClient_Close_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Close'
|
|
type MockQueryCoordClient_Close_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// Close is a helper method to define mock.On call
|
|
func (_e *MockQueryCoordClient_Expecter) Close() *MockQueryCoordClient_Close_Call {
|
|
return &MockQueryCoordClient_Close_Call{Call: _e.mock.On("Close")}
|
|
}
|
|
|
|
func (_c *MockQueryCoordClient_Close_Call) Run(run func()) *MockQueryCoordClient_Close_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
run()
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *MockQueryCoordClient_Close_Call) Return(_a0 error) *MockQueryCoordClient_Close_Call {
|
|
_c.Call.Return(_a0)
|
|
return _c
|
|
}
|
|
|
|
func (_c *MockQueryCoordClient_Close_Call) RunAndReturn(run func() error) *MockQueryCoordClient_Close_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// ComputePhraseMatchSlop provides a mock function with given fields: ctx, in, opts
|
|
func (_m *MockQueryCoordClient) ComputePhraseMatchSlop(ctx context.Context, in *querypb.ComputePhraseMatchSlopRequest, opts ...grpc.CallOption) (*querypb.ComputePhraseMatchSlopResponse, error) {
|
|
_va := make([]interface{}, len(opts))
|
|
for _i := range opts {
|
|
_va[_i] = opts[_i]
|
|
}
|
|
var _ca []interface{}
|
|
_ca = append(_ca, ctx, in)
|
|
_ca = append(_ca, _va...)
|
|
ret := _m.Called(_ca...)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for ComputePhraseMatchSlop")
|
|
}
|
|
|
|
var r0 *querypb.ComputePhraseMatchSlopResponse
|
|
var r1 error
|
|
if rf, ok := ret.Get(0).(func(context.Context, *querypb.ComputePhraseMatchSlopRequest, ...grpc.CallOption) (*querypb.ComputePhraseMatchSlopResponse, error)); ok {
|
|
return rf(ctx, in, opts...)
|
|
}
|
|
if rf, ok := ret.Get(0).(func(context.Context, *querypb.ComputePhraseMatchSlopRequest, ...grpc.CallOption) *querypb.ComputePhraseMatchSlopResponse); ok {
|
|
r0 = rf(ctx, in, opts...)
|
|
} else {
|
|
if ret.Get(0) != nil {
|
|
r0 = ret.Get(0).(*querypb.ComputePhraseMatchSlopResponse)
|
|
}
|
|
}
|
|
|
|
if rf, ok := ret.Get(1).(func(context.Context, *querypb.ComputePhraseMatchSlopRequest, ...grpc.CallOption) error); ok {
|
|
r1 = rf(ctx, in, opts...)
|
|
} else {
|
|
r1 = ret.Error(1)
|
|
}
|
|
|
|
return r0, r1
|
|
}
|
|
|
|
// MockQueryCoordClient_ComputePhraseMatchSlop_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ComputePhraseMatchSlop'
|
|
type MockQueryCoordClient_ComputePhraseMatchSlop_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// ComputePhraseMatchSlop is a helper method to define mock.On call
|
|
// - ctx context.Context
|
|
// - in *querypb.ComputePhraseMatchSlopRequest
|
|
// - opts ...grpc.CallOption
|
|
func (_e *MockQueryCoordClient_Expecter) ComputePhraseMatchSlop(ctx interface{}, in interface{}, opts ...interface{}) *MockQueryCoordClient_ComputePhraseMatchSlop_Call {
|
|
return &MockQueryCoordClient_ComputePhraseMatchSlop_Call{Call: _e.mock.On("ComputePhraseMatchSlop",
|
|
append([]interface{}{ctx, in}, opts...)...)}
|
|
}
|
|
|
|
func (_c *MockQueryCoordClient_ComputePhraseMatchSlop_Call) Run(run func(ctx context.Context, in *querypb.ComputePhraseMatchSlopRequest, opts ...grpc.CallOption)) *MockQueryCoordClient_ComputePhraseMatchSlop_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
variadicArgs := make([]grpc.CallOption, len(args)-2)
|
|
for i, a := range args[2:] {
|
|
if a != nil {
|
|
variadicArgs[i] = a.(grpc.CallOption)
|
|
}
|
|
}
|
|
run(args[0].(context.Context), args[1].(*querypb.ComputePhraseMatchSlopRequest), variadicArgs...)
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *MockQueryCoordClient_ComputePhraseMatchSlop_Call) Return(_a0 *querypb.ComputePhraseMatchSlopResponse, _a1 error) *MockQueryCoordClient_ComputePhraseMatchSlop_Call {
|
|
_c.Call.Return(_a0, _a1)
|
|
return _c
|
|
}
|
|
|
|
func (_c *MockQueryCoordClient_ComputePhraseMatchSlop_Call) RunAndReturn(run func(context.Context, *querypb.ComputePhraseMatchSlopRequest, ...grpc.CallOption) (*querypb.ComputePhraseMatchSlopResponse, error)) *MockQueryCoordClient_ComputePhraseMatchSlop_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// CreateResourceGroup provides a mock function with given fields: ctx, in, opts
|
|
func (_m *MockQueryCoordClient) CreateResourceGroup(ctx context.Context, in *milvuspb.CreateResourceGroupRequest, opts ...grpc.CallOption) (*commonpb.Status, error) {
|
|
_va := make([]interface{}, len(opts))
|
|
for _i := range opts {
|
|
_va[_i] = opts[_i]
|
|
}
|
|
var _ca []interface{}
|
|
_ca = append(_ca, ctx, in)
|
|
_ca = append(_ca, _va...)
|
|
ret := _m.Called(_ca...)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for CreateResourceGroup")
|
|
}
|
|
|
|
var r0 *commonpb.Status
|
|
var r1 error
|
|
if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.CreateResourceGroupRequest, ...grpc.CallOption) (*commonpb.Status, error)); ok {
|
|
return rf(ctx, in, opts...)
|
|
}
|
|
if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.CreateResourceGroupRequest, ...grpc.CallOption) *commonpb.Status); ok {
|
|
r0 = rf(ctx, in, opts...)
|
|
} else {
|
|
if ret.Get(0) != nil {
|
|
r0 = ret.Get(0).(*commonpb.Status)
|
|
}
|
|
}
|
|
|
|
if rf, ok := ret.Get(1).(func(context.Context, *milvuspb.CreateResourceGroupRequest, ...grpc.CallOption) error); ok {
|
|
r1 = rf(ctx, in, opts...)
|
|
} else {
|
|
r1 = ret.Error(1)
|
|
}
|
|
|
|
return r0, r1
|
|
}
|
|
|
|
// MockQueryCoordClient_CreateResourceGroup_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CreateResourceGroup'
|
|
type MockQueryCoordClient_CreateResourceGroup_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// CreateResourceGroup is a helper method to define mock.On call
|
|
// - ctx context.Context
|
|
// - in *milvuspb.CreateResourceGroupRequest
|
|
// - opts ...grpc.CallOption
|
|
func (_e *MockQueryCoordClient_Expecter) CreateResourceGroup(ctx interface{}, in interface{}, opts ...interface{}) *MockQueryCoordClient_CreateResourceGroup_Call {
|
|
return &MockQueryCoordClient_CreateResourceGroup_Call{Call: _e.mock.On("CreateResourceGroup",
|
|
append([]interface{}{ctx, in}, opts...)...)}
|
|
}
|
|
|
|
func (_c *MockQueryCoordClient_CreateResourceGroup_Call) Run(run func(ctx context.Context, in *milvuspb.CreateResourceGroupRequest, opts ...grpc.CallOption)) *MockQueryCoordClient_CreateResourceGroup_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
variadicArgs := make([]grpc.CallOption, len(args)-2)
|
|
for i, a := range args[2:] {
|
|
if a != nil {
|
|
variadicArgs[i] = a.(grpc.CallOption)
|
|
}
|
|
}
|
|
run(args[0].(context.Context), args[1].(*milvuspb.CreateResourceGroupRequest), variadicArgs...)
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *MockQueryCoordClient_CreateResourceGroup_Call) Return(_a0 *commonpb.Status, _a1 error) *MockQueryCoordClient_CreateResourceGroup_Call {
|
|
_c.Call.Return(_a0, _a1)
|
|
return _c
|
|
}
|
|
|
|
func (_c *MockQueryCoordClient_CreateResourceGroup_Call) RunAndReturn(run func(context.Context, *milvuspb.CreateResourceGroupRequest, ...grpc.CallOption) (*commonpb.Status, error)) *MockQueryCoordClient_CreateResourceGroup_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// DeactivateChecker provides a mock function with given fields: ctx, in, opts
|
|
func (_m *MockQueryCoordClient) DeactivateChecker(ctx context.Context, in *querypb.DeactivateCheckerRequest, opts ...grpc.CallOption) (*commonpb.Status, error) {
|
|
_va := make([]interface{}, len(opts))
|
|
for _i := range opts {
|
|
_va[_i] = opts[_i]
|
|
}
|
|
var _ca []interface{}
|
|
_ca = append(_ca, ctx, in)
|
|
_ca = append(_ca, _va...)
|
|
ret := _m.Called(_ca...)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for DeactivateChecker")
|
|
}
|
|
|
|
var r0 *commonpb.Status
|
|
var r1 error
|
|
if rf, ok := ret.Get(0).(func(context.Context, *querypb.DeactivateCheckerRequest, ...grpc.CallOption) (*commonpb.Status, error)); ok {
|
|
return rf(ctx, in, opts...)
|
|
}
|
|
if rf, ok := ret.Get(0).(func(context.Context, *querypb.DeactivateCheckerRequest, ...grpc.CallOption) *commonpb.Status); ok {
|
|
r0 = rf(ctx, in, opts...)
|
|
} else {
|
|
if ret.Get(0) != nil {
|
|
r0 = ret.Get(0).(*commonpb.Status)
|
|
}
|
|
}
|
|
|
|
if rf, ok := ret.Get(1).(func(context.Context, *querypb.DeactivateCheckerRequest, ...grpc.CallOption) error); ok {
|
|
r1 = rf(ctx, in, opts...)
|
|
} else {
|
|
r1 = ret.Error(1)
|
|
}
|
|
|
|
return r0, r1
|
|
}
|
|
|
|
// MockQueryCoordClient_DeactivateChecker_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeactivateChecker'
|
|
type MockQueryCoordClient_DeactivateChecker_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// DeactivateChecker is a helper method to define mock.On call
|
|
// - ctx context.Context
|
|
// - in *querypb.DeactivateCheckerRequest
|
|
// - opts ...grpc.CallOption
|
|
func (_e *MockQueryCoordClient_Expecter) DeactivateChecker(ctx interface{}, in interface{}, opts ...interface{}) *MockQueryCoordClient_DeactivateChecker_Call {
|
|
return &MockQueryCoordClient_DeactivateChecker_Call{Call: _e.mock.On("DeactivateChecker",
|
|
append([]interface{}{ctx, in}, opts...)...)}
|
|
}
|
|
|
|
func (_c *MockQueryCoordClient_DeactivateChecker_Call) Run(run func(ctx context.Context, in *querypb.DeactivateCheckerRequest, opts ...grpc.CallOption)) *MockQueryCoordClient_DeactivateChecker_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
variadicArgs := make([]grpc.CallOption, len(args)-2)
|
|
for i, a := range args[2:] {
|
|
if a != nil {
|
|
variadicArgs[i] = a.(grpc.CallOption)
|
|
}
|
|
}
|
|
run(args[0].(context.Context), args[1].(*querypb.DeactivateCheckerRequest), variadicArgs...)
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *MockQueryCoordClient_DeactivateChecker_Call) Return(_a0 *commonpb.Status, _a1 error) *MockQueryCoordClient_DeactivateChecker_Call {
|
|
_c.Call.Return(_a0, _a1)
|
|
return _c
|
|
}
|
|
|
|
func (_c *MockQueryCoordClient_DeactivateChecker_Call) RunAndReturn(run func(context.Context, *querypb.DeactivateCheckerRequest, ...grpc.CallOption) (*commonpb.Status, error)) *MockQueryCoordClient_DeactivateChecker_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// DescribeResourceGroup provides a mock function with given fields: ctx, in, opts
|
|
func (_m *MockQueryCoordClient) DescribeResourceGroup(ctx context.Context, in *querypb.DescribeResourceGroupRequest, opts ...grpc.CallOption) (*querypb.DescribeResourceGroupResponse, error) {
|
|
_va := make([]interface{}, len(opts))
|
|
for _i := range opts {
|
|
_va[_i] = opts[_i]
|
|
}
|
|
var _ca []interface{}
|
|
_ca = append(_ca, ctx, in)
|
|
_ca = append(_ca, _va...)
|
|
ret := _m.Called(_ca...)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for DescribeResourceGroup")
|
|
}
|
|
|
|
var r0 *querypb.DescribeResourceGroupResponse
|
|
var r1 error
|
|
if rf, ok := ret.Get(0).(func(context.Context, *querypb.DescribeResourceGroupRequest, ...grpc.CallOption) (*querypb.DescribeResourceGroupResponse, error)); ok {
|
|
return rf(ctx, in, opts...)
|
|
}
|
|
if rf, ok := ret.Get(0).(func(context.Context, *querypb.DescribeResourceGroupRequest, ...grpc.CallOption) *querypb.DescribeResourceGroupResponse); ok {
|
|
r0 = rf(ctx, in, opts...)
|
|
} else {
|
|
if ret.Get(0) != nil {
|
|
r0 = ret.Get(0).(*querypb.DescribeResourceGroupResponse)
|
|
}
|
|
}
|
|
|
|
if rf, ok := ret.Get(1).(func(context.Context, *querypb.DescribeResourceGroupRequest, ...grpc.CallOption) error); ok {
|
|
r1 = rf(ctx, in, opts...)
|
|
} else {
|
|
r1 = ret.Error(1)
|
|
}
|
|
|
|
return r0, r1
|
|
}
|
|
|
|
// MockQueryCoordClient_DescribeResourceGroup_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DescribeResourceGroup'
|
|
type MockQueryCoordClient_DescribeResourceGroup_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// DescribeResourceGroup is a helper method to define mock.On call
|
|
// - ctx context.Context
|
|
// - in *querypb.DescribeResourceGroupRequest
|
|
// - opts ...grpc.CallOption
|
|
func (_e *MockQueryCoordClient_Expecter) DescribeResourceGroup(ctx interface{}, in interface{}, opts ...interface{}) *MockQueryCoordClient_DescribeResourceGroup_Call {
|
|
return &MockQueryCoordClient_DescribeResourceGroup_Call{Call: _e.mock.On("DescribeResourceGroup",
|
|
append([]interface{}{ctx, in}, opts...)...)}
|
|
}
|
|
|
|
func (_c *MockQueryCoordClient_DescribeResourceGroup_Call) Run(run func(ctx context.Context, in *querypb.DescribeResourceGroupRequest, opts ...grpc.CallOption)) *MockQueryCoordClient_DescribeResourceGroup_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
variadicArgs := make([]grpc.CallOption, len(args)-2)
|
|
for i, a := range args[2:] {
|
|
if a != nil {
|
|
variadicArgs[i] = a.(grpc.CallOption)
|
|
}
|
|
}
|
|
run(args[0].(context.Context), args[1].(*querypb.DescribeResourceGroupRequest), variadicArgs...)
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *MockQueryCoordClient_DescribeResourceGroup_Call) Return(_a0 *querypb.DescribeResourceGroupResponse, _a1 error) *MockQueryCoordClient_DescribeResourceGroup_Call {
|
|
_c.Call.Return(_a0, _a1)
|
|
return _c
|
|
}
|
|
|
|
func (_c *MockQueryCoordClient_DescribeResourceGroup_Call) RunAndReturn(run func(context.Context, *querypb.DescribeResourceGroupRequest, ...grpc.CallOption) (*querypb.DescribeResourceGroupResponse, error)) *MockQueryCoordClient_DescribeResourceGroup_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// DropResourceGroup provides a mock function with given fields: ctx, in, opts
|
|
func (_m *MockQueryCoordClient) DropResourceGroup(ctx context.Context, in *milvuspb.DropResourceGroupRequest, opts ...grpc.CallOption) (*commonpb.Status, error) {
|
|
_va := make([]interface{}, len(opts))
|
|
for _i := range opts {
|
|
_va[_i] = opts[_i]
|
|
}
|
|
var _ca []interface{}
|
|
_ca = append(_ca, ctx, in)
|
|
_ca = append(_ca, _va...)
|
|
ret := _m.Called(_ca...)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for DropResourceGroup")
|
|
}
|
|
|
|
var r0 *commonpb.Status
|
|
var r1 error
|
|
if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.DropResourceGroupRequest, ...grpc.CallOption) (*commonpb.Status, error)); ok {
|
|
return rf(ctx, in, opts...)
|
|
}
|
|
if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.DropResourceGroupRequest, ...grpc.CallOption) *commonpb.Status); ok {
|
|
r0 = rf(ctx, in, opts...)
|
|
} else {
|
|
if ret.Get(0) != nil {
|
|
r0 = ret.Get(0).(*commonpb.Status)
|
|
}
|
|
}
|
|
|
|
if rf, ok := ret.Get(1).(func(context.Context, *milvuspb.DropResourceGroupRequest, ...grpc.CallOption) error); ok {
|
|
r1 = rf(ctx, in, opts...)
|
|
} else {
|
|
r1 = ret.Error(1)
|
|
}
|
|
|
|
return r0, r1
|
|
}
|
|
|
|
// MockQueryCoordClient_DropResourceGroup_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DropResourceGroup'
|
|
type MockQueryCoordClient_DropResourceGroup_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// DropResourceGroup is a helper method to define mock.On call
|
|
// - ctx context.Context
|
|
// - in *milvuspb.DropResourceGroupRequest
|
|
// - opts ...grpc.CallOption
|
|
func (_e *MockQueryCoordClient_Expecter) DropResourceGroup(ctx interface{}, in interface{}, opts ...interface{}) *MockQueryCoordClient_DropResourceGroup_Call {
|
|
return &MockQueryCoordClient_DropResourceGroup_Call{Call: _e.mock.On("DropResourceGroup",
|
|
append([]interface{}{ctx, in}, opts...)...)}
|
|
}
|
|
|
|
func (_c *MockQueryCoordClient_DropResourceGroup_Call) Run(run func(ctx context.Context, in *milvuspb.DropResourceGroupRequest, opts ...grpc.CallOption)) *MockQueryCoordClient_DropResourceGroup_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
variadicArgs := make([]grpc.CallOption, len(args)-2)
|
|
for i, a := range args[2:] {
|
|
if a != nil {
|
|
variadicArgs[i] = a.(grpc.CallOption)
|
|
}
|
|
}
|
|
run(args[0].(context.Context), args[1].(*milvuspb.DropResourceGroupRequest), variadicArgs...)
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *MockQueryCoordClient_DropResourceGroup_Call) Return(_a0 *commonpb.Status, _a1 error) *MockQueryCoordClient_DropResourceGroup_Call {
|
|
_c.Call.Return(_a0, _a1)
|
|
return _c
|
|
}
|
|
|
|
func (_c *MockQueryCoordClient_DropResourceGroup_Call) RunAndReturn(run func(context.Context, *milvuspb.DropResourceGroupRequest, ...grpc.CallOption) (*commonpb.Status, error)) *MockQueryCoordClient_DropResourceGroup_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// GetLoadSegmentInfo provides a mock function with given fields: ctx, in, opts
|
|
func (_m *MockQueryCoordClient) GetLoadSegmentInfo(ctx context.Context, in *querypb.GetSegmentInfoRequest, opts ...grpc.CallOption) (*querypb.GetSegmentInfoResponse, error) {
|
|
_va := make([]interface{}, len(opts))
|
|
for _i := range opts {
|
|
_va[_i] = opts[_i]
|
|
}
|
|
var _ca []interface{}
|
|
_ca = append(_ca, ctx, in)
|
|
_ca = append(_ca, _va...)
|
|
ret := _m.Called(_ca...)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for GetLoadSegmentInfo")
|
|
}
|
|
|
|
var r0 *querypb.GetSegmentInfoResponse
|
|
var r1 error
|
|
if rf, ok := ret.Get(0).(func(context.Context, *querypb.GetSegmentInfoRequest, ...grpc.CallOption) (*querypb.GetSegmentInfoResponse, error)); ok {
|
|
return rf(ctx, in, opts...)
|
|
}
|
|
if rf, ok := ret.Get(0).(func(context.Context, *querypb.GetSegmentInfoRequest, ...grpc.CallOption) *querypb.GetSegmentInfoResponse); ok {
|
|
r0 = rf(ctx, in, opts...)
|
|
} else {
|
|
if ret.Get(0) != nil {
|
|
r0 = ret.Get(0).(*querypb.GetSegmentInfoResponse)
|
|
}
|
|
}
|
|
|
|
if rf, ok := ret.Get(1).(func(context.Context, *querypb.GetSegmentInfoRequest, ...grpc.CallOption) error); ok {
|
|
r1 = rf(ctx, in, opts...)
|
|
} else {
|
|
r1 = ret.Error(1)
|
|
}
|
|
|
|
return r0, r1
|
|
}
|
|
|
|
// MockQueryCoordClient_GetLoadSegmentInfo_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetLoadSegmentInfo'
|
|
type MockQueryCoordClient_GetLoadSegmentInfo_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// GetLoadSegmentInfo is a helper method to define mock.On call
|
|
// - ctx context.Context
|
|
// - in *querypb.GetSegmentInfoRequest
|
|
// - opts ...grpc.CallOption
|
|
func (_e *MockQueryCoordClient_Expecter) GetLoadSegmentInfo(ctx interface{}, in interface{}, opts ...interface{}) *MockQueryCoordClient_GetLoadSegmentInfo_Call {
|
|
return &MockQueryCoordClient_GetLoadSegmentInfo_Call{Call: _e.mock.On("GetLoadSegmentInfo",
|
|
append([]interface{}{ctx, in}, opts...)...)}
|
|
}
|
|
|
|
func (_c *MockQueryCoordClient_GetLoadSegmentInfo_Call) Run(run func(ctx context.Context, in *querypb.GetSegmentInfoRequest, opts ...grpc.CallOption)) *MockQueryCoordClient_GetLoadSegmentInfo_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
variadicArgs := make([]grpc.CallOption, len(args)-2)
|
|
for i, a := range args[2:] {
|
|
if a != nil {
|
|
variadicArgs[i] = a.(grpc.CallOption)
|
|
}
|
|
}
|
|
run(args[0].(context.Context), args[1].(*querypb.GetSegmentInfoRequest), variadicArgs...)
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *MockQueryCoordClient_GetLoadSegmentInfo_Call) Return(_a0 *querypb.GetSegmentInfoResponse, _a1 error) *MockQueryCoordClient_GetLoadSegmentInfo_Call {
|
|
_c.Call.Return(_a0, _a1)
|
|
return _c
|
|
}
|
|
|
|
func (_c *MockQueryCoordClient_GetLoadSegmentInfo_Call) RunAndReturn(run func(context.Context, *querypb.GetSegmentInfoRequest, ...grpc.CallOption) (*querypb.GetSegmentInfoResponse, error)) *MockQueryCoordClient_GetLoadSegmentInfo_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// GetMetrics provides a mock function with given fields: ctx, in, opts
|
|
func (_m *MockQueryCoordClient) GetMetrics(ctx context.Context, in *milvuspb.GetMetricsRequest, opts ...grpc.CallOption) (*milvuspb.GetMetricsResponse, error) {
|
|
_va := make([]interface{}, len(opts))
|
|
for _i := range opts {
|
|
_va[_i] = opts[_i]
|
|
}
|
|
var _ca []interface{}
|
|
_ca = append(_ca, ctx, in)
|
|
_ca = append(_ca, _va...)
|
|
ret := _m.Called(_ca...)
|
|
|
|
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, ...grpc.CallOption) (*milvuspb.GetMetricsResponse, error)); ok {
|
|
return rf(ctx, in, opts...)
|
|
}
|
|
if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.GetMetricsRequest, ...grpc.CallOption) *milvuspb.GetMetricsResponse); ok {
|
|
r0 = rf(ctx, in, opts...)
|
|
} else {
|
|
if ret.Get(0) != nil {
|
|
r0 = ret.Get(0).(*milvuspb.GetMetricsResponse)
|
|
}
|
|
}
|
|
|
|
if rf, ok := ret.Get(1).(func(context.Context, *milvuspb.GetMetricsRequest, ...grpc.CallOption) error); ok {
|
|
r1 = rf(ctx, in, opts...)
|
|
} else {
|
|
r1 = ret.Error(1)
|
|
}
|
|
|
|
return r0, r1
|
|
}
|
|
|
|
// MockQueryCoordClient_GetMetrics_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetMetrics'
|
|
type MockQueryCoordClient_GetMetrics_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// GetMetrics is a helper method to define mock.On call
|
|
// - ctx context.Context
|
|
// - in *milvuspb.GetMetricsRequest
|
|
// - opts ...grpc.CallOption
|
|
func (_e *MockQueryCoordClient_Expecter) GetMetrics(ctx interface{}, in interface{}, opts ...interface{}) *MockQueryCoordClient_GetMetrics_Call {
|
|
return &MockQueryCoordClient_GetMetrics_Call{Call: _e.mock.On("GetMetrics",
|
|
append([]interface{}{ctx, in}, opts...)...)}
|
|
}
|
|
|
|
func (_c *MockQueryCoordClient_GetMetrics_Call) Run(run func(ctx context.Context, in *milvuspb.GetMetricsRequest, opts ...grpc.CallOption)) *MockQueryCoordClient_GetMetrics_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
variadicArgs := make([]grpc.CallOption, len(args)-2)
|
|
for i, a := range args[2:] {
|
|
if a != nil {
|
|
variadicArgs[i] = a.(grpc.CallOption)
|
|
}
|
|
}
|
|
run(args[0].(context.Context), args[1].(*milvuspb.GetMetricsRequest), variadicArgs...)
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *MockQueryCoordClient_GetMetrics_Call) Return(_a0 *milvuspb.GetMetricsResponse, _a1 error) *MockQueryCoordClient_GetMetrics_Call {
|
|
_c.Call.Return(_a0, _a1)
|
|
return _c
|
|
}
|
|
|
|
func (_c *MockQueryCoordClient_GetMetrics_Call) RunAndReturn(run func(context.Context, *milvuspb.GetMetricsRequest, ...grpc.CallOption) (*milvuspb.GetMetricsResponse, error)) *MockQueryCoordClient_GetMetrics_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// GetPartitionStates provides a mock function with given fields: ctx, in, opts
|
|
func (_m *MockQueryCoordClient) GetPartitionStates(ctx context.Context, in *querypb.GetPartitionStatesRequest, opts ...grpc.CallOption) (*querypb.GetPartitionStatesResponse, error) {
|
|
_va := make([]interface{}, len(opts))
|
|
for _i := range opts {
|
|
_va[_i] = opts[_i]
|
|
}
|
|
var _ca []interface{}
|
|
_ca = append(_ca, ctx, in)
|
|
_ca = append(_ca, _va...)
|
|
ret := _m.Called(_ca...)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for GetPartitionStates")
|
|
}
|
|
|
|
var r0 *querypb.GetPartitionStatesResponse
|
|
var r1 error
|
|
if rf, ok := ret.Get(0).(func(context.Context, *querypb.GetPartitionStatesRequest, ...grpc.CallOption) (*querypb.GetPartitionStatesResponse, error)); ok {
|
|
return rf(ctx, in, opts...)
|
|
}
|
|
if rf, ok := ret.Get(0).(func(context.Context, *querypb.GetPartitionStatesRequest, ...grpc.CallOption) *querypb.GetPartitionStatesResponse); ok {
|
|
r0 = rf(ctx, in, opts...)
|
|
} else {
|
|
if ret.Get(0) != nil {
|
|
r0 = ret.Get(0).(*querypb.GetPartitionStatesResponse)
|
|
}
|
|
}
|
|
|
|
if rf, ok := ret.Get(1).(func(context.Context, *querypb.GetPartitionStatesRequest, ...grpc.CallOption) error); ok {
|
|
r1 = rf(ctx, in, opts...)
|
|
} else {
|
|
r1 = ret.Error(1)
|
|
}
|
|
|
|
return r0, r1
|
|
}
|
|
|
|
// MockQueryCoordClient_GetPartitionStates_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetPartitionStates'
|
|
type MockQueryCoordClient_GetPartitionStates_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// GetPartitionStates is a helper method to define mock.On call
|
|
// - ctx context.Context
|
|
// - in *querypb.GetPartitionStatesRequest
|
|
// - opts ...grpc.CallOption
|
|
func (_e *MockQueryCoordClient_Expecter) GetPartitionStates(ctx interface{}, in interface{}, opts ...interface{}) *MockQueryCoordClient_GetPartitionStates_Call {
|
|
return &MockQueryCoordClient_GetPartitionStates_Call{Call: _e.mock.On("GetPartitionStates",
|
|
append([]interface{}{ctx, in}, opts...)...)}
|
|
}
|
|
|
|
func (_c *MockQueryCoordClient_GetPartitionStates_Call) Run(run func(ctx context.Context, in *querypb.GetPartitionStatesRequest, opts ...grpc.CallOption)) *MockQueryCoordClient_GetPartitionStates_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
variadicArgs := make([]grpc.CallOption, len(args)-2)
|
|
for i, a := range args[2:] {
|
|
if a != nil {
|
|
variadicArgs[i] = a.(grpc.CallOption)
|
|
}
|
|
}
|
|
run(args[0].(context.Context), args[1].(*querypb.GetPartitionStatesRequest), variadicArgs...)
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *MockQueryCoordClient_GetPartitionStates_Call) Return(_a0 *querypb.GetPartitionStatesResponse, _a1 error) *MockQueryCoordClient_GetPartitionStates_Call {
|
|
_c.Call.Return(_a0, _a1)
|
|
return _c
|
|
}
|
|
|
|
func (_c *MockQueryCoordClient_GetPartitionStates_Call) RunAndReturn(run func(context.Context, *querypb.GetPartitionStatesRequest, ...grpc.CallOption) (*querypb.GetPartitionStatesResponse, error)) *MockQueryCoordClient_GetPartitionStates_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// GetQueryNodeDistribution provides a mock function with given fields: ctx, in, opts
|
|
func (_m *MockQueryCoordClient) GetQueryNodeDistribution(ctx context.Context, in *querypb.GetQueryNodeDistributionRequest, opts ...grpc.CallOption) (*querypb.GetQueryNodeDistributionResponse, error) {
|
|
_va := make([]interface{}, len(opts))
|
|
for _i := range opts {
|
|
_va[_i] = opts[_i]
|
|
}
|
|
var _ca []interface{}
|
|
_ca = append(_ca, ctx, in)
|
|
_ca = append(_ca, _va...)
|
|
ret := _m.Called(_ca...)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for GetQueryNodeDistribution")
|
|
}
|
|
|
|
var r0 *querypb.GetQueryNodeDistributionResponse
|
|
var r1 error
|
|
if rf, ok := ret.Get(0).(func(context.Context, *querypb.GetQueryNodeDistributionRequest, ...grpc.CallOption) (*querypb.GetQueryNodeDistributionResponse, error)); ok {
|
|
return rf(ctx, in, opts...)
|
|
}
|
|
if rf, ok := ret.Get(0).(func(context.Context, *querypb.GetQueryNodeDistributionRequest, ...grpc.CallOption) *querypb.GetQueryNodeDistributionResponse); ok {
|
|
r0 = rf(ctx, in, opts...)
|
|
} else {
|
|
if ret.Get(0) != nil {
|
|
r0 = ret.Get(0).(*querypb.GetQueryNodeDistributionResponse)
|
|
}
|
|
}
|
|
|
|
if rf, ok := ret.Get(1).(func(context.Context, *querypb.GetQueryNodeDistributionRequest, ...grpc.CallOption) error); ok {
|
|
r1 = rf(ctx, in, opts...)
|
|
} else {
|
|
r1 = ret.Error(1)
|
|
}
|
|
|
|
return r0, r1
|
|
}
|
|
|
|
// MockQueryCoordClient_GetQueryNodeDistribution_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetQueryNodeDistribution'
|
|
type MockQueryCoordClient_GetQueryNodeDistribution_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// GetQueryNodeDistribution is a helper method to define mock.On call
|
|
// - ctx context.Context
|
|
// - in *querypb.GetQueryNodeDistributionRequest
|
|
// - opts ...grpc.CallOption
|
|
func (_e *MockQueryCoordClient_Expecter) GetQueryNodeDistribution(ctx interface{}, in interface{}, opts ...interface{}) *MockQueryCoordClient_GetQueryNodeDistribution_Call {
|
|
return &MockQueryCoordClient_GetQueryNodeDistribution_Call{Call: _e.mock.On("GetQueryNodeDistribution",
|
|
append([]interface{}{ctx, in}, opts...)...)}
|
|
}
|
|
|
|
func (_c *MockQueryCoordClient_GetQueryNodeDistribution_Call) Run(run func(ctx context.Context, in *querypb.GetQueryNodeDistributionRequest, opts ...grpc.CallOption)) *MockQueryCoordClient_GetQueryNodeDistribution_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
variadicArgs := make([]grpc.CallOption, len(args)-2)
|
|
for i, a := range args[2:] {
|
|
if a != nil {
|
|
variadicArgs[i] = a.(grpc.CallOption)
|
|
}
|
|
}
|
|
run(args[0].(context.Context), args[1].(*querypb.GetQueryNodeDistributionRequest), variadicArgs...)
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *MockQueryCoordClient_GetQueryNodeDistribution_Call) Return(_a0 *querypb.GetQueryNodeDistributionResponse, _a1 error) *MockQueryCoordClient_GetQueryNodeDistribution_Call {
|
|
_c.Call.Return(_a0, _a1)
|
|
return _c
|
|
}
|
|
|
|
func (_c *MockQueryCoordClient_GetQueryNodeDistribution_Call) RunAndReturn(run func(context.Context, *querypb.GetQueryNodeDistributionRequest, ...grpc.CallOption) (*querypb.GetQueryNodeDistributionResponse, error)) *MockQueryCoordClient_GetQueryNodeDistribution_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// GetReplicas provides a mock function with given fields: ctx, in, opts
|
|
func (_m *MockQueryCoordClient) GetReplicas(ctx context.Context, in *milvuspb.GetReplicasRequest, opts ...grpc.CallOption) (*milvuspb.GetReplicasResponse, error) {
|
|
_va := make([]interface{}, len(opts))
|
|
for _i := range opts {
|
|
_va[_i] = opts[_i]
|
|
}
|
|
var _ca []interface{}
|
|
_ca = append(_ca, ctx, in)
|
|
_ca = append(_ca, _va...)
|
|
ret := _m.Called(_ca...)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for GetReplicas")
|
|
}
|
|
|
|
var r0 *milvuspb.GetReplicasResponse
|
|
var r1 error
|
|
if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.GetReplicasRequest, ...grpc.CallOption) (*milvuspb.GetReplicasResponse, error)); ok {
|
|
return rf(ctx, in, opts...)
|
|
}
|
|
if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.GetReplicasRequest, ...grpc.CallOption) *milvuspb.GetReplicasResponse); ok {
|
|
r0 = rf(ctx, in, opts...)
|
|
} else {
|
|
if ret.Get(0) != nil {
|
|
r0 = ret.Get(0).(*milvuspb.GetReplicasResponse)
|
|
}
|
|
}
|
|
|
|
if rf, ok := ret.Get(1).(func(context.Context, *milvuspb.GetReplicasRequest, ...grpc.CallOption) error); ok {
|
|
r1 = rf(ctx, in, opts...)
|
|
} else {
|
|
r1 = ret.Error(1)
|
|
}
|
|
|
|
return r0, r1
|
|
}
|
|
|
|
// MockQueryCoordClient_GetReplicas_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetReplicas'
|
|
type MockQueryCoordClient_GetReplicas_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// GetReplicas is a helper method to define mock.On call
|
|
// - ctx context.Context
|
|
// - in *milvuspb.GetReplicasRequest
|
|
// - opts ...grpc.CallOption
|
|
func (_e *MockQueryCoordClient_Expecter) GetReplicas(ctx interface{}, in interface{}, opts ...interface{}) *MockQueryCoordClient_GetReplicas_Call {
|
|
return &MockQueryCoordClient_GetReplicas_Call{Call: _e.mock.On("GetReplicas",
|
|
append([]interface{}{ctx, in}, opts...)...)}
|
|
}
|
|
|
|
func (_c *MockQueryCoordClient_GetReplicas_Call) Run(run func(ctx context.Context, in *milvuspb.GetReplicasRequest, opts ...grpc.CallOption)) *MockQueryCoordClient_GetReplicas_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
variadicArgs := make([]grpc.CallOption, len(args)-2)
|
|
for i, a := range args[2:] {
|
|
if a != nil {
|
|
variadicArgs[i] = a.(grpc.CallOption)
|
|
}
|
|
}
|
|
run(args[0].(context.Context), args[1].(*milvuspb.GetReplicasRequest), variadicArgs...)
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *MockQueryCoordClient_GetReplicas_Call) Return(_a0 *milvuspb.GetReplicasResponse, _a1 error) *MockQueryCoordClient_GetReplicas_Call {
|
|
_c.Call.Return(_a0, _a1)
|
|
return _c
|
|
}
|
|
|
|
func (_c *MockQueryCoordClient_GetReplicas_Call) RunAndReturn(run func(context.Context, *milvuspb.GetReplicasRequest, ...grpc.CallOption) (*milvuspb.GetReplicasResponse, error)) *MockQueryCoordClient_GetReplicas_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// GetShardLeaders provides a mock function with given fields: ctx, in, opts
|
|
func (_m *MockQueryCoordClient) GetShardLeaders(ctx context.Context, in *querypb.GetShardLeadersRequest, opts ...grpc.CallOption) (*querypb.GetShardLeadersResponse, error) {
|
|
_va := make([]interface{}, len(opts))
|
|
for _i := range opts {
|
|
_va[_i] = opts[_i]
|
|
}
|
|
var _ca []interface{}
|
|
_ca = append(_ca, ctx, in)
|
|
_ca = append(_ca, _va...)
|
|
ret := _m.Called(_ca...)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for GetShardLeaders")
|
|
}
|
|
|
|
var r0 *querypb.GetShardLeadersResponse
|
|
var r1 error
|
|
if rf, ok := ret.Get(0).(func(context.Context, *querypb.GetShardLeadersRequest, ...grpc.CallOption) (*querypb.GetShardLeadersResponse, error)); ok {
|
|
return rf(ctx, in, opts...)
|
|
}
|
|
if rf, ok := ret.Get(0).(func(context.Context, *querypb.GetShardLeadersRequest, ...grpc.CallOption) *querypb.GetShardLeadersResponse); ok {
|
|
r0 = rf(ctx, in, opts...)
|
|
} else {
|
|
if ret.Get(0) != nil {
|
|
r0 = ret.Get(0).(*querypb.GetShardLeadersResponse)
|
|
}
|
|
}
|
|
|
|
if rf, ok := ret.Get(1).(func(context.Context, *querypb.GetShardLeadersRequest, ...grpc.CallOption) error); ok {
|
|
r1 = rf(ctx, in, opts...)
|
|
} else {
|
|
r1 = ret.Error(1)
|
|
}
|
|
|
|
return r0, r1
|
|
}
|
|
|
|
// MockQueryCoordClient_GetShardLeaders_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetShardLeaders'
|
|
type MockQueryCoordClient_GetShardLeaders_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// GetShardLeaders is a helper method to define mock.On call
|
|
// - ctx context.Context
|
|
// - in *querypb.GetShardLeadersRequest
|
|
// - opts ...grpc.CallOption
|
|
func (_e *MockQueryCoordClient_Expecter) GetShardLeaders(ctx interface{}, in interface{}, opts ...interface{}) *MockQueryCoordClient_GetShardLeaders_Call {
|
|
return &MockQueryCoordClient_GetShardLeaders_Call{Call: _e.mock.On("GetShardLeaders",
|
|
append([]interface{}{ctx, in}, opts...)...)}
|
|
}
|
|
|
|
func (_c *MockQueryCoordClient_GetShardLeaders_Call) Run(run func(ctx context.Context, in *querypb.GetShardLeadersRequest, opts ...grpc.CallOption)) *MockQueryCoordClient_GetShardLeaders_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
variadicArgs := make([]grpc.CallOption, len(args)-2)
|
|
for i, a := range args[2:] {
|
|
if a != nil {
|
|
variadicArgs[i] = a.(grpc.CallOption)
|
|
}
|
|
}
|
|
run(args[0].(context.Context), args[1].(*querypb.GetShardLeadersRequest), variadicArgs...)
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *MockQueryCoordClient_GetShardLeaders_Call) Return(_a0 *querypb.GetShardLeadersResponse, _a1 error) *MockQueryCoordClient_GetShardLeaders_Call {
|
|
_c.Call.Return(_a0, _a1)
|
|
return _c
|
|
}
|
|
|
|
func (_c *MockQueryCoordClient_GetShardLeaders_Call) RunAndReturn(run func(context.Context, *querypb.GetShardLeadersRequest, ...grpc.CallOption) (*querypb.GetShardLeadersResponse, error)) *MockQueryCoordClient_GetShardLeaders_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// ListCheckers provides a mock function with given fields: ctx, in, opts
|
|
func (_m *MockQueryCoordClient) ListCheckers(ctx context.Context, in *querypb.ListCheckersRequest, opts ...grpc.CallOption) (*querypb.ListCheckersResponse, error) {
|
|
_va := make([]interface{}, len(opts))
|
|
for _i := range opts {
|
|
_va[_i] = opts[_i]
|
|
}
|
|
var _ca []interface{}
|
|
_ca = append(_ca, ctx, in)
|
|
_ca = append(_ca, _va...)
|
|
ret := _m.Called(_ca...)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for ListCheckers")
|
|
}
|
|
|
|
var r0 *querypb.ListCheckersResponse
|
|
var r1 error
|
|
if rf, ok := ret.Get(0).(func(context.Context, *querypb.ListCheckersRequest, ...grpc.CallOption) (*querypb.ListCheckersResponse, error)); ok {
|
|
return rf(ctx, in, opts...)
|
|
}
|
|
if rf, ok := ret.Get(0).(func(context.Context, *querypb.ListCheckersRequest, ...grpc.CallOption) *querypb.ListCheckersResponse); ok {
|
|
r0 = rf(ctx, in, opts...)
|
|
} else {
|
|
if ret.Get(0) != nil {
|
|
r0 = ret.Get(0).(*querypb.ListCheckersResponse)
|
|
}
|
|
}
|
|
|
|
if rf, ok := ret.Get(1).(func(context.Context, *querypb.ListCheckersRequest, ...grpc.CallOption) error); ok {
|
|
r1 = rf(ctx, in, opts...)
|
|
} else {
|
|
r1 = ret.Error(1)
|
|
}
|
|
|
|
return r0, r1
|
|
}
|
|
|
|
// MockQueryCoordClient_ListCheckers_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListCheckers'
|
|
type MockQueryCoordClient_ListCheckers_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// ListCheckers is a helper method to define mock.On call
|
|
// - ctx context.Context
|
|
// - in *querypb.ListCheckersRequest
|
|
// - opts ...grpc.CallOption
|
|
func (_e *MockQueryCoordClient_Expecter) ListCheckers(ctx interface{}, in interface{}, opts ...interface{}) *MockQueryCoordClient_ListCheckers_Call {
|
|
return &MockQueryCoordClient_ListCheckers_Call{Call: _e.mock.On("ListCheckers",
|
|
append([]interface{}{ctx, in}, opts...)...)}
|
|
}
|
|
|
|
func (_c *MockQueryCoordClient_ListCheckers_Call) Run(run func(ctx context.Context, in *querypb.ListCheckersRequest, opts ...grpc.CallOption)) *MockQueryCoordClient_ListCheckers_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
variadicArgs := make([]grpc.CallOption, len(args)-2)
|
|
for i, a := range args[2:] {
|
|
if a != nil {
|
|
variadicArgs[i] = a.(grpc.CallOption)
|
|
}
|
|
}
|
|
run(args[0].(context.Context), args[1].(*querypb.ListCheckersRequest), variadicArgs...)
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *MockQueryCoordClient_ListCheckers_Call) Return(_a0 *querypb.ListCheckersResponse, _a1 error) *MockQueryCoordClient_ListCheckers_Call {
|
|
_c.Call.Return(_a0, _a1)
|
|
return _c
|
|
}
|
|
|
|
func (_c *MockQueryCoordClient_ListCheckers_Call) RunAndReturn(run func(context.Context, *querypb.ListCheckersRequest, ...grpc.CallOption) (*querypb.ListCheckersResponse, error)) *MockQueryCoordClient_ListCheckers_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// ListLoadedSegments provides a mock function with given fields: ctx, in, opts
|
|
func (_m *MockQueryCoordClient) ListLoadedSegments(ctx context.Context, in *querypb.ListLoadedSegmentsRequest, opts ...grpc.CallOption) (*querypb.ListLoadedSegmentsResponse, error) {
|
|
_va := make([]interface{}, len(opts))
|
|
for _i := range opts {
|
|
_va[_i] = opts[_i]
|
|
}
|
|
var _ca []interface{}
|
|
_ca = append(_ca, ctx, in)
|
|
_ca = append(_ca, _va...)
|
|
ret := _m.Called(_ca...)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for ListLoadedSegments")
|
|
}
|
|
|
|
var r0 *querypb.ListLoadedSegmentsResponse
|
|
var r1 error
|
|
if rf, ok := ret.Get(0).(func(context.Context, *querypb.ListLoadedSegmentsRequest, ...grpc.CallOption) (*querypb.ListLoadedSegmentsResponse, error)); ok {
|
|
return rf(ctx, in, opts...)
|
|
}
|
|
if rf, ok := ret.Get(0).(func(context.Context, *querypb.ListLoadedSegmentsRequest, ...grpc.CallOption) *querypb.ListLoadedSegmentsResponse); ok {
|
|
r0 = rf(ctx, in, opts...)
|
|
} else {
|
|
if ret.Get(0) != nil {
|
|
r0 = ret.Get(0).(*querypb.ListLoadedSegmentsResponse)
|
|
}
|
|
}
|
|
|
|
if rf, ok := ret.Get(1).(func(context.Context, *querypb.ListLoadedSegmentsRequest, ...grpc.CallOption) error); ok {
|
|
r1 = rf(ctx, in, opts...)
|
|
} else {
|
|
r1 = ret.Error(1)
|
|
}
|
|
|
|
return r0, r1
|
|
}
|
|
|
|
// MockQueryCoordClient_ListLoadedSegments_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListLoadedSegments'
|
|
type MockQueryCoordClient_ListLoadedSegments_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// ListLoadedSegments is a helper method to define mock.On call
|
|
// - ctx context.Context
|
|
// - in *querypb.ListLoadedSegmentsRequest
|
|
// - opts ...grpc.CallOption
|
|
func (_e *MockQueryCoordClient_Expecter) ListLoadedSegments(ctx interface{}, in interface{}, opts ...interface{}) *MockQueryCoordClient_ListLoadedSegments_Call {
|
|
return &MockQueryCoordClient_ListLoadedSegments_Call{Call: _e.mock.On("ListLoadedSegments",
|
|
append([]interface{}{ctx, in}, opts...)...)}
|
|
}
|
|
|
|
func (_c *MockQueryCoordClient_ListLoadedSegments_Call) Run(run func(ctx context.Context, in *querypb.ListLoadedSegmentsRequest, opts ...grpc.CallOption)) *MockQueryCoordClient_ListLoadedSegments_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
variadicArgs := make([]grpc.CallOption, len(args)-2)
|
|
for i, a := range args[2:] {
|
|
if a != nil {
|
|
variadicArgs[i] = a.(grpc.CallOption)
|
|
}
|
|
}
|
|
run(args[0].(context.Context), args[1].(*querypb.ListLoadedSegmentsRequest), variadicArgs...)
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *MockQueryCoordClient_ListLoadedSegments_Call) Return(_a0 *querypb.ListLoadedSegmentsResponse, _a1 error) *MockQueryCoordClient_ListLoadedSegments_Call {
|
|
_c.Call.Return(_a0, _a1)
|
|
return _c
|
|
}
|
|
|
|
func (_c *MockQueryCoordClient_ListLoadedSegments_Call) RunAndReturn(run func(context.Context, *querypb.ListLoadedSegmentsRequest, ...grpc.CallOption) (*querypb.ListLoadedSegmentsResponse, error)) *MockQueryCoordClient_ListLoadedSegments_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// ListQueryNode provides a mock function with given fields: ctx, in, opts
|
|
func (_m *MockQueryCoordClient) ListQueryNode(ctx context.Context, in *querypb.ListQueryNodeRequest, opts ...grpc.CallOption) (*querypb.ListQueryNodeResponse, error) {
|
|
_va := make([]interface{}, len(opts))
|
|
for _i := range opts {
|
|
_va[_i] = opts[_i]
|
|
}
|
|
var _ca []interface{}
|
|
_ca = append(_ca, ctx, in)
|
|
_ca = append(_ca, _va...)
|
|
ret := _m.Called(_ca...)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for ListQueryNode")
|
|
}
|
|
|
|
var r0 *querypb.ListQueryNodeResponse
|
|
var r1 error
|
|
if rf, ok := ret.Get(0).(func(context.Context, *querypb.ListQueryNodeRequest, ...grpc.CallOption) (*querypb.ListQueryNodeResponse, error)); ok {
|
|
return rf(ctx, in, opts...)
|
|
}
|
|
if rf, ok := ret.Get(0).(func(context.Context, *querypb.ListQueryNodeRequest, ...grpc.CallOption) *querypb.ListQueryNodeResponse); ok {
|
|
r0 = rf(ctx, in, opts...)
|
|
} else {
|
|
if ret.Get(0) != nil {
|
|
r0 = ret.Get(0).(*querypb.ListQueryNodeResponse)
|
|
}
|
|
}
|
|
|
|
if rf, ok := ret.Get(1).(func(context.Context, *querypb.ListQueryNodeRequest, ...grpc.CallOption) error); ok {
|
|
r1 = rf(ctx, in, opts...)
|
|
} else {
|
|
r1 = ret.Error(1)
|
|
}
|
|
|
|
return r0, r1
|
|
}
|
|
|
|
// MockQueryCoordClient_ListQueryNode_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListQueryNode'
|
|
type MockQueryCoordClient_ListQueryNode_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// ListQueryNode is a helper method to define mock.On call
|
|
// - ctx context.Context
|
|
// - in *querypb.ListQueryNodeRequest
|
|
// - opts ...grpc.CallOption
|
|
func (_e *MockQueryCoordClient_Expecter) ListQueryNode(ctx interface{}, in interface{}, opts ...interface{}) *MockQueryCoordClient_ListQueryNode_Call {
|
|
return &MockQueryCoordClient_ListQueryNode_Call{Call: _e.mock.On("ListQueryNode",
|
|
append([]interface{}{ctx, in}, opts...)...)}
|
|
}
|
|
|
|
func (_c *MockQueryCoordClient_ListQueryNode_Call) Run(run func(ctx context.Context, in *querypb.ListQueryNodeRequest, opts ...grpc.CallOption)) *MockQueryCoordClient_ListQueryNode_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
variadicArgs := make([]grpc.CallOption, len(args)-2)
|
|
for i, a := range args[2:] {
|
|
if a != nil {
|
|
variadicArgs[i] = a.(grpc.CallOption)
|
|
}
|
|
}
|
|
run(args[0].(context.Context), args[1].(*querypb.ListQueryNodeRequest), variadicArgs...)
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *MockQueryCoordClient_ListQueryNode_Call) Return(_a0 *querypb.ListQueryNodeResponse, _a1 error) *MockQueryCoordClient_ListQueryNode_Call {
|
|
_c.Call.Return(_a0, _a1)
|
|
return _c
|
|
}
|
|
|
|
func (_c *MockQueryCoordClient_ListQueryNode_Call) RunAndReturn(run func(context.Context, *querypb.ListQueryNodeRequest, ...grpc.CallOption) (*querypb.ListQueryNodeResponse, error)) *MockQueryCoordClient_ListQueryNode_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// ListResourceGroups provides a mock function with given fields: ctx, in, opts
|
|
func (_m *MockQueryCoordClient) ListResourceGroups(ctx context.Context, in *milvuspb.ListResourceGroupsRequest, opts ...grpc.CallOption) (*milvuspb.ListResourceGroupsResponse, error) {
|
|
_va := make([]interface{}, len(opts))
|
|
for _i := range opts {
|
|
_va[_i] = opts[_i]
|
|
}
|
|
var _ca []interface{}
|
|
_ca = append(_ca, ctx, in)
|
|
_ca = append(_ca, _va...)
|
|
ret := _m.Called(_ca...)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for ListResourceGroups")
|
|
}
|
|
|
|
var r0 *milvuspb.ListResourceGroupsResponse
|
|
var r1 error
|
|
if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.ListResourceGroupsRequest, ...grpc.CallOption) (*milvuspb.ListResourceGroupsResponse, error)); ok {
|
|
return rf(ctx, in, opts...)
|
|
}
|
|
if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.ListResourceGroupsRequest, ...grpc.CallOption) *milvuspb.ListResourceGroupsResponse); ok {
|
|
r0 = rf(ctx, in, opts...)
|
|
} else {
|
|
if ret.Get(0) != nil {
|
|
r0 = ret.Get(0).(*milvuspb.ListResourceGroupsResponse)
|
|
}
|
|
}
|
|
|
|
if rf, ok := ret.Get(1).(func(context.Context, *milvuspb.ListResourceGroupsRequest, ...grpc.CallOption) error); ok {
|
|
r1 = rf(ctx, in, opts...)
|
|
} else {
|
|
r1 = ret.Error(1)
|
|
}
|
|
|
|
return r0, r1
|
|
}
|
|
|
|
// MockQueryCoordClient_ListResourceGroups_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListResourceGroups'
|
|
type MockQueryCoordClient_ListResourceGroups_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// ListResourceGroups is a helper method to define mock.On call
|
|
// - ctx context.Context
|
|
// - in *milvuspb.ListResourceGroupsRequest
|
|
// - opts ...grpc.CallOption
|
|
func (_e *MockQueryCoordClient_Expecter) ListResourceGroups(ctx interface{}, in interface{}, opts ...interface{}) *MockQueryCoordClient_ListResourceGroups_Call {
|
|
return &MockQueryCoordClient_ListResourceGroups_Call{Call: _e.mock.On("ListResourceGroups",
|
|
append([]interface{}{ctx, in}, opts...)...)}
|
|
}
|
|
|
|
func (_c *MockQueryCoordClient_ListResourceGroups_Call) Run(run func(ctx context.Context, in *milvuspb.ListResourceGroupsRequest, opts ...grpc.CallOption)) *MockQueryCoordClient_ListResourceGroups_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
variadicArgs := make([]grpc.CallOption, len(args)-2)
|
|
for i, a := range args[2:] {
|
|
if a != nil {
|
|
variadicArgs[i] = a.(grpc.CallOption)
|
|
}
|
|
}
|
|
run(args[0].(context.Context), args[1].(*milvuspb.ListResourceGroupsRequest), variadicArgs...)
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *MockQueryCoordClient_ListResourceGroups_Call) Return(_a0 *milvuspb.ListResourceGroupsResponse, _a1 error) *MockQueryCoordClient_ListResourceGroups_Call {
|
|
_c.Call.Return(_a0, _a1)
|
|
return _c
|
|
}
|
|
|
|
func (_c *MockQueryCoordClient_ListResourceGroups_Call) RunAndReturn(run func(context.Context, *milvuspb.ListResourceGroupsRequest, ...grpc.CallOption) (*milvuspb.ListResourceGroupsResponse, error)) *MockQueryCoordClient_ListResourceGroups_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// LoadBalance provides a mock function with given fields: ctx, in, opts
|
|
func (_m *MockQueryCoordClient) LoadBalance(ctx context.Context, in *querypb.LoadBalanceRequest, opts ...grpc.CallOption) (*commonpb.Status, error) {
|
|
_va := make([]interface{}, len(opts))
|
|
for _i := range opts {
|
|
_va[_i] = opts[_i]
|
|
}
|
|
var _ca []interface{}
|
|
_ca = append(_ca, ctx, in)
|
|
_ca = append(_ca, _va...)
|
|
ret := _m.Called(_ca...)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for LoadBalance")
|
|
}
|
|
|
|
var r0 *commonpb.Status
|
|
var r1 error
|
|
if rf, ok := ret.Get(0).(func(context.Context, *querypb.LoadBalanceRequest, ...grpc.CallOption) (*commonpb.Status, error)); ok {
|
|
return rf(ctx, in, opts...)
|
|
}
|
|
if rf, ok := ret.Get(0).(func(context.Context, *querypb.LoadBalanceRequest, ...grpc.CallOption) *commonpb.Status); ok {
|
|
r0 = rf(ctx, in, opts...)
|
|
} else {
|
|
if ret.Get(0) != nil {
|
|
r0 = ret.Get(0).(*commonpb.Status)
|
|
}
|
|
}
|
|
|
|
if rf, ok := ret.Get(1).(func(context.Context, *querypb.LoadBalanceRequest, ...grpc.CallOption) error); ok {
|
|
r1 = rf(ctx, in, opts...)
|
|
} else {
|
|
r1 = ret.Error(1)
|
|
}
|
|
|
|
return r0, r1
|
|
}
|
|
|
|
// MockQueryCoordClient_LoadBalance_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'LoadBalance'
|
|
type MockQueryCoordClient_LoadBalance_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// LoadBalance is a helper method to define mock.On call
|
|
// - ctx context.Context
|
|
// - in *querypb.LoadBalanceRequest
|
|
// - opts ...grpc.CallOption
|
|
func (_e *MockQueryCoordClient_Expecter) LoadBalance(ctx interface{}, in interface{}, opts ...interface{}) *MockQueryCoordClient_LoadBalance_Call {
|
|
return &MockQueryCoordClient_LoadBalance_Call{Call: _e.mock.On("LoadBalance",
|
|
append([]interface{}{ctx, in}, opts...)...)}
|
|
}
|
|
|
|
func (_c *MockQueryCoordClient_LoadBalance_Call) Run(run func(ctx context.Context, in *querypb.LoadBalanceRequest, opts ...grpc.CallOption)) *MockQueryCoordClient_LoadBalance_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
variadicArgs := make([]grpc.CallOption, len(args)-2)
|
|
for i, a := range args[2:] {
|
|
if a != nil {
|
|
variadicArgs[i] = a.(grpc.CallOption)
|
|
}
|
|
}
|
|
run(args[0].(context.Context), args[1].(*querypb.LoadBalanceRequest), variadicArgs...)
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *MockQueryCoordClient_LoadBalance_Call) Return(_a0 *commonpb.Status, _a1 error) *MockQueryCoordClient_LoadBalance_Call {
|
|
_c.Call.Return(_a0, _a1)
|
|
return _c
|
|
}
|
|
|
|
func (_c *MockQueryCoordClient_LoadBalance_Call) RunAndReturn(run func(context.Context, *querypb.LoadBalanceRequest, ...grpc.CallOption) (*commonpb.Status, error)) *MockQueryCoordClient_LoadBalance_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// LoadCollection provides a mock function with given fields: ctx, in, opts
|
|
func (_m *MockQueryCoordClient) LoadCollection(ctx context.Context, in *querypb.LoadCollectionRequest, opts ...grpc.CallOption) (*commonpb.Status, error) {
|
|
_va := make([]interface{}, len(opts))
|
|
for _i := range opts {
|
|
_va[_i] = opts[_i]
|
|
}
|
|
var _ca []interface{}
|
|
_ca = append(_ca, ctx, in)
|
|
_ca = append(_ca, _va...)
|
|
ret := _m.Called(_ca...)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for LoadCollection")
|
|
}
|
|
|
|
var r0 *commonpb.Status
|
|
var r1 error
|
|
if rf, ok := ret.Get(0).(func(context.Context, *querypb.LoadCollectionRequest, ...grpc.CallOption) (*commonpb.Status, error)); ok {
|
|
return rf(ctx, in, opts...)
|
|
}
|
|
if rf, ok := ret.Get(0).(func(context.Context, *querypb.LoadCollectionRequest, ...grpc.CallOption) *commonpb.Status); ok {
|
|
r0 = rf(ctx, in, opts...)
|
|
} else {
|
|
if ret.Get(0) != nil {
|
|
r0 = ret.Get(0).(*commonpb.Status)
|
|
}
|
|
}
|
|
|
|
if rf, ok := ret.Get(1).(func(context.Context, *querypb.LoadCollectionRequest, ...grpc.CallOption) error); ok {
|
|
r1 = rf(ctx, in, opts...)
|
|
} else {
|
|
r1 = ret.Error(1)
|
|
}
|
|
|
|
return r0, r1
|
|
}
|
|
|
|
// MockQueryCoordClient_LoadCollection_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'LoadCollection'
|
|
type MockQueryCoordClient_LoadCollection_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// LoadCollection is a helper method to define mock.On call
|
|
// - ctx context.Context
|
|
// - in *querypb.LoadCollectionRequest
|
|
// - opts ...grpc.CallOption
|
|
func (_e *MockQueryCoordClient_Expecter) LoadCollection(ctx interface{}, in interface{}, opts ...interface{}) *MockQueryCoordClient_LoadCollection_Call {
|
|
return &MockQueryCoordClient_LoadCollection_Call{Call: _e.mock.On("LoadCollection",
|
|
append([]interface{}{ctx, in}, opts...)...)}
|
|
}
|
|
|
|
func (_c *MockQueryCoordClient_LoadCollection_Call) Run(run func(ctx context.Context, in *querypb.LoadCollectionRequest, opts ...grpc.CallOption)) *MockQueryCoordClient_LoadCollection_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
variadicArgs := make([]grpc.CallOption, len(args)-2)
|
|
for i, a := range args[2:] {
|
|
if a != nil {
|
|
variadicArgs[i] = a.(grpc.CallOption)
|
|
}
|
|
}
|
|
run(args[0].(context.Context), args[1].(*querypb.LoadCollectionRequest), variadicArgs...)
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *MockQueryCoordClient_LoadCollection_Call) Return(_a0 *commonpb.Status, _a1 error) *MockQueryCoordClient_LoadCollection_Call {
|
|
_c.Call.Return(_a0, _a1)
|
|
return _c
|
|
}
|
|
|
|
func (_c *MockQueryCoordClient_LoadCollection_Call) RunAndReturn(run func(context.Context, *querypb.LoadCollectionRequest, ...grpc.CallOption) (*commonpb.Status, error)) *MockQueryCoordClient_LoadCollection_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// LoadPartitions provides a mock function with given fields: ctx, in, opts
|
|
func (_m *MockQueryCoordClient) LoadPartitions(ctx context.Context, in *querypb.LoadPartitionsRequest, opts ...grpc.CallOption) (*commonpb.Status, error) {
|
|
_va := make([]interface{}, len(opts))
|
|
for _i := range opts {
|
|
_va[_i] = opts[_i]
|
|
}
|
|
var _ca []interface{}
|
|
_ca = append(_ca, ctx, in)
|
|
_ca = append(_ca, _va...)
|
|
ret := _m.Called(_ca...)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for LoadPartitions")
|
|
}
|
|
|
|
var r0 *commonpb.Status
|
|
var r1 error
|
|
if rf, ok := ret.Get(0).(func(context.Context, *querypb.LoadPartitionsRequest, ...grpc.CallOption) (*commonpb.Status, error)); ok {
|
|
return rf(ctx, in, opts...)
|
|
}
|
|
if rf, ok := ret.Get(0).(func(context.Context, *querypb.LoadPartitionsRequest, ...grpc.CallOption) *commonpb.Status); ok {
|
|
r0 = rf(ctx, in, opts...)
|
|
} else {
|
|
if ret.Get(0) != nil {
|
|
r0 = ret.Get(0).(*commonpb.Status)
|
|
}
|
|
}
|
|
|
|
if rf, ok := ret.Get(1).(func(context.Context, *querypb.LoadPartitionsRequest, ...grpc.CallOption) error); ok {
|
|
r1 = rf(ctx, in, opts...)
|
|
} else {
|
|
r1 = ret.Error(1)
|
|
}
|
|
|
|
return r0, r1
|
|
}
|
|
|
|
// MockQueryCoordClient_LoadPartitions_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'LoadPartitions'
|
|
type MockQueryCoordClient_LoadPartitions_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// LoadPartitions is a helper method to define mock.On call
|
|
// - ctx context.Context
|
|
// - in *querypb.LoadPartitionsRequest
|
|
// - opts ...grpc.CallOption
|
|
func (_e *MockQueryCoordClient_Expecter) LoadPartitions(ctx interface{}, in interface{}, opts ...interface{}) *MockQueryCoordClient_LoadPartitions_Call {
|
|
return &MockQueryCoordClient_LoadPartitions_Call{Call: _e.mock.On("LoadPartitions",
|
|
append([]interface{}{ctx, in}, opts...)...)}
|
|
}
|
|
|
|
func (_c *MockQueryCoordClient_LoadPartitions_Call) Run(run func(ctx context.Context, in *querypb.LoadPartitionsRequest, opts ...grpc.CallOption)) *MockQueryCoordClient_LoadPartitions_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
variadicArgs := make([]grpc.CallOption, len(args)-2)
|
|
for i, a := range args[2:] {
|
|
if a != nil {
|
|
variadicArgs[i] = a.(grpc.CallOption)
|
|
}
|
|
}
|
|
run(args[0].(context.Context), args[1].(*querypb.LoadPartitionsRequest), variadicArgs...)
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *MockQueryCoordClient_LoadPartitions_Call) Return(_a0 *commonpb.Status, _a1 error) *MockQueryCoordClient_LoadPartitions_Call {
|
|
_c.Call.Return(_a0, _a1)
|
|
return _c
|
|
}
|
|
|
|
func (_c *MockQueryCoordClient_LoadPartitions_Call) RunAndReturn(run func(context.Context, *querypb.LoadPartitionsRequest, ...grpc.CallOption) (*commonpb.Status, error)) *MockQueryCoordClient_LoadPartitions_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// ReleaseCollection provides a mock function with given fields: ctx, in, opts
|
|
func (_m *MockQueryCoordClient) ReleaseCollection(ctx context.Context, in *querypb.ReleaseCollectionRequest, opts ...grpc.CallOption) (*commonpb.Status, error) {
|
|
_va := make([]interface{}, len(opts))
|
|
for _i := range opts {
|
|
_va[_i] = opts[_i]
|
|
}
|
|
var _ca []interface{}
|
|
_ca = append(_ca, ctx, in)
|
|
_ca = append(_ca, _va...)
|
|
ret := _m.Called(_ca...)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for ReleaseCollection")
|
|
}
|
|
|
|
var r0 *commonpb.Status
|
|
var r1 error
|
|
if rf, ok := ret.Get(0).(func(context.Context, *querypb.ReleaseCollectionRequest, ...grpc.CallOption) (*commonpb.Status, error)); ok {
|
|
return rf(ctx, in, opts...)
|
|
}
|
|
if rf, ok := ret.Get(0).(func(context.Context, *querypb.ReleaseCollectionRequest, ...grpc.CallOption) *commonpb.Status); ok {
|
|
r0 = rf(ctx, in, opts...)
|
|
} else {
|
|
if ret.Get(0) != nil {
|
|
r0 = ret.Get(0).(*commonpb.Status)
|
|
}
|
|
}
|
|
|
|
if rf, ok := ret.Get(1).(func(context.Context, *querypb.ReleaseCollectionRequest, ...grpc.CallOption) error); ok {
|
|
r1 = rf(ctx, in, opts...)
|
|
} else {
|
|
r1 = ret.Error(1)
|
|
}
|
|
|
|
return r0, r1
|
|
}
|
|
|
|
// MockQueryCoordClient_ReleaseCollection_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ReleaseCollection'
|
|
type MockQueryCoordClient_ReleaseCollection_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// ReleaseCollection is a helper method to define mock.On call
|
|
// - ctx context.Context
|
|
// - in *querypb.ReleaseCollectionRequest
|
|
// - opts ...grpc.CallOption
|
|
func (_e *MockQueryCoordClient_Expecter) ReleaseCollection(ctx interface{}, in interface{}, opts ...interface{}) *MockQueryCoordClient_ReleaseCollection_Call {
|
|
return &MockQueryCoordClient_ReleaseCollection_Call{Call: _e.mock.On("ReleaseCollection",
|
|
append([]interface{}{ctx, in}, opts...)...)}
|
|
}
|
|
|
|
func (_c *MockQueryCoordClient_ReleaseCollection_Call) Run(run func(ctx context.Context, in *querypb.ReleaseCollectionRequest, opts ...grpc.CallOption)) *MockQueryCoordClient_ReleaseCollection_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
variadicArgs := make([]grpc.CallOption, len(args)-2)
|
|
for i, a := range args[2:] {
|
|
if a != nil {
|
|
variadicArgs[i] = a.(grpc.CallOption)
|
|
}
|
|
}
|
|
run(args[0].(context.Context), args[1].(*querypb.ReleaseCollectionRequest), variadicArgs...)
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *MockQueryCoordClient_ReleaseCollection_Call) Return(_a0 *commonpb.Status, _a1 error) *MockQueryCoordClient_ReleaseCollection_Call {
|
|
_c.Call.Return(_a0, _a1)
|
|
return _c
|
|
}
|
|
|
|
func (_c *MockQueryCoordClient_ReleaseCollection_Call) RunAndReturn(run func(context.Context, *querypb.ReleaseCollectionRequest, ...grpc.CallOption) (*commonpb.Status, error)) *MockQueryCoordClient_ReleaseCollection_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// ReleasePartitions provides a mock function with given fields: ctx, in, opts
|
|
func (_m *MockQueryCoordClient) ReleasePartitions(ctx context.Context, in *querypb.ReleasePartitionsRequest, opts ...grpc.CallOption) (*commonpb.Status, error) {
|
|
_va := make([]interface{}, len(opts))
|
|
for _i := range opts {
|
|
_va[_i] = opts[_i]
|
|
}
|
|
var _ca []interface{}
|
|
_ca = append(_ca, ctx, in)
|
|
_ca = append(_ca, _va...)
|
|
ret := _m.Called(_ca...)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for ReleasePartitions")
|
|
}
|
|
|
|
var r0 *commonpb.Status
|
|
var r1 error
|
|
if rf, ok := ret.Get(0).(func(context.Context, *querypb.ReleasePartitionsRequest, ...grpc.CallOption) (*commonpb.Status, error)); ok {
|
|
return rf(ctx, in, opts...)
|
|
}
|
|
if rf, ok := ret.Get(0).(func(context.Context, *querypb.ReleasePartitionsRequest, ...grpc.CallOption) *commonpb.Status); ok {
|
|
r0 = rf(ctx, in, opts...)
|
|
} else {
|
|
if ret.Get(0) != nil {
|
|
r0 = ret.Get(0).(*commonpb.Status)
|
|
}
|
|
}
|
|
|
|
if rf, ok := ret.Get(1).(func(context.Context, *querypb.ReleasePartitionsRequest, ...grpc.CallOption) error); ok {
|
|
r1 = rf(ctx, in, opts...)
|
|
} else {
|
|
r1 = ret.Error(1)
|
|
}
|
|
|
|
return r0, r1
|
|
}
|
|
|
|
// MockQueryCoordClient_ReleasePartitions_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ReleasePartitions'
|
|
type MockQueryCoordClient_ReleasePartitions_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// ReleasePartitions is a helper method to define mock.On call
|
|
// - ctx context.Context
|
|
// - in *querypb.ReleasePartitionsRequest
|
|
// - opts ...grpc.CallOption
|
|
func (_e *MockQueryCoordClient_Expecter) ReleasePartitions(ctx interface{}, in interface{}, opts ...interface{}) *MockQueryCoordClient_ReleasePartitions_Call {
|
|
return &MockQueryCoordClient_ReleasePartitions_Call{Call: _e.mock.On("ReleasePartitions",
|
|
append([]interface{}{ctx, in}, opts...)...)}
|
|
}
|
|
|
|
func (_c *MockQueryCoordClient_ReleasePartitions_Call) Run(run func(ctx context.Context, in *querypb.ReleasePartitionsRequest, opts ...grpc.CallOption)) *MockQueryCoordClient_ReleasePartitions_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
variadicArgs := make([]grpc.CallOption, len(args)-2)
|
|
for i, a := range args[2:] {
|
|
if a != nil {
|
|
variadicArgs[i] = a.(grpc.CallOption)
|
|
}
|
|
}
|
|
run(args[0].(context.Context), args[1].(*querypb.ReleasePartitionsRequest), variadicArgs...)
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *MockQueryCoordClient_ReleasePartitions_Call) Return(_a0 *commonpb.Status, _a1 error) *MockQueryCoordClient_ReleasePartitions_Call {
|
|
_c.Call.Return(_a0, _a1)
|
|
return _c
|
|
}
|
|
|
|
func (_c *MockQueryCoordClient_ReleasePartitions_Call) RunAndReturn(run func(context.Context, *querypb.ReleasePartitionsRequest, ...grpc.CallOption) (*commonpb.Status, error)) *MockQueryCoordClient_ReleasePartitions_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// ResumeBalance provides a mock function with given fields: ctx, in, opts
|
|
func (_m *MockQueryCoordClient) ResumeBalance(ctx context.Context, in *querypb.ResumeBalanceRequest, opts ...grpc.CallOption) (*commonpb.Status, error) {
|
|
_va := make([]interface{}, len(opts))
|
|
for _i := range opts {
|
|
_va[_i] = opts[_i]
|
|
}
|
|
var _ca []interface{}
|
|
_ca = append(_ca, ctx, in)
|
|
_ca = append(_ca, _va...)
|
|
ret := _m.Called(_ca...)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for ResumeBalance")
|
|
}
|
|
|
|
var r0 *commonpb.Status
|
|
var r1 error
|
|
if rf, ok := ret.Get(0).(func(context.Context, *querypb.ResumeBalanceRequest, ...grpc.CallOption) (*commonpb.Status, error)); ok {
|
|
return rf(ctx, in, opts...)
|
|
}
|
|
if rf, ok := ret.Get(0).(func(context.Context, *querypb.ResumeBalanceRequest, ...grpc.CallOption) *commonpb.Status); ok {
|
|
r0 = rf(ctx, in, opts...)
|
|
} else {
|
|
if ret.Get(0) != nil {
|
|
r0 = ret.Get(0).(*commonpb.Status)
|
|
}
|
|
}
|
|
|
|
if rf, ok := ret.Get(1).(func(context.Context, *querypb.ResumeBalanceRequest, ...grpc.CallOption) error); ok {
|
|
r1 = rf(ctx, in, opts...)
|
|
} else {
|
|
r1 = ret.Error(1)
|
|
}
|
|
|
|
return r0, r1
|
|
}
|
|
|
|
// MockQueryCoordClient_ResumeBalance_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ResumeBalance'
|
|
type MockQueryCoordClient_ResumeBalance_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// ResumeBalance is a helper method to define mock.On call
|
|
// - ctx context.Context
|
|
// - in *querypb.ResumeBalanceRequest
|
|
// - opts ...grpc.CallOption
|
|
func (_e *MockQueryCoordClient_Expecter) ResumeBalance(ctx interface{}, in interface{}, opts ...interface{}) *MockQueryCoordClient_ResumeBalance_Call {
|
|
return &MockQueryCoordClient_ResumeBalance_Call{Call: _e.mock.On("ResumeBalance",
|
|
append([]interface{}{ctx, in}, opts...)...)}
|
|
}
|
|
|
|
func (_c *MockQueryCoordClient_ResumeBalance_Call) Run(run func(ctx context.Context, in *querypb.ResumeBalanceRequest, opts ...grpc.CallOption)) *MockQueryCoordClient_ResumeBalance_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
variadicArgs := make([]grpc.CallOption, len(args)-2)
|
|
for i, a := range args[2:] {
|
|
if a != nil {
|
|
variadicArgs[i] = a.(grpc.CallOption)
|
|
}
|
|
}
|
|
run(args[0].(context.Context), args[1].(*querypb.ResumeBalanceRequest), variadicArgs...)
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *MockQueryCoordClient_ResumeBalance_Call) Return(_a0 *commonpb.Status, _a1 error) *MockQueryCoordClient_ResumeBalance_Call {
|
|
_c.Call.Return(_a0, _a1)
|
|
return _c
|
|
}
|
|
|
|
func (_c *MockQueryCoordClient_ResumeBalance_Call) RunAndReturn(run func(context.Context, *querypb.ResumeBalanceRequest, ...grpc.CallOption) (*commonpb.Status, error)) *MockQueryCoordClient_ResumeBalance_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// ResumeNode provides a mock function with given fields: ctx, in, opts
|
|
func (_m *MockQueryCoordClient) ResumeNode(ctx context.Context, in *querypb.ResumeNodeRequest, opts ...grpc.CallOption) (*commonpb.Status, error) {
|
|
_va := make([]interface{}, len(opts))
|
|
for _i := range opts {
|
|
_va[_i] = opts[_i]
|
|
}
|
|
var _ca []interface{}
|
|
_ca = append(_ca, ctx, in)
|
|
_ca = append(_ca, _va...)
|
|
ret := _m.Called(_ca...)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for ResumeNode")
|
|
}
|
|
|
|
var r0 *commonpb.Status
|
|
var r1 error
|
|
if rf, ok := ret.Get(0).(func(context.Context, *querypb.ResumeNodeRequest, ...grpc.CallOption) (*commonpb.Status, error)); ok {
|
|
return rf(ctx, in, opts...)
|
|
}
|
|
if rf, ok := ret.Get(0).(func(context.Context, *querypb.ResumeNodeRequest, ...grpc.CallOption) *commonpb.Status); ok {
|
|
r0 = rf(ctx, in, opts...)
|
|
} else {
|
|
if ret.Get(0) != nil {
|
|
r0 = ret.Get(0).(*commonpb.Status)
|
|
}
|
|
}
|
|
|
|
if rf, ok := ret.Get(1).(func(context.Context, *querypb.ResumeNodeRequest, ...grpc.CallOption) error); ok {
|
|
r1 = rf(ctx, in, opts...)
|
|
} else {
|
|
r1 = ret.Error(1)
|
|
}
|
|
|
|
return r0, r1
|
|
}
|
|
|
|
// MockQueryCoordClient_ResumeNode_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ResumeNode'
|
|
type MockQueryCoordClient_ResumeNode_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// ResumeNode is a helper method to define mock.On call
|
|
// - ctx context.Context
|
|
// - in *querypb.ResumeNodeRequest
|
|
// - opts ...grpc.CallOption
|
|
func (_e *MockQueryCoordClient_Expecter) ResumeNode(ctx interface{}, in interface{}, opts ...interface{}) *MockQueryCoordClient_ResumeNode_Call {
|
|
return &MockQueryCoordClient_ResumeNode_Call{Call: _e.mock.On("ResumeNode",
|
|
append([]interface{}{ctx, in}, opts...)...)}
|
|
}
|
|
|
|
func (_c *MockQueryCoordClient_ResumeNode_Call) Run(run func(ctx context.Context, in *querypb.ResumeNodeRequest, opts ...grpc.CallOption)) *MockQueryCoordClient_ResumeNode_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
variadicArgs := make([]grpc.CallOption, len(args)-2)
|
|
for i, a := range args[2:] {
|
|
if a != nil {
|
|
variadicArgs[i] = a.(grpc.CallOption)
|
|
}
|
|
}
|
|
run(args[0].(context.Context), args[1].(*querypb.ResumeNodeRequest), variadicArgs...)
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *MockQueryCoordClient_ResumeNode_Call) Return(_a0 *commonpb.Status, _a1 error) *MockQueryCoordClient_ResumeNode_Call {
|
|
_c.Call.Return(_a0, _a1)
|
|
return _c
|
|
}
|
|
|
|
func (_c *MockQueryCoordClient_ResumeNode_Call) RunAndReturn(run func(context.Context, *querypb.ResumeNodeRequest, ...grpc.CallOption) (*commonpb.Status, error)) *MockQueryCoordClient_ResumeNode_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// RunAnalyzer provides a mock function with given fields: ctx, in, opts
|
|
func (_m *MockQueryCoordClient) RunAnalyzer(ctx context.Context, in *querypb.RunAnalyzerRequest, opts ...grpc.CallOption) (*milvuspb.RunAnalyzerResponse, error) {
|
|
_va := make([]interface{}, len(opts))
|
|
for _i := range opts {
|
|
_va[_i] = opts[_i]
|
|
}
|
|
var _ca []interface{}
|
|
_ca = append(_ca, ctx, in)
|
|
_ca = append(_ca, _va...)
|
|
ret := _m.Called(_ca...)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for RunAnalyzer")
|
|
}
|
|
|
|
var r0 *milvuspb.RunAnalyzerResponse
|
|
var r1 error
|
|
if rf, ok := ret.Get(0).(func(context.Context, *querypb.RunAnalyzerRequest, ...grpc.CallOption) (*milvuspb.RunAnalyzerResponse, error)); ok {
|
|
return rf(ctx, in, opts...)
|
|
}
|
|
if rf, ok := ret.Get(0).(func(context.Context, *querypb.RunAnalyzerRequest, ...grpc.CallOption) *milvuspb.RunAnalyzerResponse); ok {
|
|
r0 = rf(ctx, in, opts...)
|
|
} else {
|
|
if ret.Get(0) != nil {
|
|
r0 = ret.Get(0).(*milvuspb.RunAnalyzerResponse)
|
|
}
|
|
}
|
|
|
|
if rf, ok := ret.Get(1).(func(context.Context, *querypb.RunAnalyzerRequest, ...grpc.CallOption) error); ok {
|
|
r1 = rf(ctx, in, opts...)
|
|
} else {
|
|
r1 = ret.Error(1)
|
|
}
|
|
|
|
return r0, r1
|
|
}
|
|
|
|
// MockQueryCoordClient_RunAnalyzer_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'RunAnalyzer'
|
|
type MockQueryCoordClient_RunAnalyzer_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// RunAnalyzer is a helper method to define mock.On call
|
|
// - ctx context.Context
|
|
// - in *querypb.RunAnalyzerRequest
|
|
// - opts ...grpc.CallOption
|
|
func (_e *MockQueryCoordClient_Expecter) RunAnalyzer(ctx interface{}, in interface{}, opts ...interface{}) *MockQueryCoordClient_RunAnalyzer_Call {
|
|
return &MockQueryCoordClient_RunAnalyzer_Call{Call: _e.mock.On("RunAnalyzer",
|
|
append([]interface{}{ctx, in}, opts...)...)}
|
|
}
|
|
|
|
func (_c *MockQueryCoordClient_RunAnalyzer_Call) Run(run func(ctx context.Context, in *querypb.RunAnalyzerRequest, opts ...grpc.CallOption)) *MockQueryCoordClient_RunAnalyzer_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
variadicArgs := make([]grpc.CallOption, len(args)-2)
|
|
for i, a := range args[2:] {
|
|
if a != nil {
|
|
variadicArgs[i] = a.(grpc.CallOption)
|
|
}
|
|
}
|
|
run(args[0].(context.Context), args[1].(*querypb.RunAnalyzerRequest), variadicArgs...)
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *MockQueryCoordClient_RunAnalyzer_Call) Return(_a0 *milvuspb.RunAnalyzerResponse, _a1 error) *MockQueryCoordClient_RunAnalyzer_Call {
|
|
_c.Call.Return(_a0, _a1)
|
|
return _c
|
|
}
|
|
|
|
func (_c *MockQueryCoordClient_RunAnalyzer_Call) RunAndReturn(run func(context.Context, *querypb.RunAnalyzerRequest, ...grpc.CallOption) (*milvuspb.RunAnalyzerResponse, error)) *MockQueryCoordClient_RunAnalyzer_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// ShowConfigurations provides a mock function with given fields: ctx, in, opts
|
|
func (_m *MockQueryCoordClient) ShowConfigurations(ctx context.Context, in *internalpb.ShowConfigurationsRequest, opts ...grpc.CallOption) (*internalpb.ShowConfigurationsResponse, error) {
|
|
_va := make([]interface{}, len(opts))
|
|
for _i := range opts {
|
|
_va[_i] = opts[_i]
|
|
}
|
|
var _ca []interface{}
|
|
_ca = append(_ca, ctx, in)
|
|
_ca = append(_ca, _va...)
|
|
ret := _m.Called(_ca...)
|
|
|
|
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, ...grpc.CallOption) (*internalpb.ShowConfigurationsResponse, error)); ok {
|
|
return rf(ctx, in, opts...)
|
|
}
|
|
if rf, ok := ret.Get(0).(func(context.Context, *internalpb.ShowConfigurationsRequest, ...grpc.CallOption) *internalpb.ShowConfigurationsResponse); ok {
|
|
r0 = rf(ctx, in, opts...)
|
|
} else {
|
|
if ret.Get(0) != nil {
|
|
r0 = ret.Get(0).(*internalpb.ShowConfigurationsResponse)
|
|
}
|
|
}
|
|
|
|
if rf, ok := ret.Get(1).(func(context.Context, *internalpb.ShowConfigurationsRequest, ...grpc.CallOption) error); ok {
|
|
r1 = rf(ctx, in, opts...)
|
|
} else {
|
|
r1 = ret.Error(1)
|
|
}
|
|
|
|
return r0, r1
|
|
}
|
|
|
|
// MockQueryCoordClient_ShowConfigurations_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ShowConfigurations'
|
|
type MockQueryCoordClient_ShowConfigurations_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// ShowConfigurations is a helper method to define mock.On call
|
|
// - ctx context.Context
|
|
// - in *internalpb.ShowConfigurationsRequest
|
|
// - opts ...grpc.CallOption
|
|
func (_e *MockQueryCoordClient_Expecter) ShowConfigurations(ctx interface{}, in interface{}, opts ...interface{}) *MockQueryCoordClient_ShowConfigurations_Call {
|
|
return &MockQueryCoordClient_ShowConfigurations_Call{Call: _e.mock.On("ShowConfigurations",
|
|
append([]interface{}{ctx, in}, opts...)...)}
|
|
}
|
|
|
|
func (_c *MockQueryCoordClient_ShowConfigurations_Call) Run(run func(ctx context.Context, in *internalpb.ShowConfigurationsRequest, opts ...grpc.CallOption)) *MockQueryCoordClient_ShowConfigurations_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
variadicArgs := make([]grpc.CallOption, len(args)-2)
|
|
for i, a := range args[2:] {
|
|
if a != nil {
|
|
variadicArgs[i] = a.(grpc.CallOption)
|
|
}
|
|
}
|
|
run(args[0].(context.Context), args[1].(*internalpb.ShowConfigurationsRequest), variadicArgs...)
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *MockQueryCoordClient_ShowConfigurations_Call) Return(_a0 *internalpb.ShowConfigurationsResponse, _a1 error) *MockQueryCoordClient_ShowConfigurations_Call {
|
|
_c.Call.Return(_a0, _a1)
|
|
return _c
|
|
}
|
|
|
|
func (_c *MockQueryCoordClient_ShowConfigurations_Call) RunAndReturn(run func(context.Context, *internalpb.ShowConfigurationsRequest, ...grpc.CallOption) (*internalpb.ShowConfigurationsResponse, error)) *MockQueryCoordClient_ShowConfigurations_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// ShowLoadCollections provides a mock function with given fields: ctx, in, opts
|
|
func (_m *MockQueryCoordClient) ShowLoadCollections(ctx context.Context, in *querypb.ShowCollectionsRequest, opts ...grpc.CallOption) (*querypb.ShowCollectionsResponse, error) {
|
|
_va := make([]interface{}, len(opts))
|
|
for _i := range opts {
|
|
_va[_i] = opts[_i]
|
|
}
|
|
var _ca []interface{}
|
|
_ca = append(_ca, ctx, in)
|
|
_ca = append(_ca, _va...)
|
|
ret := _m.Called(_ca...)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for ShowLoadCollections")
|
|
}
|
|
|
|
var r0 *querypb.ShowCollectionsResponse
|
|
var r1 error
|
|
if rf, ok := ret.Get(0).(func(context.Context, *querypb.ShowCollectionsRequest, ...grpc.CallOption) (*querypb.ShowCollectionsResponse, error)); ok {
|
|
return rf(ctx, in, opts...)
|
|
}
|
|
if rf, ok := ret.Get(0).(func(context.Context, *querypb.ShowCollectionsRequest, ...grpc.CallOption) *querypb.ShowCollectionsResponse); ok {
|
|
r0 = rf(ctx, in, opts...)
|
|
} else {
|
|
if ret.Get(0) != nil {
|
|
r0 = ret.Get(0).(*querypb.ShowCollectionsResponse)
|
|
}
|
|
}
|
|
|
|
if rf, ok := ret.Get(1).(func(context.Context, *querypb.ShowCollectionsRequest, ...grpc.CallOption) error); ok {
|
|
r1 = rf(ctx, in, opts...)
|
|
} else {
|
|
r1 = ret.Error(1)
|
|
}
|
|
|
|
return r0, r1
|
|
}
|
|
|
|
// MockQueryCoordClient_ShowLoadCollections_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ShowLoadCollections'
|
|
type MockQueryCoordClient_ShowLoadCollections_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// ShowLoadCollections is a helper method to define mock.On call
|
|
// - ctx context.Context
|
|
// - in *querypb.ShowCollectionsRequest
|
|
// - opts ...grpc.CallOption
|
|
func (_e *MockQueryCoordClient_Expecter) ShowLoadCollections(ctx interface{}, in interface{}, opts ...interface{}) *MockQueryCoordClient_ShowLoadCollections_Call {
|
|
return &MockQueryCoordClient_ShowLoadCollections_Call{Call: _e.mock.On("ShowLoadCollections",
|
|
append([]interface{}{ctx, in}, opts...)...)}
|
|
}
|
|
|
|
func (_c *MockQueryCoordClient_ShowLoadCollections_Call) Run(run func(ctx context.Context, in *querypb.ShowCollectionsRequest, opts ...grpc.CallOption)) *MockQueryCoordClient_ShowLoadCollections_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
variadicArgs := make([]grpc.CallOption, len(args)-2)
|
|
for i, a := range args[2:] {
|
|
if a != nil {
|
|
variadicArgs[i] = a.(grpc.CallOption)
|
|
}
|
|
}
|
|
run(args[0].(context.Context), args[1].(*querypb.ShowCollectionsRequest), variadicArgs...)
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *MockQueryCoordClient_ShowLoadCollections_Call) Return(_a0 *querypb.ShowCollectionsResponse, _a1 error) *MockQueryCoordClient_ShowLoadCollections_Call {
|
|
_c.Call.Return(_a0, _a1)
|
|
return _c
|
|
}
|
|
|
|
func (_c *MockQueryCoordClient_ShowLoadCollections_Call) RunAndReturn(run func(context.Context, *querypb.ShowCollectionsRequest, ...grpc.CallOption) (*querypb.ShowCollectionsResponse, error)) *MockQueryCoordClient_ShowLoadCollections_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// ShowLoadPartitions provides a mock function with given fields: ctx, in, opts
|
|
func (_m *MockQueryCoordClient) ShowLoadPartitions(ctx context.Context, in *querypb.ShowPartitionsRequest, opts ...grpc.CallOption) (*querypb.ShowPartitionsResponse, error) {
|
|
_va := make([]interface{}, len(opts))
|
|
for _i := range opts {
|
|
_va[_i] = opts[_i]
|
|
}
|
|
var _ca []interface{}
|
|
_ca = append(_ca, ctx, in)
|
|
_ca = append(_ca, _va...)
|
|
ret := _m.Called(_ca...)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for ShowLoadPartitions")
|
|
}
|
|
|
|
var r0 *querypb.ShowPartitionsResponse
|
|
var r1 error
|
|
if rf, ok := ret.Get(0).(func(context.Context, *querypb.ShowPartitionsRequest, ...grpc.CallOption) (*querypb.ShowPartitionsResponse, error)); ok {
|
|
return rf(ctx, in, opts...)
|
|
}
|
|
if rf, ok := ret.Get(0).(func(context.Context, *querypb.ShowPartitionsRequest, ...grpc.CallOption) *querypb.ShowPartitionsResponse); ok {
|
|
r0 = rf(ctx, in, opts...)
|
|
} else {
|
|
if ret.Get(0) != nil {
|
|
r0 = ret.Get(0).(*querypb.ShowPartitionsResponse)
|
|
}
|
|
}
|
|
|
|
if rf, ok := ret.Get(1).(func(context.Context, *querypb.ShowPartitionsRequest, ...grpc.CallOption) error); ok {
|
|
r1 = rf(ctx, in, opts...)
|
|
} else {
|
|
r1 = ret.Error(1)
|
|
}
|
|
|
|
return r0, r1
|
|
}
|
|
|
|
// MockQueryCoordClient_ShowLoadPartitions_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ShowLoadPartitions'
|
|
type MockQueryCoordClient_ShowLoadPartitions_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// ShowLoadPartitions is a helper method to define mock.On call
|
|
// - ctx context.Context
|
|
// - in *querypb.ShowPartitionsRequest
|
|
// - opts ...grpc.CallOption
|
|
func (_e *MockQueryCoordClient_Expecter) ShowLoadPartitions(ctx interface{}, in interface{}, opts ...interface{}) *MockQueryCoordClient_ShowLoadPartitions_Call {
|
|
return &MockQueryCoordClient_ShowLoadPartitions_Call{Call: _e.mock.On("ShowLoadPartitions",
|
|
append([]interface{}{ctx, in}, opts...)...)}
|
|
}
|
|
|
|
func (_c *MockQueryCoordClient_ShowLoadPartitions_Call) Run(run func(ctx context.Context, in *querypb.ShowPartitionsRequest, opts ...grpc.CallOption)) *MockQueryCoordClient_ShowLoadPartitions_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
variadicArgs := make([]grpc.CallOption, len(args)-2)
|
|
for i, a := range args[2:] {
|
|
if a != nil {
|
|
variadicArgs[i] = a.(grpc.CallOption)
|
|
}
|
|
}
|
|
run(args[0].(context.Context), args[1].(*querypb.ShowPartitionsRequest), variadicArgs...)
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *MockQueryCoordClient_ShowLoadPartitions_Call) Return(_a0 *querypb.ShowPartitionsResponse, _a1 error) *MockQueryCoordClient_ShowLoadPartitions_Call {
|
|
_c.Call.Return(_a0, _a1)
|
|
return _c
|
|
}
|
|
|
|
func (_c *MockQueryCoordClient_ShowLoadPartitions_Call) RunAndReturn(run func(context.Context, *querypb.ShowPartitionsRequest, ...grpc.CallOption) (*querypb.ShowPartitionsResponse, error)) *MockQueryCoordClient_ShowLoadPartitions_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// SuspendBalance provides a mock function with given fields: ctx, in, opts
|
|
func (_m *MockQueryCoordClient) SuspendBalance(ctx context.Context, in *querypb.SuspendBalanceRequest, opts ...grpc.CallOption) (*commonpb.Status, error) {
|
|
_va := make([]interface{}, len(opts))
|
|
for _i := range opts {
|
|
_va[_i] = opts[_i]
|
|
}
|
|
var _ca []interface{}
|
|
_ca = append(_ca, ctx, in)
|
|
_ca = append(_ca, _va...)
|
|
ret := _m.Called(_ca...)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for SuspendBalance")
|
|
}
|
|
|
|
var r0 *commonpb.Status
|
|
var r1 error
|
|
if rf, ok := ret.Get(0).(func(context.Context, *querypb.SuspendBalanceRequest, ...grpc.CallOption) (*commonpb.Status, error)); ok {
|
|
return rf(ctx, in, opts...)
|
|
}
|
|
if rf, ok := ret.Get(0).(func(context.Context, *querypb.SuspendBalanceRequest, ...grpc.CallOption) *commonpb.Status); ok {
|
|
r0 = rf(ctx, in, opts...)
|
|
} else {
|
|
if ret.Get(0) != nil {
|
|
r0 = ret.Get(0).(*commonpb.Status)
|
|
}
|
|
}
|
|
|
|
if rf, ok := ret.Get(1).(func(context.Context, *querypb.SuspendBalanceRequest, ...grpc.CallOption) error); ok {
|
|
r1 = rf(ctx, in, opts...)
|
|
} else {
|
|
r1 = ret.Error(1)
|
|
}
|
|
|
|
return r0, r1
|
|
}
|
|
|
|
// MockQueryCoordClient_SuspendBalance_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SuspendBalance'
|
|
type MockQueryCoordClient_SuspendBalance_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// SuspendBalance is a helper method to define mock.On call
|
|
// - ctx context.Context
|
|
// - in *querypb.SuspendBalanceRequest
|
|
// - opts ...grpc.CallOption
|
|
func (_e *MockQueryCoordClient_Expecter) SuspendBalance(ctx interface{}, in interface{}, opts ...interface{}) *MockQueryCoordClient_SuspendBalance_Call {
|
|
return &MockQueryCoordClient_SuspendBalance_Call{Call: _e.mock.On("SuspendBalance",
|
|
append([]interface{}{ctx, in}, opts...)...)}
|
|
}
|
|
|
|
func (_c *MockQueryCoordClient_SuspendBalance_Call) Run(run func(ctx context.Context, in *querypb.SuspendBalanceRequest, opts ...grpc.CallOption)) *MockQueryCoordClient_SuspendBalance_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
variadicArgs := make([]grpc.CallOption, len(args)-2)
|
|
for i, a := range args[2:] {
|
|
if a != nil {
|
|
variadicArgs[i] = a.(grpc.CallOption)
|
|
}
|
|
}
|
|
run(args[0].(context.Context), args[1].(*querypb.SuspendBalanceRequest), variadicArgs...)
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *MockQueryCoordClient_SuspendBalance_Call) Return(_a0 *commonpb.Status, _a1 error) *MockQueryCoordClient_SuspendBalance_Call {
|
|
_c.Call.Return(_a0, _a1)
|
|
return _c
|
|
}
|
|
|
|
func (_c *MockQueryCoordClient_SuspendBalance_Call) RunAndReturn(run func(context.Context, *querypb.SuspendBalanceRequest, ...grpc.CallOption) (*commonpb.Status, error)) *MockQueryCoordClient_SuspendBalance_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// SuspendNode provides a mock function with given fields: ctx, in, opts
|
|
func (_m *MockQueryCoordClient) SuspendNode(ctx context.Context, in *querypb.SuspendNodeRequest, opts ...grpc.CallOption) (*commonpb.Status, error) {
|
|
_va := make([]interface{}, len(opts))
|
|
for _i := range opts {
|
|
_va[_i] = opts[_i]
|
|
}
|
|
var _ca []interface{}
|
|
_ca = append(_ca, ctx, in)
|
|
_ca = append(_ca, _va...)
|
|
ret := _m.Called(_ca...)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for SuspendNode")
|
|
}
|
|
|
|
var r0 *commonpb.Status
|
|
var r1 error
|
|
if rf, ok := ret.Get(0).(func(context.Context, *querypb.SuspendNodeRequest, ...grpc.CallOption) (*commonpb.Status, error)); ok {
|
|
return rf(ctx, in, opts...)
|
|
}
|
|
if rf, ok := ret.Get(0).(func(context.Context, *querypb.SuspendNodeRequest, ...grpc.CallOption) *commonpb.Status); ok {
|
|
r0 = rf(ctx, in, opts...)
|
|
} else {
|
|
if ret.Get(0) != nil {
|
|
r0 = ret.Get(0).(*commonpb.Status)
|
|
}
|
|
}
|
|
|
|
if rf, ok := ret.Get(1).(func(context.Context, *querypb.SuspendNodeRequest, ...grpc.CallOption) error); ok {
|
|
r1 = rf(ctx, in, opts...)
|
|
} else {
|
|
r1 = ret.Error(1)
|
|
}
|
|
|
|
return r0, r1
|
|
}
|
|
|
|
// MockQueryCoordClient_SuspendNode_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SuspendNode'
|
|
type MockQueryCoordClient_SuspendNode_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// SuspendNode is a helper method to define mock.On call
|
|
// - ctx context.Context
|
|
// - in *querypb.SuspendNodeRequest
|
|
// - opts ...grpc.CallOption
|
|
func (_e *MockQueryCoordClient_Expecter) SuspendNode(ctx interface{}, in interface{}, opts ...interface{}) *MockQueryCoordClient_SuspendNode_Call {
|
|
return &MockQueryCoordClient_SuspendNode_Call{Call: _e.mock.On("SuspendNode",
|
|
append([]interface{}{ctx, in}, opts...)...)}
|
|
}
|
|
|
|
func (_c *MockQueryCoordClient_SuspendNode_Call) Run(run func(ctx context.Context, in *querypb.SuspendNodeRequest, opts ...grpc.CallOption)) *MockQueryCoordClient_SuspendNode_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
variadicArgs := make([]grpc.CallOption, len(args)-2)
|
|
for i, a := range args[2:] {
|
|
if a != nil {
|
|
variadicArgs[i] = a.(grpc.CallOption)
|
|
}
|
|
}
|
|
run(args[0].(context.Context), args[1].(*querypb.SuspendNodeRequest), variadicArgs...)
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *MockQueryCoordClient_SuspendNode_Call) Return(_a0 *commonpb.Status, _a1 error) *MockQueryCoordClient_SuspendNode_Call {
|
|
_c.Call.Return(_a0, _a1)
|
|
return _c
|
|
}
|
|
|
|
func (_c *MockQueryCoordClient_SuspendNode_Call) RunAndReturn(run func(context.Context, *querypb.SuspendNodeRequest, ...grpc.CallOption) (*commonpb.Status, error)) *MockQueryCoordClient_SuspendNode_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// SyncNewCreatedPartition provides a mock function with given fields: ctx, in, opts
|
|
func (_m *MockQueryCoordClient) SyncNewCreatedPartition(ctx context.Context, in *querypb.SyncNewCreatedPartitionRequest, opts ...grpc.CallOption) (*commonpb.Status, error) {
|
|
_va := make([]interface{}, len(opts))
|
|
for _i := range opts {
|
|
_va[_i] = opts[_i]
|
|
}
|
|
var _ca []interface{}
|
|
_ca = append(_ca, ctx, in)
|
|
_ca = append(_ca, _va...)
|
|
ret := _m.Called(_ca...)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for SyncNewCreatedPartition")
|
|
}
|
|
|
|
var r0 *commonpb.Status
|
|
var r1 error
|
|
if rf, ok := ret.Get(0).(func(context.Context, *querypb.SyncNewCreatedPartitionRequest, ...grpc.CallOption) (*commonpb.Status, error)); ok {
|
|
return rf(ctx, in, opts...)
|
|
}
|
|
if rf, ok := ret.Get(0).(func(context.Context, *querypb.SyncNewCreatedPartitionRequest, ...grpc.CallOption) *commonpb.Status); ok {
|
|
r0 = rf(ctx, in, opts...)
|
|
} else {
|
|
if ret.Get(0) != nil {
|
|
r0 = ret.Get(0).(*commonpb.Status)
|
|
}
|
|
}
|
|
|
|
if rf, ok := ret.Get(1).(func(context.Context, *querypb.SyncNewCreatedPartitionRequest, ...grpc.CallOption) error); ok {
|
|
r1 = rf(ctx, in, opts...)
|
|
} else {
|
|
r1 = ret.Error(1)
|
|
}
|
|
|
|
return r0, r1
|
|
}
|
|
|
|
// MockQueryCoordClient_SyncNewCreatedPartition_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SyncNewCreatedPartition'
|
|
type MockQueryCoordClient_SyncNewCreatedPartition_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// SyncNewCreatedPartition is a helper method to define mock.On call
|
|
// - ctx context.Context
|
|
// - in *querypb.SyncNewCreatedPartitionRequest
|
|
// - opts ...grpc.CallOption
|
|
func (_e *MockQueryCoordClient_Expecter) SyncNewCreatedPartition(ctx interface{}, in interface{}, opts ...interface{}) *MockQueryCoordClient_SyncNewCreatedPartition_Call {
|
|
return &MockQueryCoordClient_SyncNewCreatedPartition_Call{Call: _e.mock.On("SyncNewCreatedPartition",
|
|
append([]interface{}{ctx, in}, opts...)...)}
|
|
}
|
|
|
|
func (_c *MockQueryCoordClient_SyncNewCreatedPartition_Call) Run(run func(ctx context.Context, in *querypb.SyncNewCreatedPartitionRequest, opts ...grpc.CallOption)) *MockQueryCoordClient_SyncNewCreatedPartition_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
variadicArgs := make([]grpc.CallOption, len(args)-2)
|
|
for i, a := range args[2:] {
|
|
if a != nil {
|
|
variadicArgs[i] = a.(grpc.CallOption)
|
|
}
|
|
}
|
|
run(args[0].(context.Context), args[1].(*querypb.SyncNewCreatedPartitionRequest), variadicArgs...)
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *MockQueryCoordClient_SyncNewCreatedPartition_Call) Return(_a0 *commonpb.Status, _a1 error) *MockQueryCoordClient_SyncNewCreatedPartition_Call {
|
|
_c.Call.Return(_a0, _a1)
|
|
return _c
|
|
}
|
|
|
|
func (_c *MockQueryCoordClient_SyncNewCreatedPartition_Call) RunAndReturn(run func(context.Context, *querypb.SyncNewCreatedPartitionRequest, ...grpc.CallOption) (*commonpb.Status, error)) *MockQueryCoordClient_SyncNewCreatedPartition_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// TransferChannel provides a mock function with given fields: ctx, in, opts
|
|
func (_m *MockQueryCoordClient) TransferChannel(ctx context.Context, in *querypb.TransferChannelRequest, opts ...grpc.CallOption) (*commonpb.Status, error) {
|
|
_va := make([]interface{}, len(opts))
|
|
for _i := range opts {
|
|
_va[_i] = opts[_i]
|
|
}
|
|
var _ca []interface{}
|
|
_ca = append(_ca, ctx, in)
|
|
_ca = append(_ca, _va...)
|
|
ret := _m.Called(_ca...)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for TransferChannel")
|
|
}
|
|
|
|
var r0 *commonpb.Status
|
|
var r1 error
|
|
if rf, ok := ret.Get(0).(func(context.Context, *querypb.TransferChannelRequest, ...grpc.CallOption) (*commonpb.Status, error)); ok {
|
|
return rf(ctx, in, opts...)
|
|
}
|
|
if rf, ok := ret.Get(0).(func(context.Context, *querypb.TransferChannelRequest, ...grpc.CallOption) *commonpb.Status); ok {
|
|
r0 = rf(ctx, in, opts...)
|
|
} else {
|
|
if ret.Get(0) != nil {
|
|
r0 = ret.Get(0).(*commonpb.Status)
|
|
}
|
|
}
|
|
|
|
if rf, ok := ret.Get(1).(func(context.Context, *querypb.TransferChannelRequest, ...grpc.CallOption) error); ok {
|
|
r1 = rf(ctx, in, opts...)
|
|
} else {
|
|
r1 = ret.Error(1)
|
|
}
|
|
|
|
return r0, r1
|
|
}
|
|
|
|
// MockQueryCoordClient_TransferChannel_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'TransferChannel'
|
|
type MockQueryCoordClient_TransferChannel_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// TransferChannel is a helper method to define mock.On call
|
|
// - ctx context.Context
|
|
// - in *querypb.TransferChannelRequest
|
|
// - opts ...grpc.CallOption
|
|
func (_e *MockQueryCoordClient_Expecter) TransferChannel(ctx interface{}, in interface{}, opts ...interface{}) *MockQueryCoordClient_TransferChannel_Call {
|
|
return &MockQueryCoordClient_TransferChannel_Call{Call: _e.mock.On("TransferChannel",
|
|
append([]interface{}{ctx, in}, opts...)...)}
|
|
}
|
|
|
|
func (_c *MockQueryCoordClient_TransferChannel_Call) Run(run func(ctx context.Context, in *querypb.TransferChannelRequest, opts ...grpc.CallOption)) *MockQueryCoordClient_TransferChannel_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
variadicArgs := make([]grpc.CallOption, len(args)-2)
|
|
for i, a := range args[2:] {
|
|
if a != nil {
|
|
variadicArgs[i] = a.(grpc.CallOption)
|
|
}
|
|
}
|
|
run(args[0].(context.Context), args[1].(*querypb.TransferChannelRequest), variadicArgs...)
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *MockQueryCoordClient_TransferChannel_Call) Return(_a0 *commonpb.Status, _a1 error) *MockQueryCoordClient_TransferChannel_Call {
|
|
_c.Call.Return(_a0, _a1)
|
|
return _c
|
|
}
|
|
|
|
func (_c *MockQueryCoordClient_TransferChannel_Call) RunAndReturn(run func(context.Context, *querypb.TransferChannelRequest, ...grpc.CallOption) (*commonpb.Status, error)) *MockQueryCoordClient_TransferChannel_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// TransferNode provides a mock function with given fields: ctx, in, opts
|
|
func (_m *MockQueryCoordClient) TransferNode(ctx context.Context, in *milvuspb.TransferNodeRequest, opts ...grpc.CallOption) (*commonpb.Status, error) {
|
|
_va := make([]interface{}, len(opts))
|
|
for _i := range opts {
|
|
_va[_i] = opts[_i]
|
|
}
|
|
var _ca []interface{}
|
|
_ca = append(_ca, ctx, in)
|
|
_ca = append(_ca, _va...)
|
|
ret := _m.Called(_ca...)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for TransferNode")
|
|
}
|
|
|
|
var r0 *commonpb.Status
|
|
var r1 error
|
|
if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.TransferNodeRequest, ...grpc.CallOption) (*commonpb.Status, error)); ok {
|
|
return rf(ctx, in, opts...)
|
|
}
|
|
if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.TransferNodeRequest, ...grpc.CallOption) *commonpb.Status); ok {
|
|
r0 = rf(ctx, in, opts...)
|
|
} else {
|
|
if ret.Get(0) != nil {
|
|
r0 = ret.Get(0).(*commonpb.Status)
|
|
}
|
|
}
|
|
|
|
if rf, ok := ret.Get(1).(func(context.Context, *milvuspb.TransferNodeRequest, ...grpc.CallOption) error); ok {
|
|
r1 = rf(ctx, in, opts...)
|
|
} else {
|
|
r1 = ret.Error(1)
|
|
}
|
|
|
|
return r0, r1
|
|
}
|
|
|
|
// MockQueryCoordClient_TransferNode_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'TransferNode'
|
|
type MockQueryCoordClient_TransferNode_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// TransferNode is a helper method to define mock.On call
|
|
// - ctx context.Context
|
|
// - in *milvuspb.TransferNodeRequest
|
|
// - opts ...grpc.CallOption
|
|
func (_e *MockQueryCoordClient_Expecter) TransferNode(ctx interface{}, in interface{}, opts ...interface{}) *MockQueryCoordClient_TransferNode_Call {
|
|
return &MockQueryCoordClient_TransferNode_Call{Call: _e.mock.On("TransferNode",
|
|
append([]interface{}{ctx, in}, opts...)...)}
|
|
}
|
|
|
|
func (_c *MockQueryCoordClient_TransferNode_Call) Run(run func(ctx context.Context, in *milvuspb.TransferNodeRequest, opts ...grpc.CallOption)) *MockQueryCoordClient_TransferNode_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
variadicArgs := make([]grpc.CallOption, len(args)-2)
|
|
for i, a := range args[2:] {
|
|
if a != nil {
|
|
variadicArgs[i] = a.(grpc.CallOption)
|
|
}
|
|
}
|
|
run(args[0].(context.Context), args[1].(*milvuspb.TransferNodeRequest), variadicArgs...)
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *MockQueryCoordClient_TransferNode_Call) Return(_a0 *commonpb.Status, _a1 error) *MockQueryCoordClient_TransferNode_Call {
|
|
_c.Call.Return(_a0, _a1)
|
|
return _c
|
|
}
|
|
|
|
func (_c *MockQueryCoordClient_TransferNode_Call) RunAndReturn(run func(context.Context, *milvuspb.TransferNodeRequest, ...grpc.CallOption) (*commonpb.Status, error)) *MockQueryCoordClient_TransferNode_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// TransferReplica provides a mock function with given fields: ctx, in, opts
|
|
func (_m *MockQueryCoordClient) TransferReplica(ctx context.Context, in *querypb.TransferReplicaRequest, opts ...grpc.CallOption) (*commonpb.Status, error) {
|
|
_va := make([]interface{}, len(opts))
|
|
for _i := range opts {
|
|
_va[_i] = opts[_i]
|
|
}
|
|
var _ca []interface{}
|
|
_ca = append(_ca, ctx, in)
|
|
_ca = append(_ca, _va...)
|
|
ret := _m.Called(_ca...)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for TransferReplica")
|
|
}
|
|
|
|
var r0 *commonpb.Status
|
|
var r1 error
|
|
if rf, ok := ret.Get(0).(func(context.Context, *querypb.TransferReplicaRequest, ...grpc.CallOption) (*commonpb.Status, error)); ok {
|
|
return rf(ctx, in, opts...)
|
|
}
|
|
if rf, ok := ret.Get(0).(func(context.Context, *querypb.TransferReplicaRequest, ...grpc.CallOption) *commonpb.Status); ok {
|
|
r0 = rf(ctx, in, opts...)
|
|
} else {
|
|
if ret.Get(0) != nil {
|
|
r0 = ret.Get(0).(*commonpb.Status)
|
|
}
|
|
}
|
|
|
|
if rf, ok := ret.Get(1).(func(context.Context, *querypb.TransferReplicaRequest, ...grpc.CallOption) error); ok {
|
|
r1 = rf(ctx, in, opts...)
|
|
} else {
|
|
r1 = ret.Error(1)
|
|
}
|
|
|
|
return r0, r1
|
|
}
|
|
|
|
// MockQueryCoordClient_TransferReplica_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'TransferReplica'
|
|
type MockQueryCoordClient_TransferReplica_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// TransferReplica is a helper method to define mock.On call
|
|
// - ctx context.Context
|
|
// - in *querypb.TransferReplicaRequest
|
|
// - opts ...grpc.CallOption
|
|
func (_e *MockQueryCoordClient_Expecter) TransferReplica(ctx interface{}, in interface{}, opts ...interface{}) *MockQueryCoordClient_TransferReplica_Call {
|
|
return &MockQueryCoordClient_TransferReplica_Call{Call: _e.mock.On("TransferReplica",
|
|
append([]interface{}{ctx, in}, opts...)...)}
|
|
}
|
|
|
|
func (_c *MockQueryCoordClient_TransferReplica_Call) Run(run func(ctx context.Context, in *querypb.TransferReplicaRequest, opts ...grpc.CallOption)) *MockQueryCoordClient_TransferReplica_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
variadicArgs := make([]grpc.CallOption, len(args)-2)
|
|
for i, a := range args[2:] {
|
|
if a != nil {
|
|
variadicArgs[i] = a.(grpc.CallOption)
|
|
}
|
|
}
|
|
run(args[0].(context.Context), args[1].(*querypb.TransferReplicaRequest), variadicArgs...)
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *MockQueryCoordClient_TransferReplica_Call) Return(_a0 *commonpb.Status, _a1 error) *MockQueryCoordClient_TransferReplica_Call {
|
|
_c.Call.Return(_a0, _a1)
|
|
return _c
|
|
}
|
|
|
|
func (_c *MockQueryCoordClient_TransferReplica_Call) RunAndReturn(run func(context.Context, *querypb.TransferReplicaRequest, ...grpc.CallOption) (*commonpb.Status, error)) *MockQueryCoordClient_TransferReplica_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// TransferSegment provides a mock function with given fields: ctx, in, opts
|
|
func (_m *MockQueryCoordClient) TransferSegment(ctx context.Context, in *querypb.TransferSegmentRequest, opts ...grpc.CallOption) (*commonpb.Status, error) {
|
|
_va := make([]interface{}, len(opts))
|
|
for _i := range opts {
|
|
_va[_i] = opts[_i]
|
|
}
|
|
var _ca []interface{}
|
|
_ca = append(_ca, ctx, in)
|
|
_ca = append(_ca, _va...)
|
|
ret := _m.Called(_ca...)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for TransferSegment")
|
|
}
|
|
|
|
var r0 *commonpb.Status
|
|
var r1 error
|
|
if rf, ok := ret.Get(0).(func(context.Context, *querypb.TransferSegmentRequest, ...grpc.CallOption) (*commonpb.Status, error)); ok {
|
|
return rf(ctx, in, opts...)
|
|
}
|
|
if rf, ok := ret.Get(0).(func(context.Context, *querypb.TransferSegmentRequest, ...grpc.CallOption) *commonpb.Status); ok {
|
|
r0 = rf(ctx, in, opts...)
|
|
} else {
|
|
if ret.Get(0) != nil {
|
|
r0 = ret.Get(0).(*commonpb.Status)
|
|
}
|
|
}
|
|
|
|
if rf, ok := ret.Get(1).(func(context.Context, *querypb.TransferSegmentRequest, ...grpc.CallOption) error); ok {
|
|
r1 = rf(ctx, in, opts...)
|
|
} else {
|
|
r1 = ret.Error(1)
|
|
}
|
|
|
|
return r0, r1
|
|
}
|
|
|
|
// MockQueryCoordClient_TransferSegment_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'TransferSegment'
|
|
type MockQueryCoordClient_TransferSegment_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// TransferSegment is a helper method to define mock.On call
|
|
// - ctx context.Context
|
|
// - in *querypb.TransferSegmentRequest
|
|
// - opts ...grpc.CallOption
|
|
func (_e *MockQueryCoordClient_Expecter) TransferSegment(ctx interface{}, in interface{}, opts ...interface{}) *MockQueryCoordClient_TransferSegment_Call {
|
|
return &MockQueryCoordClient_TransferSegment_Call{Call: _e.mock.On("TransferSegment",
|
|
append([]interface{}{ctx, in}, opts...)...)}
|
|
}
|
|
|
|
func (_c *MockQueryCoordClient_TransferSegment_Call) Run(run func(ctx context.Context, in *querypb.TransferSegmentRequest, opts ...grpc.CallOption)) *MockQueryCoordClient_TransferSegment_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
variadicArgs := make([]grpc.CallOption, len(args)-2)
|
|
for i, a := range args[2:] {
|
|
if a != nil {
|
|
variadicArgs[i] = a.(grpc.CallOption)
|
|
}
|
|
}
|
|
run(args[0].(context.Context), args[1].(*querypb.TransferSegmentRequest), variadicArgs...)
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *MockQueryCoordClient_TransferSegment_Call) Return(_a0 *commonpb.Status, _a1 error) *MockQueryCoordClient_TransferSegment_Call {
|
|
_c.Call.Return(_a0, _a1)
|
|
return _c
|
|
}
|
|
|
|
func (_c *MockQueryCoordClient_TransferSegment_Call) RunAndReturn(run func(context.Context, *querypb.TransferSegmentRequest, ...grpc.CallOption) (*commonpb.Status, error)) *MockQueryCoordClient_TransferSegment_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// UpdateLoadConfig provides a mock function with given fields: ctx, in, opts
|
|
func (_m *MockQueryCoordClient) UpdateLoadConfig(ctx context.Context, in *querypb.UpdateLoadConfigRequest, opts ...grpc.CallOption) (*commonpb.Status, error) {
|
|
_va := make([]interface{}, len(opts))
|
|
for _i := range opts {
|
|
_va[_i] = opts[_i]
|
|
}
|
|
var _ca []interface{}
|
|
_ca = append(_ca, ctx, in)
|
|
_ca = append(_ca, _va...)
|
|
ret := _m.Called(_ca...)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for UpdateLoadConfig")
|
|
}
|
|
|
|
var r0 *commonpb.Status
|
|
var r1 error
|
|
if rf, ok := ret.Get(0).(func(context.Context, *querypb.UpdateLoadConfigRequest, ...grpc.CallOption) (*commonpb.Status, error)); ok {
|
|
return rf(ctx, in, opts...)
|
|
}
|
|
if rf, ok := ret.Get(0).(func(context.Context, *querypb.UpdateLoadConfigRequest, ...grpc.CallOption) *commonpb.Status); ok {
|
|
r0 = rf(ctx, in, opts...)
|
|
} else {
|
|
if ret.Get(0) != nil {
|
|
r0 = ret.Get(0).(*commonpb.Status)
|
|
}
|
|
}
|
|
|
|
if rf, ok := ret.Get(1).(func(context.Context, *querypb.UpdateLoadConfigRequest, ...grpc.CallOption) error); ok {
|
|
r1 = rf(ctx, in, opts...)
|
|
} else {
|
|
r1 = ret.Error(1)
|
|
}
|
|
|
|
return r0, r1
|
|
}
|
|
|
|
// MockQueryCoordClient_UpdateLoadConfig_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UpdateLoadConfig'
|
|
type MockQueryCoordClient_UpdateLoadConfig_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// UpdateLoadConfig is a helper method to define mock.On call
|
|
// - ctx context.Context
|
|
// - in *querypb.UpdateLoadConfigRequest
|
|
// - opts ...grpc.CallOption
|
|
func (_e *MockQueryCoordClient_Expecter) UpdateLoadConfig(ctx interface{}, in interface{}, opts ...interface{}) *MockQueryCoordClient_UpdateLoadConfig_Call {
|
|
return &MockQueryCoordClient_UpdateLoadConfig_Call{Call: _e.mock.On("UpdateLoadConfig",
|
|
append([]interface{}{ctx, in}, opts...)...)}
|
|
}
|
|
|
|
func (_c *MockQueryCoordClient_UpdateLoadConfig_Call) Run(run func(ctx context.Context, in *querypb.UpdateLoadConfigRequest, opts ...grpc.CallOption)) *MockQueryCoordClient_UpdateLoadConfig_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
variadicArgs := make([]grpc.CallOption, len(args)-2)
|
|
for i, a := range args[2:] {
|
|
if a != nil {
|
|
variadicArgs[i] = a.(grpc.CallOption)
|
|
}
|
|
}
|
|
run(args[0].(context.Context), args[1].(*querypb.UpdateLoadConfigRequest), variadicArgs...)
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *MockQueryCoordClient_UpdateLoadConfig_Call) Return(_a0 *commonpb.Status, _a1 error) *MockQueryCoordClient_UpdateLoadConfig_Call {
|
|
_c.Call.Return(_a0, _a1)
|
|
return _c
|
|
}
|
|
|
|
func (_c *MockQueryCoordClient_UpdateLoadConfig_Call) RunAndReturn(run func(context.Context, *querypb.UpdateLoadConfigRequest, ...grpc.CallOption) (*commonpb.Status, error)) *MockQueryCoordClient_UpdateLoadConfig_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// UpdateResourceGroups provides a mock function with given fields: ctx, in, opts
|
|
func (_m *MockQueryCoordClient) UpdateResourceGroups(ctx context.Context, in *querypb.UpdateResourceGroupsRequest, opts ...grpc.CallOption) (*commonpb.Status, error) {
|
|
_va := make([]interface{}, len(opts))
|
|
for _i := range opts {
|
|
_va[_i] = opts[_i]
|
|
}
|
|
var _ca []interface{}
|
|
_ca = append(_ca, ctx, in)
|
|
_ca = append(_ca, _va...)
|
|
ret := _m.Called(_ca...)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for UpdateResourceGroups")
|
|
}
|
|
|
|
var r0 *commonpb.Status
|
|
var r1 error
|
|
if rf, ok := ret.Get(0).(func(context.Context, *querypb.UpdateResourceGroupsRequest, ...grpc.CallOption) (*commonpb.Status, error)); ok {
|
|
return rf(ctx, in, opts...)
|
|
}
|
|
if rf, ok := ret.Get(0).(func(context.Context, *querypb.UpdateResourceGroupsRequest, ...grpc.CallOption) *commonpb.Status); ok {
|
|
r0 = rf(ctx, in, opts...)
|
|
} else {
|
|
if ret.Get(0) != nil {
|
|
r0 = ret.Get(0).(*commonpb.Status)
|
|
}
|
|
}
|
|
|
|
if rf, ok := ret.Get(1).(func(context.Context, *querypb.UpdateResourceGroupsRequest, ...grpc.CallOption) error); ok {
|
|
r1 = rf(ctx, in, opts...)
|
|
} else {
|
|
r1 = ret.Error(1)
|
|
}
|
|
|
|
return r0, r1
|
|
}
|
|
|
|
// MockQueryCoordClient_UpdateResourceGroups_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UpdateResourceGroups'
|
|
type MockQueryCoordClient_UpdateResourceGroups_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// UpdateResourceGroups is a helper method to define mock.On call
|
|
// - ctx context.Context
|
|
// - in *querypb.UpdateResourceGroupsRequest
|
|
// - opts ...grpc.CallOption
|
|
func (_e *MockQueryCoordClient_Expecter) UpdateResourceGroups(ctx interface{}, in interface{}, opts ...interface{}) *MockQueryCoordClient_UpdateResourceGroups_Call {
|
|
return &MockQueryCoordClient_UpdateResourceGroups_Call{Call: _e.mock.On("UpdateResourceGroups",
|
|
append([]interface{}{ctx, in}, opts...)...)}
|
|
}
|
|
|
|
func (_c *MockQueryCoordClient_UpdateResourceGroups_Call) Run(run func(ctx context.Context, in *querypb.UpdateResourceGroupsRequest, opts ...grpc.CallOption)) *MockQueryCoordClient_UpdateResourceGroups_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
variadicArgs := make([]grpc.CallOption, len(args)-2)
|
|
for i, a := range args[2:] {
|
|
if a != nil {
|
|
variadicArgs[i] = a.(grpc.CallOption)
|
|
}
|
|
}
|
|
run(args[0].(context.Context), args[1].(*querypb.UpdateResourceGroupsRequest), variadicArgs...)
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *MockQueryCoordClient_UpdateResourceGroups_Call) Return(_a0 *commonpb.Status, _a1 error) *MockQueryCoordClient_UpdateResourceGroups_Call {
|
|
_c.Call.Return(_a0, _a1)
|
|
return _c
|
|
}
|
|
|
|
func (_c *MockQueryCoordClient_UpdateResourceGroups_Call) RunAndReturn(run func(context.Context, *querypb.UpdateResourceGroupsRequest, ...grpc.CallOption) (*commonpb.Status, error)) *MockQueryCoordClient_UpdateResourceGroups_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// ValidateAnalyzer provides a mock function with given fields: ctx, in, opts
|
|
func (_m *MockQueryCoordClient) ValidateAnalyzer(ctx context.Context, in *querypb.ValidateAnalyzerRequest, opts ...grpc.CallOption) (*querypb.ValidateAnalyzerResponse, error) {
|
|
_va := make([]interface{}, len(opts))
|
|
for _i := range opts {
|
|
_va[_i] = opts[_i]
|
|
}
|
|
var _ca []interface{}
|
|
_ca = append(_ca, ctx, in)
|
|
_ca = append(_ca, _va...)
|
|
ret := _m.Called(_ca...)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for ValidateAnalyzer")
|
|
}
|
|
|
|
var r0 *querypb.ValidateAnalyzerResponse
|
|
var r1 error
|
|
if rf, ok := ret.Get(0).(func(context.Context, *querypb.ValidateAnalyzerRequest, ...grpc.CallOption) (*querypb.ValidateAnalyzerResponse, error)); ok {
|
|
return rf(ctx, in, opts...)
|
|
}
|
|
if rf, ok := ret.Get(0).(func(context.Context, *querypb.ValidateAnalyzerRequest, ...grpc.CallOption) *querypb.ValidateAnalyzerResponse); ok {
|
|
r0 = rf(ctx, in, opts...)
|
|
} else {
|
|
if ret.Get(0) != nil {
|
|
r0 = ret.Get(0).(*querypb.ValidateAnalyzerResponse)
|
|
}
|
|
}
|
|
|
|
if rf, ok := ret.Get(1).(func(context.Context, *querypb.ValidateAnalyzerRequest, ...grpc.CallOption) error); ok {
|
|
r1 = rf(ctx, in, opts...)
|
|
} else {
|
|
r1 = ret.Error(1)
|
|
}
|
|
|
|
return r0, r1
|
|
}
|
|
|
|
// MockQueryCoordClient_ValidateAnalyzer_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ValidateAnalyzer'
|
|
type MockQueryCoordClient_ValidateAnalyzer_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// ValidateAnalyzer is a helper method to define mock.On call
|
|
// - ctx context.Context
|
|
// - in *querypb.ValidateAnalyzerRequest
|
|
// - opts ...grpc.CallOption
|
|
func (_e *MockQueryCoordClient_Expecter) ValidateAnalyzer(ctx interface{}, in interface{}, opts ...interface{}) *MockQueryCoordClient_ValidateAnalyzer_Call {
|
|
return &MockQueryCoordClient_ValidateAnalyzer_Call{Call: _e.mock.On("ValidateAnalyzer",
|
|
append([]interface{}{ctx, in}, opts...)...)}
|
|
}
|
|
|
|
func (_c *MockQueryCoordClient_ValidateAnalyzer_Call) Run(run func(ctx context.Context, in *querypb.ValidateAnalyzerRequest, opts ...grpc.CallOption)) *MockQueryCoordClient_ValidateAnalyzer_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
variadicArgs := make([]grpc.CallOption, len(args)-2)
|
|
for i, a := range args[2:] {
|
|
if a != nil {
|
|
variadicArgs[i] = a.(grpc.CallOption)
|
|
}
|
|
}
|
|
run(args[0].(context.Context), args[1].(*querypb.ValidateAnalyzerRequest), variadicArgs...)
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *MockQueryCoordClient_ValidateAnalyzer_Call) Return(_a0 *querypb.ValidateAnalyzerResponse, _a1 error) *MockQueryCoordClient_ValidateAnalyzer_Call {
|
|
_c.Call.Return(_a0, _a1)
|
|
return _c
|
|
}
|
|
|
|
func (_c *MockQueryCoordClient_ValidateAnalyzer_Call) RunAndReturn(run func(context.Context, *querypb.ValidateAnalyzerRequest, ...grpc.CallOption) (*querypb.ValidateAnalyzerResponse, error)) *MockQueryCoordClient_ValidateAnalyzer_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// NewMockQueryCoordClient creates a new instance of MockQueryCoordClient. 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 NewMockQueryCoordClient(t interface {
|
|
mock.TestingT
|
|
Cleanup(func())
|
|
}) *MockQueryCoordClient {
|
|
mock := &MockQueryCoordClient{}
|
|
mock.Mock.Test(t)
|
|
|
|
t.Cleanup(func() { mock.AssertExpectations(t) })
|
|
|
|
return mock
|
|
}
|