From 5566a85bcc0446822726bf8c9d9aac947951f387 Mon Sep 17 00:00:00 2001 From: "cai.zhang" Date: Wed, 4 Jun 2025 11:26:32 +0800 Subject: [PATCH] enhance: Add proxy task queue metrics (#42156) issue: #42155 Signed-off-by: Cai Zhang --- Makefile | 9 + internal/coordinator/mix_coord.go | 4 + internal/datacoord/mock_test.go | 4 + .../datacoord/task/global_scheduler_test.go | 4 +- .../distributed/mixcoord/client/client.go | 11 + .../mixcoord/client/client_test.go | 34 + internal/distributed/mixcoord/service.go | 4 + internal/distributed/mixcoord/service_test.go | 9 + internal/distributed/proxy/client/client.go | 6 + .../distributed/proxy/httpserver/constant.go | 1 + .../proxy/httpserver/handler_v2.go | 14 + .../proxy/httpserver/handler_v2_test.go | 29 + .../proxy/httpserver/request_v2.go | 2 + internal/distributed/proxy/service.go | 4 + internal/mocks/mock_datacoord.go | 223 +-- internal/mocks/mock_datacoord_client.go | 226 +-- internal/mocks/mock_mixcoord.go | 59 + internal/mocks/mock_mixcoord_client.go | 74 + internal/mocks/mock_proxy.go | 59 + internal/mocks/mock_proxy_client.go | 74 + internal/mocks/mock_querycoord.go | 322 +--- internal/mocks/mock_querycoord_client.go | 226 +-- internal/mocks/mock_rootcoord.go | 1346 ++++++++--------- internal/mocks/mock_rootcoord_client.go | 78 +- internal/proxy/impl.go | 34 +- internal/proxy/metrics_info.go | 9 +- internal/proxy/metrics_info_test.go | 95 ++ internal/proxy/rootcoord_mock_test.go | 4 + internal/proxy/task.go | 11 + internal/proxy/task_scheduler.go | 114 ++ internal/querycoordv2/server_test.go | 7 - .../querynodev2/delegator/mock_delegator.go | 94 +- internal/rootcoord/quota_center.go | 33 +- internal/rootcoord/quota_center_test.go | 8 + internal/rootcoord/root_coord.go | 4 + internal/util/mock/grpc_rootcoord_client.go | 4 + pkg/proto/internal.proto | 9 + pkg/proto/internalpb/internal.pb.go | 330 ++-- pkg/proto/proxy.proto | 1 + pkg/proto/proxypb/proxy.pb.go | 71 +- pkg/proto/proxypb/proxy_grpc.pb.go | 37 + pkg/proto/root_coord.proto | 2 + pkg/proto/rootcoordpb/root_coord.pb.go | 182 +-- pkg/proto/rootcoordpb/root_coord_grpc.pb.go | 37 + pkg/util/metricsinfo/metrics_info.go | 16 + pkg/util/metricsinfo/quota_metric.go | 12 +- 46 files changed, 2034 insertions(+), 1902 deletions(-) diff --git a/Makefile b/Makefile index 494cce27e6..f56e6d07e3 100644 --- a/Makefile +++ b/Makefile @@ -435,9 +435,18 @@ generate-mockery-types: getdeps $(INSTALL_PATH)/mockery --name=QueryNodeComponent --dir=$(PWD)/internal/types --output=$(PWD)/internal/mocks --filename=mock_querynode.go --with-expecter --structname=MockQueryNode # DataNode $(INSTALL_PATH)/mockery --name=DataNodeComponent --dir=$(PWD)/internal/types --output=$(PWD)/internal/mocks --filename=mock_datanode.go --with-expecter --structname=MockDataNode + # RootCoord + $(INSTALL_PATH)/mockery --name=RootCoordComponent --dir=$(PWD)/internal/types --output=$(PWD)/internal/mocks --filename=mock_rootcoord.go --with-expecter --structname=MockRootCoord + # QueryCoord + $(INSTALL_PATH)/mockery --name=QueryCoordComponent --dir=$(PWD)/internal/types --output=$(PWD)/internal/mocks --filename=mock_querycoord.go --with-expecter --structname=MockQueryCoord + # DataCoord + $(INSTALL_PATH)/mockery --name=DataCoordComponent --dir=$(PWD)/internal/types --output=$(PWD)/internal/mocks --filename=mock_datacoord.go --with-expecter --structname=MockDataCoord # Clients $(INSTALL_PATH)/mockery --name=MixCoordClient --dir=$(PWD)/internal/types --output=$(PWD)/internal/mocks --filename=mock_mixcoord_client.go --with-expecter --structname=MockMixCoordClient + $(INSTALL_PATH)/mockery --name=RootCoordClient --dir=$(PWD)/internal/types --output=$(PWD)/internal/mocks --filename=mock_rootcoord_client.go --with-expecter --structname=MockRootCoordClient + $(INSTALL_PATH)/mockery --name=QueryCoordClient --dir=$(PWD)/internal/types --output=$(PWD)/internal/mocks --filename=mock_querycoord_client.go --with-expecter --structname=MockQueryCoordClient + $(INSTALL_PATH)/mockery --name=DataCoordClient --dir=$(PWD)/internal/types --output=$(PWD)/internal/mocks --filename=mock_datacoord_client.go --with-expecter --structname=MockDataCoordClient $(INSTALL_PATH)/mockery --name=QueryNodeClient --dir=$(PWD)/internal/types --output=$(PWD)/internal/mocks --filename=mock_querynode_client.go --with-expecter --structname=MockQueryNodeClient $(INSTALL_PATH)/mockery --name=DataNodeClient --dir=$(PWD)/internal/types --output=$(PWD)/internal/mocks --filename=mock_datanode_client.go --with-expecter --structname=MockDataNodeClient $(INSTALL_PATH)/mockery --name=ProxyClient --dir=$(PWD)/internal/types --output=$(PWD)/internal/mocks --filename=mock_proxy_client.go --with-expecter --structname=MockProxyClient diff --git a/internal/coordinator/mix_coord.go b/internal/coordinator/mix_coord.go index 3de4b643d7..e6b5078cf2 100644 --- a/internal/coordinator/mix_coord.go +++ b/internal/coordinator/mix_coord.go @@ -1059,3 +1059,7 @@ func (s *mixCoordImpl) NotifyDropPartition(ctx context.Context, channel string, func (s *mixCoordImpl) RegisterStreamingCoordGRPCService(server *grpc.Server) { s.streamingCoord.RegisterGRPCService(server) } + +func (s *mixCoordImpl) GetQuotaMetrics(ctx context.Context, req *internalpb.GetQuotaMetricsRequest) (*internalpb.GetQuotaMetricsResponse, error) { + return s.rootcoordServer.GetQuotaMetrics(ctx, req) +} diff --git a/internal/datacoord/mock_test.go b/internal/datacoord/mock_test.go index 8d85f3234e..7f6f4ac2fa 100644 --- a/internal/datacoord/mock_test.go +++ b/internal/datacoord/mock_test.go @@ -197,6 +197,10 @@ func (m *mockMixCoord) AddCollectionField(ctx context.Context, req *milvuspb.Add panic("implement me") } +func (m *mockMixCoord) GetQuotaMetrics(ctx context.Context, req *internalpb.GetQuotaMetricsRequest) (*internalpb.GetQuotaMetricsResponse, error) { + panic("implement me") +} + func newMockMixCoord() *mockMixCoord { return &mockMixCoord{state: commonpb.StateCode_Healthy} } diff --git a/internal/datacoord/task/global_scheduler_test.go b/internal/datacoord/task/global_scheduler_test.go index 0e3c24a2c5..3b0804e649 100644 --- a/internal/datacoord/task/global_scheduler_test.go +++ b/internal/datacoord/task/global_scheduler_test.go @@ -210,8 +210,8 @@ func TestGlobalScheduler_TestSchedule(t *testing.T) { scheduler.Enqueue(task) assert.Eventually(t, func() bool { s := scheduler.(*globalTaskScheduler) - s.mu.RLock(task.GetTaskID()) - defer s.mu.RUnlock(task.GetTaskID()) + s.mu.RLock(1) + defer s.mu.RUnlock(1) return task.GetTaskState() == taskcommon.Retry && s.runningTasks.Len() == 0 && len(s.pendingTasks.TaskIDs()) == 1 }, 10*time.Second, 10*time.Millisecond) diff --git a/internal/distributed/mixcoord/client/client.go b/internal/distributed/mixcoord/client/client.go index 35a03296bf..8965caf3b5 100644 --- a/internal/distributed/mixcoord/client/client.go +++ b/internal/distributed/mixcoord/client/client.go @@ -1805,3 +1805,14 @@ func (c *Client) UpdateLoadConfig(ctx context.Context, req *querypb.UpdateLoadCo return client.UpdateLoadConfig(ctx, req) }) } + +func (c *Client) GetQuotaMetrics(ctx context.Context, req *internalpb.GetQuotaMetricsRequest, opts ...grpc.CallOption) (*internalpb.GetQuotaMetricsResponse, error) { + req = typeutil.Clone(req) + commonpbutil.UpdateMsgBase( + req.GetBase(), + commonpbutil.FillMsgBaseFromClient(paramtable.GetNodeID(), commonpbutil.WithTargetID(c.grpcClient.GetNodeID())), + ) + return wrapGrpcCall(ctx, c, func(client MixCoordClient) (*internalpb.GetQuotaMetricsResponse, error) { + return client.GetQuotaMetrics(ctx, req) + }) +} diff --git a/internal/distributed/mixcoord/client/client_test.go b/internal/distributed/mixcoord/client/client_test.go index 75bd5e4e15..7e8b836525 100644 --- a/internal/distributed/mixcoord/client/client_test.go +++ b/internal/distributed/mixcoord/client/client_test.go @@ -37,6 +37,7 @@ import ( "github.com/milvus-io/milvus/pkg/v2/log" "github.com/milvus-io/milvus/pkg/v2/proto/datapb" "github.com/milvus-io/milvus/pkg/v2/proto/indexpb" + "github.com/milvus-io/milvus/pkg/v2/proto/internalpb" "github.com/milvus-io/milvus/pkg/v2/util/etcd" "github.com/milvus-io/milvus/pkg/v2/util/merr" "github.com/milvus-io/milvus/pkg/v2/util/paramtable" @@ -2554,3 +2555,36 @@ func Test_GetChannelRecoveryInfo(t *testing.T) { _, err = client.GetChannelRecoveryInfo(ctx, &datapb.GetChannelRecoveryInfoRequest{}) assert.ErrorIs(t, err, context.Canceled) } + +func Test_GetQuotaMetrics(t *testing.T) { + paramtable.Init() + + ctx := context.Background() + client, err := NewClient(ctx) + assert.NoError(t, err) + assert.NotNil(t, client) + defer client.Close() + + mockRC := mocks.NewMockRootCoordClient(t) + mockmix := MixCoordClient{ + RootCoordClient: mockRC, + } + + mockGrpcClient := mocks.NewMockGrpcClient[MixCoordClient](t) + mockGrpcClient.EXPECT().Close().Return(nil) + mockGrpcClient.EXPECT().ReCall(mock1.Anything, mock1.Anything).RunAndReturn(func(ctx context.Context, f func(MixCoordClient) (interface{}, error)) (interface{}, error) { + return f(mockmix) + }) + mockGrpcClient.EXPECT().GetNodeID().Return(1) + client.(*Client).grpcClient = mockGrpcClient + + // test success + mockRC.EXPECT().GetQuotaMetrics(mock1.Anything, mock1.Anything).Return(&internalpb.GetQuotaMetricsResponse{ + Status: merr.Success(), + MetricsInfo: `{"proxy": {"tasks": 100}}`, + }, nil).Once() + resp, err := client.GetQuotaMetrics(ctx, &internalpb.GetQuotaMetricsRequest{}) + assert.Nil(t, err) + assert.Equal(t, commonpb.ErrorCode_Success, resp.GetStatus().GetErrorCode()) + assert.Equal(t, `{"proxy": {"tasks": 100}}`, resp.GetMetricsInfo()) +} diff --git a/internal/distributed/mixcoord/service.go b/internal/distributed/mixcoord/service.go index 006d9e01de..99f418fb48 100644 --- a/internal/distributed/mixcoord/service.go +++ b/internal/distributed/mixcoord/service.go @@ -907,3 +907,7 @@ func (s *Server) ListImports(ctx context.Context, in *internalpb.ListImportsRequ func (s *Server) ListIndexes(ctx context.Context, in *indexpb.ListIndexesRequest) (*indexpb.ListIndexesResponse, error) { return s.mixCoord.ListIndexes(ctx, in) } + +func (s *Server) GetQuotaMetrics(ctx context.Context, req *internalpb.GetQuotaMetricsRequest) (*internalpb.GetQuotaMetricsResponse, error) { + return s.mixCoord.GetQuotaMetrics(ctx, req) +} diff --git a/internal/distributed/mixcoord/service_test.go b/internal/distributed/mixcoord/service_test.go index d7f8ad9799..80160d8b76 100644 --- a/internal/distributed/mixcoord/service_test.go +++ b/internal/distributed/mixcoord/service_test.go @@ -743,4 +743,13 @@ func Test_NewServer(t *testing.T) { assert.NoError(t, err) assert.Equal(t, commonpb.ErrorCode_Success, resp.GetErrorCode()) }) + + t.Run("GetQuotaMetrics", func(t *testing.T) { + req := &internalpb.GetQuotaMetricsRequest{} + mockMixCoord.EXPECT().GetQuotaMetrics(mock.Anything, req).Return(&internalpb.GetQuotaMetricsResponse{Status: merr.Success(), MetricsInfo: `{"proxy": {"tasks": 100}}`}, nil) + resp, err := server.GetQuotaMetrics(ctx, req) + assert.NoError(t, err) + assert.Equal(t, commonpb.ErrorCode_Success, resp.GetStatus().GetErrorCode()) + assert.Equal(t, `{"proxy": {"tasks": 100}}`, resp.GetMetricsInfo()) + }) } diff --git a/internal/distributed/proxy/client/client.go b/internal/distributed/proxy/client/client.go index 80918bb226..5f8a4f064b 100644 --- a/internal/distributed/proxy/client/client.go +++ b/internal/distributed/proxy/client/client.go @@ -240,3 +240,9 @@ func (c *Client) GetSegmentsInfo(ctx context.Context, req *internalpb.GetSegment return client.GetSegmentsInfo(ctx, req) }) } + +func (c *Client) GetQuotaMetrics(ctx context.Context, req *internalpb.GetQuotaMetricsRequest, opts ...grpc.CallOption) (*internalpb.GetQuotaMetricsResponse, error) { + return wrapGrpcCall(ctx, c, func(client proxypb.ProxyClient) (*internalpb.GetQuotaMetricsResponse, error) { + return client.GetQuotaMetrics(ctx, req) + }) +} diff --git a/internal/distributed/proxy/httpserver/constant.go b/internal/distributed/proxy/httpserver/constant.go index 4f556173cb..9501a7ecef 100644 --- a/internal/distributed/proxy/httpserver/constant.go +++ b/internal/distributed/proxy/httpserver/constant.go @@ -36,6 +36,7 @@ const ( CollectionFieldCategory = "/collections/fields/" ResourceGroupCategory = "/resource_groups/" SegmentCategory = "/segments/" + QuotaCenterCategory = "/quotacenter/" ListAction = "list" HasAction = "has" diff --git a/internal/distributed/proxy/httpserver/handler_v2.go b/internal/distributed/proxy/httpserver/handler_v2.go index 55bc25d346..2258920db3 100644 --- a/internal/distributed/proxy/httpserver/handler_v2.go +++ b/internal/distributed/proxy/httpserver/handler_v2.go @@ -205,6 +205,7 @@ func (h *HandlersV2) RegisterRoutesToV2(router gin.IRouter) { // segment group router.POST(SegmentCategory+DescribeAction, timeoutMiddleware(wrapperPost(func() any { return &GetSegmentsInfoReq{} }, wrapperTraceLog(h.getSegmentsInfo)))) + router.POST(QuotaCenterCategory+DescribeAction, timeoutMiddleware(wrapperPost(func() any { return &GetQuotaMetricsReq{} }, wrapperTraceLog(h.getQuotaMetrics)))) } type ( @@ -2688,3 +2689,16 @@ func (h *HandlersV2) getSegmentsInfo(ctx context.Context, c *gin.Context, anyReq } return resp, err } + +func (h *HandlersV2) getQuotaMetrics(ctx context.Context, c *gin.Context, anyReq any, dbName string) (interface{}, error) { + req := &internalpb.GetQuotaMetricsRequest{} + resp, err := wrapperProxy(ctx, c, req, h.checkAuth, false, "/milvus.proto.milvus.MilvusService/GetQuotaMetrics", func(reqCtx context.Context, req any) (interface{}, error) { + return h.proxy.GetQuotaMetrics(reqCtx, req.(*internalpb.GetQuotaMetricsRequest)) + }) + if err == nil { + response := resp.(*internalpb.GetQuotaMetricsResponse) + HTTPReturn(c, http.StatusOK, gin.H{HTTPReturnCode: merr.Code(nil), HTTPReturnData: response.GetMetricsInfo()}) + } + + return resp, err +} diff --git a/internal/distributed/proxy/httpserver/handler_v2_test.go b/internal/distributed/proxy/httpserver/handler_v2_test.go index f72a8cfc72..16efba1aa5 100644 --- a/internal/distributed/proxy/httpserver/handler_v2_test.go +++ b/internal/distributed/proxy/httpserver/handler_v2_test.go @@ -2724,3 +2724,32 @@ func TestSearchV2(t *testing.T) { }) validateTestCases(t, testEngine, queryTestCases, false) } + +func TestGetQuotaMetrics(t *testing.T) { + paramtable.Init() + + mp := mocks.NewMockProxy(t) + mp.EXPECT().GetQuotaMetrics(mock.Anything, mock.Anything).Return(&internalpb.GetQuotaMetricsResponse{ + Status: &StatusSuccess, + MetricsInfo: `{"proxy1": "1000", "proxy2": "2000"}`, + }, nil) + testEngine := initHTTPServerV2(mp, false) + testcase := requestBodyTestCase{ + path: DescribeAction, + requestBody: []byte(`{}`), + } + + bodyReader := bytes.NewReader(testcase.requestBody) + req := httptest.NewRequest(http.MethodPost, versionalV2(QuotaCenterCategory, testcase.path), bodyReader) + w := httptest.NewRecorder() + testEngine.ServeHTTP(w, req) + assert.Equal(t, http.StatusOK, w.Code, "case %d: ", string(testcase.requestBody)) + returnBody := &ReturnErrMsg{} + err := json.Unmarshal(w.Body.Bytes(), returnBody) + assert.Nil(t, err) + assert.Equal(t, testcase.errCode, returnBody.Code, "case: %d, request body: %s ", string(testcase.requestBody)) + if testcase.errCode != 0 { + assert.Contains(t, returnBody.Message, testcase.errMsg, "case: %d, request body: %s", string(testcase.requestBody)) + } + fmt.Println(w.Body.String()) +} diff --git a/internal/distributed/proxy/httpserver/request_v2.go b/internal/distributed/proxy/httpserver/request_v2.go index e6c053e48d..ceb85179ac 100644 --- a/internal/distributed/proxy/httpserver/request_v2.go +++ b/internal/distributed/proxy/httpserver/request_v2.go @@ -692,3 +692,5 @@ func (req *GetSegmentsInfoReq) GetCollectionID() int64 { func (req *GetSegmentsInfoReq) GetSegmentIDs() []int64 { return req.SegmentIDs } + +type GetQuotaMetricsReq struct{} diff --git a/internal/distributed/proxy/service.go b/internal/distributed/proxy/service.go index 6c1d400685..8e943df6b6 100644 --- a/internal/distributed/proxy/service.go +++ b/internal/distributed/proxy/service.go @@ -1124,3 +1124,7 @@ func (s *Server) RunAnalyzer(ctx context.Context, req *milvuspb.RunAnalyzerReque func (s *Server) GetSegmentsInfo(ctx context.Context, req *internalpb.GetSegmentsInfoRequest) (*internalpb.GetSegmentsInfoResponse, error) { return s.proxy.GetSegmentsInfo(ctx, req) } + +func (s *Server) GetQuotaMetrics(ctx context.Context, req *internalpb.GetQuotaMetricsRequest) (*internalpb.GetQuotaMetricsResponse, error) { + return s.proxy.GetQuotaMetrics(ctx, req) +} diff --git a/internal/mocks/mock_datacoord.go b/internal/mocks/mock_datacoord.go index 915d4dfac8..8deeb4aa50 100644 --- a/internal/mocks/mock_datacoord.go +++ b/internal/mocks/mock_datacoord.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.46.0. DO NOT EDIT. +// Code generated by mockery v2.53.3. DO NOT EDIT. package mocks @@ -980,65 +980,6 @@ func (_c *MockDataCoord_GetCompactionStateWithPlans_Call) RunAndReturn(run func( return _c } -// GetComponentStates provides a mock function with given fields: _a0, _a1 -func (_m *MockDataCoord) GetComponentStates(_a0 context.Context, _a1 *milvuspb.GetComponentStatesRequest) (*milvuspb.ComponentStates, error) { - ret := _m.Called(_a0, _a1) - - if len(ret) == 0 { - panic("no return value specified for GetComponentStates") - } - - var r0 *milvuspb.ComponentStates - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.GetComponentStatesRequest) (*milvuspb.ComponentStates, error)); ok { - return rf(_a0, _a1) - } - if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.GetComponentStatesRequest) *milvuspb.ComponentStates); ok { - r0 = rf(_a0, _a1) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*milvuspb.ComponentStates) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, *milvuspb.GetComponentStatesRequest) error); ok { - r1 = rf(_a0, _a1) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockDataCoord_GetComponentStates_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetComponentStates' -type MockDataCoord_GetComponentStates_Call struct { - *mock.Call -} - -// GetComponentStates is a helper method to define mock.On call -// - _a0 context.Context -// - _a1 *milvuspb.GetComponentStatesRequest -func (_e *MockDataCoord_Expecter) GetComponentStates(_a0 interface{}, _a1 interface{}) *MockDataCoord_GetComponentStates_Call { - return &MockDataCoord_GetComponentStates_Call{Call: _e.mock.On("GetComponentStates", _a0, _a1)} -} - -func (_c *MockDataCoord_GetComponentStates_Call) Run(run func(_a0 context.Context, _a1 *milvuspb.GetComponentStatesRequest)) *MockDataCoord_GetComponentStates_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(*milvuspb.GetComponentStatesRequest)) - }) - return _c -} - -func (_c *MockDataCoord_GetComponentStates_Call) Return(_a0 *milvuspb.ComponentStates, _a1 error) *MockDataCoord_GetComponentStates_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockDataCoord_GetComponentStates_Call) RunAndReturn(run func(context.Context, *milvuspb.GetComponentStatesRequest) (*milvuspb.ComponentStates, error)) *MockDataCoord_GetComponentStates_Call { - _c.Call.Return(run) - return _c -} - // GetFlushAllState provides a mock function with given fields: _a0, _a1 func (_m *MockDataCoord) GetFlushAllState(_a0 context.Context, _a1 *milvuspb.GetFlushAllStateRequest) (*milvuspb.GetFlushAllStateResponse, error) { ret := _m.Called(_a0, _a1) @@ -2101,124 +2042,6 @@ func (_c *MockDataCoord_GetSegmentsByStates_Call) RunAndReturn(run func(context. return _c } -// GetStatisticsChannel provides a mock function with given fields: _a0, _a1 -func (_m *MockDataCoord) GetStatisticsChannel(_a0 context.Context, _a1 *internalpb.GetStatisticsChannelRequest) (*milvuspb.StringResponse, error) { - ret := _m.Called(_a0, _a1) - - if len(ret) == 0 { - panic("no return value specified for GetStatisticsChannel") - } - - var r0 *milvuspb.StringResponse - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, *internalpb.GetStatisticsChannelRequest) (*milvuspb.StringResponse, error)); ok { - return rf(_a0, _a1) - } - if rf, ok := ret.Get(0).(func(context.Context, *internalpb.GetStatisticsChannelRequest) *milvuspb.StringResponse); ok { - r0 = rf(_a0, _a1) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*milvuspb.StringResponse) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, *internalpb.GetStatisticsChannelRequest) error); ok { - r1 = rf(_a0, _a1) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockDataCoord_GetStatisticsChannel_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetStatisticsChannel' -type MockDataCoord_GetStatisticsChannel_Call struct { - *mock.Call -} - -// GetStatisticsChannel is a helper method to define mock.On call -// - _a0 context.Context -// - _a1 *internalpb.GetStatisticsChannelRequest -func (_e *MockDataCoord_Expecter) GetStatisticsChannel(_a0 interface{}, _a1 interface{}) *MockDataCoord_GetStatisticsChannel_Call { - return &MockDataCoord_GetStatisticsChannel_Call{Call: _e.mock.On("GetStatisticsChannel", _a0, _a1)} -} - -func (_c *MockDataCoord_GetStatisticsChannel_Call) Run(run func(_a0 context.Context, _a1 *internalpb.GetStatisticsChannelRequest)) *MockDataCoord_GetStatisticsChannel_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(*internalpb.GetStatisticsChannelRequest)) - }) - return _c -} - -func (_c *MockDataCoord_GetStatisticsChannel_Call) Return(_a0 *milvuspb.StringResponse, _a1 error) *MockDataCoord_GetStatisticsChannel_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockDataCoord_GetStatisticsChannel_Call) RunAndReturn(run func(context.Context, *internalpb.GetStatisticsChannelRequest) (*milvuspb.StringResponse, error)) *MockDataCoord_GetStatisticsChannel_Call { - _c.Call.Return(run) - return _c -} - -// GetTimeTickChannel provides a mock function with given fields: _a0, _a1 -func (_m *MockDataCoord) GetTimeTickChannel(_a0 context.Context, _a1 *internalpb.GetTimeTickChannelRequest) (*milvuspb.StringResponse, error) { - ret := _m.Called(_a0, _a1) - - if len(ret) == 0 { - panic("no return value specified for GetTimeTickChannel") - } - - var r0 *milvuspb.StringResponse - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, *internalpb.GetTimeTickChannelRequest) (*milvuspb.StringResponse, error)); ok { - return rf(_a0, _a1) - } - if rf, ok := ret.Get(0).(func(context.Context, *internalpb.GetTimeTickChannelRequest) *milvuspb.StringResponse); ok { - r0 = rf(_a0, _a1) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*milvuspb.StringResponse) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, *internalpb.GetTimeTickChannelRequest) error); ok { - r1 = rf(_a0, _a1) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockDataCoord_GetTimeTickChannel_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetTimeTickChannel' -type MockDataCoord_GetTimeTickChannel_Call struct { - *mock.Call -} - -// GetTimeTickChannel is a helper method to define mock.On call -// - _a0 context.Context -// - _a1 *internalpb.GetTimeTickChannelRequest -func (_e *MockDataCoord_Expecter) GetTimeTickChannel(_a0 interface{}, _a1 interface{}) *MockDataCoord_GetTimeTickChannel_Call { - return &MockDataCoord_GetTimeTickChannel_Call{Call: _e.mock.On("GetTimeTickChannel", _a0, _a1)} -} - -func (_c *MockDataCoord_GetTimeTickChannel_Call) Run(run func(_a0 context.Context, _a1 *internalpb.GetTimeTickChannelRequest)) *MockDataCoord_GetTimeTickChannel_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(*internalpb.GetTimeTickChannelRequest)) - }) - return _c -} - -func (_c *MockDataCoord_GetTimeTickChannel_Call) Return(_a0 *milvuspb.StringResponse, _a1 error) *MockDataCoord_GetTimeTickChannel_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockDataCoord_GetTimeTickChannel_Call) RunAndReturn(run func(context.Context, *internalpb.GetTimeTickChannelRequest) (*milvuspb.StringResponse, error)) *MockDataCoord_GetTimeTickChannel_Call { - _c.Call.Return(run) - return _c -} - // ImportV2 provides a mock function with given fields: _a0, _a1 func (_m *MockDataCoord) ImportV2(_a0 context.Context, _a1 *internalpb.ImportRequestInternal) (*internalpb.ImportResponse, error) { ret := _m.Called(_a0, _a1) @@ -2278,7 +2101,7 @@ func (_c *MockDataCoord_ImportV2_Call) RunAndReturn(run func(context.Context, *i return _c } -// Init provides a mock function with given fields: +// Init provides a mock function with no fields func (_m *MockDataCoord) Init() error { ret := _m.Called() @@ -2559,7 +2382,7 @@ func (_c *MockDataCoord_MarkSegmentsDropped_Call) RunAndReturn(run func(context. return _c } -// Register provides a mock function with given fields: +// Register provides a mock function with no fields func (_m *MockDataCoord) Register() error { ret := _m.Called() @@ -2751,7 +2574,7 @@ func (_c *MockDataCoord_SetAddress_Call) Return() *MockDataCoord_SetAddress_Call } func (_c *MockDataCoord_SetAddress_Call) RunAndReturn(run func(string)) *MockDataCoord_SetAddress_Call { - _c.Call.Return(run) + _c.Run(run) return _c } @@ -2784,7 +2607,7 @@ func (_c *MockDataCoord_SetDataNodeCreator_Call) Return() *MockDataCoord_SetData } func (_c *MockDataCoord_SetDataNodeCreator_Call) RunAndReturn(run func(func(context.Context, string, int64) (types.DataNodeClient, error))) *MockDataCoord_SetDataNodeCreator_Call { - _c.Call.Return(run) + _c.Run(run) return _c } @@ -2817,40 +2640,40 @@ func (_c *MockDataCoord_SetEtcdClient_Call) Return() *MockDataCoord_SetEtcdClien } func (_c *MockDataCoord_SetEtcdClient_Call) RunAndReturn(run func(*clientv3.Client)) *MockDataCoord_SetEtcdClient_Call { - _c.Call.Return(run) + _c.Run(run) return _c } -// SetRootCoordClient provides a mock function with given fields: rootCoord -func (_m *MockDataCoord) SetRootCoordClient(rootCoord types.RootCoordClient) { - _m.Called(rootCoord) +// SetMixCoord provides a mock function with given fields: mixCoord +func (_m *MockDataCoord) SetMixCoord(mixCoord types.MixCoord) { + _m.Called(mixCoord) } -// MockDataCoord_SetRootCoordClient_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetRootCoordClient' -type MockDataCoord_SetRootCoordClient_Call struct { +// MockDataCoord_SetMixCoord_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetMixCoord' +type MockDataCoord_SetMixCoord_Call struct { *mock.Call } -// SetRootCoordClient is a helper method to define mock.On call -// - rootCoord types.RootCoordClient -func (_e *MockDataCoord_Expecter) SetRootCoordClient(rootCoord interface{}) *MockDataCoord_SetRootCoordClient_Call { - return &MockDataCoord_SetRootCoordClient_Call{Call: _e.mock.On("SetRootCoordClient", rootCoord)} +// SetMixCoord is a helper method to define mock.On call +// - mixCoord types.MixCoord +func (_e *MockDataCoord_Expecter) SetMixCoord(mixCoord interface{}) *MockDataCoord_SetMixCoord_Call { + return &MockDataCoord_SetMixCoord_Call{Call: _e.mock.On("SetMixCoord", mixCoord)} } -func (_c *MockDataCoord_SetRootCoordClient_Call) Run(run func(rootCoord types.RootCoordClient)) *MockDataCoord_SetRootCoordClient_Call { +func (_c *MockDataCoord_SetMixCoord_Call) Run(run func(mixCoord types.MixCoord)) *MockDataCoord_SetMixCoord_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(types.RootCoordClient)) + run(args[0].(types.MixCoord)) }) return _c } -func (_c *MockDataCoord_SetRootCoordClient_Call) Return() *MockDataCoord_SetRootCoordClient_Call { +func (_c *MockDataCoord_SetMixCoord_Call) Return() *MockDataCoord_SetMixCoord_Call { _c.Call.Return() return _c } -func (_c *MockDataCoord_SetRootCoordClient_Call) RunAndReturn(run func(types.RootCoordClient)) *MockDataCoord_SetRootCoordClient_Call { - _c.Call.Return(run) +func (_c *MockDataCoord_SetMixCoord_Call) RunAndReturn(run func(types.MixCoord)) *MockDataCoord_SetMixCoord_Call { + _c.Run(run) return _c } @@ -2942,7 +2765,7 @@ func (_c *MockDataCoord_SetTiKVClient_Call) Return() *MockDataCoord_SetTiKVClien } func (_c *MockDataCoord_SetTiKVClient_Call) RunAndReturn(run func(*txnkv.Client)) *MockDataCoord_SetTiKVClient_Call { - _c.Call.Return(run) + _c.Run(run) return _c } @@ -3005,7 +2828,7 @@ func (_c *MockDataCoord_ShowConfigurations_Call) RunAndReturn(run func(context.C return _c } -// Start provides a mock function with given fields: +// Start provides a mock function with no fields func (_m *MockDataCoord) Start() error { ret := _m.Called() @@ -3050,7 +2873,7 @@ func (_c *MockDataCoord_Start_Call) RunAndReturn(run func() error) *MockDataCoor return _c } -// Stop provides a mock function with given fields: +// Stop provides a mock function with no fields func (_m *MockDataCoord) Stop() error { ret := _m.Called() diff --git a/internal/mocks/mock_datacoord_client.go b/internal/mocks/mock_datacoord_client.go index 15197837a2..ab381a2cea 100644 --- a/internal/mocks/mock_datacoord_client.go +++ b/internal/mocks/mock_datacoord_client.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.46.0. DO NOT EDIT. +// Code generated by mockery v2.53.3. DO NOT EDIT. package mocks @@ -403,7 +403,7 @@ func (_c *MockDataCoordClient_CheckHealth_Call) RunAndReturn(run func(context.Co return _c } -// Close provides a mock function with given fields: +// Close provides a mock function with no fields func (_m *MockDataCoordClient) Close() error { ret := _m.Called() @@ -1262,80 +1262,6 @@ func (_c *MockDataCoordClient_GetCompactionStateWithPlans_Call) RunAndReturn(run return _c } -// GetComponentStates provides a mock function with given fields: ctx, in, opts -func (_m *MockDataCoordClient) GetComponentStates(ctx context.Context, in *milvuspb.GetComponentStatesRequest, opts ...grpc.CallOption) (*milvuspb.ComponentStates, 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 GetComponentStates") - } - - var r0 *milvuspb.ComponentStates - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.GetComponentStatesRequest, ...grpc.CallOption) (*milvuspb.ComponentStates, error)); ok { - return rf(ctx, in, opts...) - } - if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.GetComponentStatesRequest, ...grpc.CallOption) *milvuspb.ComponentStates); ok { - r0 = rf(ctx, in, opts...) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*milvuspb.ComponentStates) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, *milvuspb.GetComponentStatesRequest, ...grpc.CallOption) error); ok { - r1 = rf(ctx, in, opts...) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockDataCoordClient_GetComponentStates_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetComponentStates' -type MockDataCoordClient_GetComponentStates_Call struct { - *mock.Call -} - -// GetComponentStates is a helper method to define mock.On call -// - ctx context.Context -// - in *milvuspb.GetComponentStatesRequest -// - opts ...grpc.CallOption -func (_e *MockDataCoordClient_Expecter) GetComponentStates(ctx interface{}, in interface{}, opts ...interface{}) *MockDataCoordClient_GetComponentStates_Call { - return &MockDataCoordClient_GetComponentStates_Call{Call: _e.mock.On("GetComponentStates", - append([]interface{}{ctx, in}, opts...)...)} -} - -func (_c *MockDataCoordClient_GetComponentStates_Call) Run(run func(ctx context.Context, in *milvuspb.GetComponentStatesRequest, opts ...grpc.CallOption)) *MockDataCoordClient_GetComponentStates_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.GetComponentStatesRequest), variadicArgs...) - }) - return _c -} - -func (_c *MockDataCoordClient_GetComponentStates_Call) Return(_a0 *milvuspb.ComponentStates, _a1 error) *MockDataCoordClient_GetComponentStates_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockDataCoordClient_GetComponentStates_Call) RunAndReturn(run func(context.Context, *milvuspb.GetComponentStatesRequest, ...grpc.CallOption) (*milvuspb.ComponentStates, error)) *MockDataCoordClient_GetComponentStates_Call { - _c.Call.Return(run) - return _c -} - // GetFlushAllState provides a mock function with given fields: ctx, in, opts func (_m *MockDataCoordClient) GetFlushAllState(ctx context.Context, in *milvuspb.GetFlushAllStateRequest, opts ...grpc.CallOption) (*milvuspb.GetFlushAllStateResponse, error) { _va := make([]interface{}, len(opts)) @@ -2668,154 +2594,6 @@ func (_c *MockDataCoordClient_GetSegmentsByStates_Call) RunAndReturn(run func(co return _c } -// GetStatisticsChannel provides a mock function with given fields: ctx, in, opts -func (_m *MockDataCoordClient) GetStatisticsChannel(ctx context.Context, in *internalpb.GetStatisticsChannelRequest, opts ...grpc.CallOption) (*milvuspb.StringResponse, 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 GetStatisticsChannel") - } - - var r0 *milvuspb.StringResponse - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, *internalpb.GetStatisticsChannelRequest, ...grpc.CallOption) (*milvuspb.StringResponse, error)); ok { - return rf(ctx, in, opts...) - } - if rf, ok := ret.Get(0).(func(context.Context, *internalpb.GetStatisticsChannelRequest, ...grpc.CallOption) *milvuspb.StringResponse); ok { - r0 = rf(ctx, in, opts...) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*milvuspb.StringResponse) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, *internalpb.GetStatisticsChannelRequest, ...grpc.CallOption) error); ok { - r1 = rf(ctx, in, opts...) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockDataCoordClient_GetStatisticsChannel_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetStatisticsChannel' -type MockDataCoordClient_GetStatisticsChannel_Call struct { - *mock.Call -} - -// GetStatisticsChannel is a helper method to define mock.On call -// - ctx context.Context -// - in *internalpb.GetStatisticsChannelRequest -// - opts ...grpc.CallOption -func (_e *MockDataCoordClient_Expecter) GetStatisticsChannel(ctx interface{}, in interface{}, opts ...interface{}) *MockDataCoordClient_GetStatisticsChannel_Call { - return &MockDataCoordClient_GetStatisticsChannel_Call{Call: _e.mock.On("GetStatisticsChannel", - append([]interface{}{ctx, in}, opts...)...)} -} - -func (_c *MockDataCoordClient_GetStatisticsChannel_Call) Run(run func(ctx context.Context, in *internalpb.GetStatisticsChannelRequest, opts ...grpc.CallOption)) *MockDataCoordClient_GetStatisticsChannel_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.GetStatisticsChannelRequest), variadicArgs...) - }) - return _c -} - -func (_c *MockDataCoordClient_GetStatisticsChannel_Call) Return(_a0 *milvuspb.StringResponse, _a1 error) *MockDataCoordClient_GetStatisticsChannel_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockDataCoordClient_GetStatisticsChannel_Call) RunAndReturn(run func(context.Context, *internalpb.GetStatisticsChannelRequest, ...grpc.CallOption) (*milvuspb.StringResponse, error)) *MockDataCoordClient_GetStatisticsChannel_Call { - _c.Call.Return(run) - return _c -} - -// GetTimeTickChannel provides a mock function with given fields: ctx, in, opts -func (_m *MockDataCoordClient) GetTimeTickChannel(ctx context.Context, in *internalpb.GetTimeTickChannelRequest, opts ...grpc.CallOption) (*milvuspb.StringResponse, 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 GetTimeTickChannel") - } - - var r0 *milvuspb.StringResponse - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, *internalpb.GetTimeTickChannelRequest, ...grpc.CallOption) (*milvuspb.StringResponse, error)); ok { - return rf(ctx, in, opts...) - } - if rf, ok := ret.Get(0).(func(context.Context, *internalpb.GetTimeTickChannelRequest, ...grpc.CallOption) *milvuspb.StringResponse); ok { - r0 = rf(ctx, in, opts...) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*milvuspb.StringResponse) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, *internalpb.GetTimeTickChannelRequest, ...grpc.CallOption) error); ok { - r1 = rf(ctx, in, opts...) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockDataCoordClient_GetTimeTickChannel_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetTimeTickChannel' -type MockDataCoordClient_GetTimeTickChannel_Call struct { - *mock.Call -} - -// GetTimeTickChannel is a helper method to define mock.On call -// - ctx context.Context -// - in *internalpb.GetTimeTickChannelRequest -// - opts ...grpc.CallOption -func (_e *MockDataCoordClient_Expecter) GetTimeTickChannel(ctx interface{}, in interface{}, opts ...interface{}) *MockDataCoordClient_GetTimeTickChannel_Call { - return &MockDataCoordClient_GetTimeTickChannel_Call{Call: _e.mock.On("GetTimeTickChannel", - append([]interface{}{ctx, in}, opts...)...)} -} - -func (_c *MockDataCoordClient_GetTimeTickChannel_Call) Run(run func(ctx context.Context, in *internalpb.GetTimeTickChannelRequest, opts ...grpc.CallOption)) *MockDataCoordClient_GetTimeTickChannel_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.GetTimeTickChannelRequest), variadicArgs...) - }) - return _c -} - -func (_c *MockDataCoordClient_GetTimeTickChannel_Call) Return(_a0 *milvuspb.StringResponse, _a1 error) *MockDataCoordClient_GetTimeTickChannel_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockDataCoordClient_GetTimeTickChannel_Call) RunAndReturn(run func(context.Context, *internalpb.GetTimeTickChannelRequest, ...grpc.CallOption) (*milvuspb.StringResponse, error)) *MockDataCoordClient_GetTimeTickChannel_Call { - _c.Call.Return(run) - return _c -} - // ImportV2 provides a mock function with given fields: ctx, in, opts func (_m *MockDataCoordClient) ImportV2(ctx context.Context, in *internalpb.ImportRequestInternal, opts ...grpc.CallOption) (*internalpb.ImportResponse, error) { _va := make([]interface{}, len(opts)) diff --git a/internal/mocks/mock_mixcoord.go b/internal/mocks/mock_mixcoord.go index af9787d7d0..4204658b54 100644 --- a/internal/mocks/mock_mixcoord.go +++ b/internal/mocks/mock_mixcoord.go @@ -4056,6 +4056,65 @@ func (_c *MixCoord_GetQueryNodeDistribution_Call) RunAndReturn(run func(context. return _c } +// GetQuotaMetrics provides a mock function with given fields: _a0, _a1 +func (_m *MixCoord) GetQuotaMetrics(_a0 context.Context, _a1 *internalpb.GetQuotaMetricsRequest) (*internalpb.GetQuotaMetricsResponse, error) { + ret := _m.Called(_a0, _a1) + + if len(ret) == 0 { + panic("no return value specified for GetQuotaMetrics") + } + + var r0 *internalpb.GetQuotaMetricsResponse + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, *internalpb.GetQuotaMetricsRequest) (*internalpb.GetQuotaMetricsResponse, error)); ok { + return rf(_a0, _a1) + } + if rf, ok := ret.Get(0).(func(context.Context, *internalpb.GetQuotaMetricsRequest) *internalpb.GetQuotaMetricsResponse); ok { + r0 = rf(_a0, _a1) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*internalpb.GetQuotaMetricsResponse) + } + } + + if rf, ok := ret.Get(1).(func(context.Context, *internalpb.GetQuotaMetricsRequest) error); ok { + r1 = rf(_a0, _a1) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// MixCoord_GetQuotaMetrics_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetQuotaMetrics' +type MixCoord_GetQuotaMetrics_Call struct { + *mock.Call +} + +// GetQuotaMetrics is a helper method to define mock.On call +// - _a0 context.Context +// - _a1 *internalpb.GetQuotaMetricsRequest +func (_e *MixCoord_Expecter) GetQuotaMetrics(_a0 interface{}, _a1 interface{}) *MixCoord_GetQuotaMetrics_Call { + return &MixCoord_GetQuotaMetrics_Call{Call: _e.mock.On("GetQuotaMetrics", _a0, _a1)} +} + +func (_c *MixCoord_GetQuotaMetrics_Call) Run(run func(_a0 context.Context, _a1 *internalpb.GetQuotaMetricsRequest)) *MixCoord_GetQuotaMetrics_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(*internalpb.GetQuotaMetricsRequest)) + }) + return _c +} + +func (_c *MixCoord_GetQuotaMetrics_Call) Return(_a0 *internalpb.GetQuotaMetricsResponse, _a1 error) *MixCoord_GetQuotaMetrics_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *MixCoord_GetQuotaMetrics_Call) RunAndReturn(run func(context.Context, *internalpb.GetQuotaMetricsRequest) (*internalpb.GetQuotaMetricsResponse, error)) *MixCoord_GetQuotaMetrics_Call { + _c.Call.Return(run) + return _c +} + // GetRecoveryInfo provides a mock function with given fields: _a0, _a1 func (_m *MixCoord) GetRecoveryInfo(_a0 context.Context, _a1 *datapb.GetRecoveryInfoRequest) (*datapb.GetRecoveryInfoResponse, error) { ret := _m.Called(_a0, _a1) diff --git a/internal/mocks/mock_mixcoord_client.go b/internal/mocks/mock_mixcoord_client.go index 95c41e66c8..69c822f1ed 100644 --- a/internal/mocks/mock_mixcoord_client.go +++ b/internal/mocks/mock_mixcoord_client.go @@ -4968,6 +4968,80 @@ func (_c *MockMixCoordClient_GetQueryNodeDistribution_Call) RunAndReturn(run fun return _c } +// GetQuotaMetrics provides a mock function with given fields: ctx, in, opts +func (_m *MockMixCoordClient) GetQuotaMetrics(ctx context.Context, in *internalpb.GetQuotaMetricsRequest, opts ...grpc.CallOption) (*internalpb.GetQuotaMetricsResponse, 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 GetQuotaMetrics") + } + + var r0 *internalpb.GetQuotaMetricsResponse + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, *internalpb.GetQuotaMetricsRequest, ...grpc.CallOption) (*internalpb.GetQuotaMetricsResponse, error)); ok { + return rf(ctx, in, opts...) + } + if rf, ok := ret.Get(0).(func(context.Context, *internalpb.GetQuotaMetricsRequest, ...grpc.CallOption) *internalpb.GetQuotaMetricsResponse); ok { + r0 = rf(ctx, in, opts...) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*internalpb.GetQuotaMetricsResponse) + } + } + + if rf, ok := ret.Get(1).(func(context.Context, *internalpb.GetQuotaMetricsRequest, ...grpc.CallOption) error); ok { + r1 = rf(ctx, in, opts...) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// MockMixCoordClient_GetQuotaMetrics_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetQuotaMetrics' +type MockMixCoordClient_GetQuotaMetrics_Call struct { + *mock.Call +} + +// GetQuotaMetrics is a helper method to define mock.On call +// - ctx context.Context +// - in *internalpb.GetQuotaMetricsRequest +// - opts ...grpc.CallOption +func (_e *MockMixCoordClient_Expecter) GetQuotaMetrics(ctx interface{}, in interface{}, opts ...interface{}) *MockMixCoordClient_GetQuotaMetrics_Call { + return &MockMixCoordClient_GetQuotaMetrics_Call{Call: _e.mock.On("GetQuotaMetrics", + append([]interface{}{ctx, in}, opts...)...)} +} + +func (_c *MockMixCoordClient_GetQuotaMetrics_Call) Run(run func(ctx context.Context, in *internalpb.GetQuotaMetricsRequest, opts ...grpc.CallOption)) *MockMixCoordClient_GetQuotaMetrics_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.GetQuotaMetricsRequest), variadicArgs...) + }) + return _c +} + +func (_c *MockMixCoordClient_GetQuotaMetrics_Call) Return(_a0 *internalpb.GetQuotaMetricsResponse, _a1 error) *MockMixCoordClient_GetQuotaMetrics_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *MockMixCoordClient_GetQuotaMetrics_Call) RunAndReturn(run func(context.Context, *internalpb.GetQuotaMetricsRequest, ...grpc.CallOption) (*internalpb.GetQuotaMetricsResponse, error)) *MockMixCoordClient_GetQuotaMetrics_Call { + _c.Call.Return(run) + return _c +} + // GetRecoveryInfo provides a mock function with given fields: ctx, in, opts func (_m *MockMixCoordClient) GetRecoveryInfo(ctx context.Context, in *datapb.GetRecoveryInfoRequest, opts ...grpc.CallOption) (*datapb.GetRecoveryInfoResponse, error) { _va := make([]interface{}, len(opts)) diff --git a/internal/mocks/mock_proxy.go b/internal/mocks/mock_proxy.go index de29768ff6..f2371c23ec 100644 --- a/internal/mocks/mock_proxy.go +++ b/internal/mocks/mock_proxy.go @@ -3501,6 +3501,65 @@ func (_c *MockProxy_GetQuerySegmentInfo_Call) RunAndReturn(run func(context.Cont return _c } +// GetQuotaMetrics provides a mock function with given fields: _a0, _a1 +func (_m *MockProxy) GetQuotaMetrics(_a0 context.Context, _a1 *internalpb.GetQuotaMetricsRequest) (*internalpb.GetQuotaMetricsResponse, error) { + ret := _m.Called(_a0, _a1) + + if len(ret) == 0 { + panic("no return value specified for GetQuotaMetrics") + } + + var r0 *internalpb.GetQuotaMetricsResponse + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, *internalpb.GetQuotaMetricsRequest) (*internalpb.GetQuotaMetricsResponse, error)); ok { + return rf(_a0, _a1) + } + if rf, ok := ret.Get(0).(func(context.Context, *internalpb.GetQuotaMetricsRequest) *internalpb.GetQuotaMetricsResponse); ok { + r0 = rf(_a0, _a1) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*internalpb.GetQuotaMetricsResponse) + } + } + + if rf, ok := ret.Get(1).(func(context.Context, *internalpb.GetQuotaMetricsRequest) error); ok { + r1 = rf(_a0, _a1) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// MockProxy_GetQuotaMetrics_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetQuotaMetrics' +type MockProxy_GetQuotaMetrics_Call struct { + *mock.Call +} + +// GetQuotaMetrics is a helper method to define mock.On call +// - _a0 context.Context +// - _a1 *internalpb.GetQuotaMetricsRequest +func (_e *MockProxy_Expecter) GetQuotaMetrics(_a0 interface{}, _a1 interface{}) *MockProxy_GetQuotaMetrics_Call { + return &MockProxy_GetQuotaMetrics_Call{Call: _e.mock.On("GetQuotaMetrics", _a0, _a1)} +} + +func (_c *MockProxy_GetQuotaMetrics_Call) Run(run func(_a0 context.Context, _a1 *internalpb.GetQuotaMetricsRequest)) *MockProxy_GetQuotaMetrics_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(*internalpb.GetQuotaMetricsRequest)) + }) + return _c +} + +func (_c *MockProxy_GetQuotaMetrics_Call) Return(_a0 *internalpb.GetQuotaMetricsResponse, _a1 error) *MockProxy_GetQuotaMetrics_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *MockProxy_GetQuotaMetrics_Call) RunAndReturn(run func(context.Context, *internalpb.GetQuotaMetricsRequest) (*internalpb.GetQuotaMetricsResponse, error)) *MockProxy_GetQuotaMetrics_Call { + _c.Call.Return(run) + return _c +} + // GetRateLimiter provides a mock function with no fields func (_m *MockProxy) GetRateLimiter() (types.Limiter, error) { ret := _m.Called() diff --git a/internal/mocks/mock_proxy_client.go b/internal/mocks/mock_proxy_client.go index 4b13afe1bd..978339f119 100644 --- a/internal/mocks/mock_proxy_client.go +++ b/internal/mocks/mock_proxy_client.go @@ -372,6 +372,80 @@ func (_c *MockProxyClient_GetProxyMetrics_Call) RunAndReturn(run func(context.Co return _c } +// GetQuotaMetrics provides a mock function with given fields: ctx, in, opts +func (_m *MockProxyClient) GetQuotaMetrics(ctx context.Context, in *internalpb.GetQuotaMetricsRequest, opts ...grpc.CallOption) (*internalpb.GetQuotaMetricsResponse, 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 GetQuotaMetrics") + } + + var r0 *internalpb.GetQuotaMetricsResponse + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, *internalpb.GetQuotaMetricsRequest, ...grpc.CallOption) (*internalpb.GetQuotaMetricsResponse, error)); ok { + return rf(ctx, in, opts...) + } + if rf, ok := ret.Get(0).(func(context.Context, *internalpb.GetQuotaMetricsRequest, ...grpc.CallOption) *internalpb.GetQuotaMetricsResponse); ok { + r0 = rf(ctx, in, opts...) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*internalpb.GetQuotaMetricsResponse) + } + } + + if rf, ok := ret.Get(1).(func(context.Context, *internalpb.GetQuotaMetricsRequest, ...grpc.CallOption) error); ok { + r1 = rf(ctx, in, opts...) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// MockProxyClient_GetQuotaMetrics_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetQuotaMetrics' +type MockProxyClient_GetQuotaMetrics_Call struct { + *mock.Call +} + +// GetQuotaMetrics is a helper method to define mock.On call +// - ctx context.Context +// - in *internalpb.GetQuotaMetricsRequest +// - opts ...grpc.CallOption +func (_e *MockProxyClient_Expecter) GetQuotaMetrics(ctx interface{}, in interface{}, opts ...interface{}) *MockProxyClient_GetQuotaMetrics_Call { + return &MockProxyClient_GetQuotaMetrics_Call{Call: _e.mock.On("GetQuotaMetrics", + append([]interface{}{ctx, in}, opts...)...)} +} + +func (_c *MockProxyClient_GetQuotaMetrics_Call) Run(run func(ctx context.Context, in *internalpb.GetQuotaMetricsRequest, opts ...grpc.CallOption)) *MockProxyClient_GetQuotaMetrics_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.GetQuotaMetricsRequest), variadicArgs...) + }) + return _c +} + +func (_c *MockProxyClient_GetQuotaMetrics_Call) Return(_a0 *internalpb.GetQuotaMetricsResponse, _a1 error) *MockProxyClient_GetQuotaMetrics_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *MockProxyClient_GetQuotaMetrics_Call) RunAndReturn(run func(context.Context, *internalpb.GetQuotaMetricsRequest, ...grpc.CallOption) (*internalpb.GetQuotaMetricsResponse, error)) *MockProxyClient_GetQuotaMetrics_Call { + _c.Call.Return(run) + return _c +} + // GetSegmentsInfo provides a mock function with given fields: ctx, in, opts func (_m *MockProxyClient) GetSegmentsInfo(ctx context.Context, in *internalpb.GetSegmentsInfoRequest, opts ...grpc.CallOption) (*internalpb.GetSegmentsInfoResponse, error) { _va := make([]interface{}, len(opts)) diff --git a/internal/mocks/mock_querycoord.go b/internal/mocks/mock_querycoord.go index ddc159db45..01104ed75f 100644 --- a/internal/mocks/mock_querycoord.go +++ b/internal/mocks/mock_querycoord.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.46.0. DO NOT EDIT. +// Code generated by mockery v2.53.3. DO NOT EDIT. package mocks @@ -506,65 +506,6 @@ func (_c *MockQueryCoord_DropResourceGroup_Call) RunAndReturn(run func(context.C return _c } -// GetComponentStates provides a mock function with given fields: _a0, _a1 -func (_m *MockQueryCoord) GetComponentStates(_a0 context.Context, _a1 *milvuspb.GetComponentStatesRequest) (*milvuspb.ComponentStates, error) { - ret := _m.Called(_a0, _a1) - - if len(ret) == 0 { - panic("no return value specified for GetComponentStates") - } - - var r0 *milvuspb.ComponentStates - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.GetComponentStatesRequest) (*milvuspb.ComponentStates, error)); ok { - return rf(_a0, _a1) - } - if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.GetComponentStatesRequest) *milvuspb.ComponentStates); ok { - r0 = rf(_a0, _a1) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*milvuspb.ComponentStates) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, *milvuspb.GetComponentStatesRequest) error); ok { - r1 = rf(_a0, _a1) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockQueryCoord_GetComponentStates_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetComponentStates' -type MockQueryCoord_GetComponentStates_Call struct { - *mock.Call -} - -// GetComponentStates is a helper method to define mock.On call -// - _a0 context.Context -// - _a1 *milvuspb.GetComponentStatesRequest -func (_e *MockQueryCoord_Expecter) GetComponentStates(_a0 interface{}, _a1 interface{}) *MockQueryCoord_GetComponentStates_Call { - return &MockQueryCoord_GetComponentStates_Call{Call: _e.mock.On("GetComponentStates", _a0, _a1)} -} - -func (_c *MockQueryCoord_GetComponentStates_Call) Run(run func(_a0 context.Context, _a1 *milvuspb.GetComponentStatesRequest)) *MockQueryCoord_GetComponentStates_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(*milvuspb.GetComponentStatesRequest)) - }) - return _c -} - -func (_c *MockQueryCoord_GetComponentStates_Call) Return(_a0 *milvuspb.ComponentStates, _a1 error) *MockQueryCoord_GetComponentStates_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockQueryCoord_GetComponentStates_Call) RunAndReturn(run func(context.Context, *milvuspb.GetComponentStatesRequest) (*milvuspb.ComponentStates, error)) *MockQueryCoord_GetComponentStates_Call { - _c.Call.Return(run) - return _c -} - // GetLoadSegmentInfo provides a mock function with given fields: _a0, _a1 func (_m *MockQueryCoord) GetLoadSegmentInfo(_a0 context.Context, _a1 *querypb.GetSegmentInfoRequest) (*querypb.GetSegmentInfoResponse, error) { ret := _m.Called(_a0, _a1) @@ -919,125 +860,7 @@ func (_c *MockQueryCoord_GetShardLeaders_Call) RunAndReturn(run func(context.Con return _c } -// GetStatisticsChannel provides a mock function with given fields: _a0, _a1 -func (_m *MockQueryCoord) GetStatisticsChannel(_a0 context.Context, _a1 *internalpb.GetStatisticsChannelRequest) (*milvuspb.StringResponse, error) { - ret := _m.Called(_a0, _a1) - - if len(ret) == 0 { - panic("no return value specified for GetStatisticsChannel") - } - - var r0 *milvuspb.StringResponse - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, *internalpb.GetStatisticsChannelRequest) (*milvuspb.StringResponse, error)); ok { - return rf(_a0, _a1) - } - if rf, ok := ret.Get(0).(func(context.Context, *internalpb.GetStatisticsChannelRequest) *milvuspb.StringResponse); ok { - r0 = rf(_a0, _a1) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*milvuspb.StringResponse) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, *internalpb.GetStatisticsChannelRequest) error); ok { - r1 = rf(_a0, _a1) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockQueryCoord_GetStatisticsChannel_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetStatisticsChannel' -type MockQueryCoord_GetStatisticsChannel_Call struct { - *mock.Call -} - -// GetStatisticsChannel is a helper method to define mock.On call -// - _a0 context.Context -// - _a1 *internalpb.GetStatisticsChannelRequest -func (_e *MockQueryCoord_Expecter) GetStatisticsChannel(_a0 interface{}, _a1 interface{}) *MockQueryCoord_GetStatisticsChannel_Call { - return &MockQueryCoord_GetStatisticsChannel_Call{Call: _e.mock.On("GetStatisticsChannel", _a0, _a1)} -} - -func (_c *MockQueryCoord_GetStatisticsChannel_Call) Run(run func(_a0 context.Context, _a1 *internalpb.GetStatisticsChannelRequest)) *MockQueryCoord_GetStatisticsChannel_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(*internalpb.GetStatisticsChannelRequest)) - }) - return _c -} - -func (_c *MockQueryCoord_GetStatisticsChannel_Call) Return(_a0 *milvuspb.StringResponse, _a1 error) *MockQueryCoord_GetStatisticsChannel_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockQueryCoord_GetStatisticsChannel_Call) RunAndReturn(run func(context.Context, *internalpb.GetStatisticsChannelRequest) (*milvuspb.StringResponse, error)) *MockQueryCoord_GetStatisticsChannel_Call { - _c.Call.Return(run) - return _c -} - -// GetTimeTickChannel provides a mock function with given fields: _a0, _a1 -func (_m *MockQueryCoord) GetTimeTickChannel(_a0 context.Context, _a1 *internalpb.GetTimeTickChannelRequest) (*milvuspb.StringResponse, error) { - ret := _m.Called(_a0, _a1) - - if len(ret) == 0 { - panic("no return value specified for GetTimeTickChannel") - } - - var r0 *milvuspb.StringResponse - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, *internalpb.GetTimeTickChannelRequest) (*milvuspb.StringResponse, error)); ok { - return rf(_a0, _a1) - } - if rf, ok := ret.Get(0).(func(context.Context, *internalpb.GetTimeTickChannelRequest) *milvuspb.StringResponse); ok { - r0 = rf(_a0, _a1) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*milvuspb.StringResponse) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, *internalpb.GetTimeTickChannelRequest) error); ok { - r1 = rf(_a0, _a1) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockQueryCoord_GetTimeTickChannel_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetTimeTickChannel' -type MockQueryCoord_GetTimeTickChannel_Call struct { - *mock.Call -} - -// GetTimeTickChannel is a helper method to define mock.On call -// - _a0 context.Context -// - _a1 *internalpb.GetTimeTickChannelRequest -func (_e *MockQueryCoord_Expecter) GetTimeTickChannel(_a0 interface{}, _a1 interface{}) *MockQueryCoord_GetTimeTickChannel_Call { - return &MockQueryCoord_GetTimeTickChannel_Call{Call: _e.mock.On("GetTimeTickChannel", _a0, _a1)} -} - -func (_c *MockQueryCoord_GetTimeTickChannel_Call) Run(run func(_a0 context.Context, _a1 *internalpb.GetTimeTickChannelRequest)) *MockQueryCoord_GetTimeTickChannel_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(*internalpb.GetTimeTickChannelRequest)) - }) - return _c -} - -func (_c *MockQueryCoord_GetTimeTickChannel_Call) Return(_a0 *milvuspb.StringResponse, _a1 error) *MockQueryCoord_GetTimeTickChannel_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockQueryCoord_GetTimeTickChannel_Call) RunAndReturn(run func(context.Context, *internalpb.GetTimeTickChannelRequest) (*milvuspb.StringResponse, error)) *MockQueryCoord_GetTimeTickChannel_Call { - _c.Call.Return(run) - return _c -} - -// Init provides a mock function with given fields: +// Init provides a mock function with no fields func (_m *MockQueryCoord) Init() error { ret := _m.Called() @@ -1436,7 +1259,7 @@ func (_c *MockQueryCoord_LoadPartitions_Call) RunAndReturn(run func(context.Cont return _c } -// Register provides a mock function with given fields: +// Register provides a mock function with no fields func (_m *MockQueryCoord) Register() error { ret := _m.Called() @@ -1746,53 +1569,7 @@ func (_c *MockQueryCoord_SetAddress_Call) Return() *MockQueryCoord_SetAddress_Ca } func (_c *MockQueryCoord_SetAddress_Call) RunAndReturn(run func(string)) *MockQueryCoord_SetAddress_Call { - _c.Call.Return(run) - return _c -} - -// SetDataCoordClient provides a mock function with given fields: dataCoord -func (_m *MockQueryCoord) SetDataCoordClient(dataCoord types.DataCoordClient) error { - ret := _m.Called(dataCoord) - - if len(ret) == 0 { - panic("no return value specified for SetDataCoordClient") - } - - var r0 error - if rf, ok := ret.Get(0).(func(types.DataCoordClient) error); ok { - r0 = rf(dataCoord) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockQueryCoord_SetDataCoordClient_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetDataCoordClient' -type MockQueryCoord_SetDataCoordClient_Call struct { - *mock.Call -} - -// SetDataCoordClient is a helper method to define mock.On call -// - dataCoord types.DataCoordClient -func (_e *MockQueryCoord_Expecter) SetDataCoordClient(dataCoord interface{}) *MockQueryCoord_SetDataCoordClient_Call { - return &MockQueryCoord_SetDataCoordClient_Call{Call: _e.mock.On("SetDataCoordClient", dataCoord)} -} - -func (_c *MockQueryCoord_SetDataCoordClient_Call) Run(run func(dataCoord types.DataCoordClient)) *MockQueryCoord_SetDataCoordClient_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(types.DataCoordClient)) - }) - return _c -} - -func (_c *MockQueryCoord_SetDataCoordClient_Call) Return(_a0 error) *MockQueryCoord_SetDataCoordClient_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockQueryCoord_SetDataCoordClient_Call) RunAndReturn(run func(types.DataCoordClient) error) *MockQueryCoord_SetDataCoordClient_Call { - _c.Call.Return(run) + _c.Run(run) return _c } @@ -1825,7 +1602,40 @@ func (_c *MockQueryCoord_SetEtcdClient_Call) Return() *MockQueryCoord_SetEtcdCli } func (_c *MockQueryCoord_SetEtcdClient_Call) RunAndReturn(run func(*clientv3.Client)) *MockQueryCoord_SetEtcdClient_Call { - _c.Call.Return(run) + _c.Run(run) + return _c +} + +// SetMixCoord provides a mock function with given fields: mixCoord +func (_m *MockQueryCoord) SetMixCoord(mixCoord types.MixCoord) { + _m.Called(mixCoord) +} + +// MockQueryCoord_SetMixCoord_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetMixCoord' +type MockQueryCoord_SetMixCoord_Call struct { + *mock.Call +} + +// SetMixCoord is a helper method to define mock.On call +// - mixCoord types.MixCoord +func (_e *MockQueryCoord_Expecter) SetMixCoord(mixCoord interface{}) *MockQueryCoord_SetMixCoord_Call { + return &MockQueryCoord_SetMixCoord_Call{Call: _e.mock.On("SetMixCoord", mixCoord)} +} + +func (_c *MockQueryCoord_SetMixCoord_Call) Run(run func(mixCoord types.MixCoord)) *MockQueryCoord_SetMixCoord_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(types.MixCoord)) + }) + return _c +} + +func (_c *MockQueryCoord_SetMixCoord_Call) Return() *MockQueryCoord_SetMixCoord_Call { + _c.Call.Return() + return _c +} + +func (_c *MockQueryCoord_SetMixCoord_Call) RunAndReturn(run func(types.MixCoord)) *MockQueryCoord_SetMixCoord_Call { + _c.Run(run) return _c } @@ -1858,53 +1668,7 @@ func (_c *MockQueryCoord_SetQueryNodeCreator_Call) Return() *MockQueryCoord_SetQ } func (_c *MockQueryCoord_SetQueryNodeCreator_Call) RunAndReturn(run func(func(context.Context, string, int64) (types.QueryNodeClient, error))) *MockQueryCoord_SetQueryNodeCreator_Call { - _c.Call.Return(run) - return _c -} - -// SetRootCoordClient provides a mock function with given fields: rootCoord -func (_m *MockQueryCoord) SetRootCoordClient(rootCoord types.RootCoordClient) error { - ret := _m.Called(rootCoord) - - if len(ret) == 0 { - panic("no return value specified for SetRootCoordClient") - } - - var r0 error - if rf, ok := ret.Get(0).(func(types.RootCoordClient) error); ok { - r0 = rf(rootCoord) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockQueryCoord_SetRootCoordClient_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetRootCoordClient' -type MockQueryCoord_SetRootCoordClient_Call struct { - *mock.Call -} - -// SetRootCoordClient is a helper method to define mock.On call -// - rootCoord types.RootCoordClient -func (_e *MockQueryCoord_Expecter) SetRootCoordClient(rootCoord interface{}) *MockQueryCoord_SetRootCoordClient_Call { - return &MockQueryCoord_SetRootCoordClient_Call{Call: _e.mock.On("SetRootCoordClient", rootCoord)} -} - -func (_c *MockQueryCoord_SetRootCoordClient_Call) Run(run func(rootCoord types.RootCoordClient)) *MockQueryCoord_SetRootCoordClient_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(types.RootCoordClient)) - }) - return _c -} - -func (_c *MockQueryCoord_SetRootCoordClient_Call) Return(_a0 error) *MockQueryCoord_SetRootCoordClient_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockQueryCoord_SetRootCoordClient_Call) RunAndReturn(run func(types.RootCoordClient) error) *MockQueryCoord_SetRootCoordClient_Call { - _c.Call.Return(run) + _c.Run(run) return _c } @@ -1937,7 +1701,7 @@ func (_c *MockQueryCoord_SetTiKVClient_Call) Return() *MockQueryCoord_SetTiKVCli } func (_c *MockQueryCoord_SetTiKVClient_Call) RunAndReturn(run func(*txnkv.Client)) *MockQueryCoord_SetTiKVClient_Call { - _c.Call.Return(run) + _c.Run(run) return _c } @@ -2118,7 +1882,7 @@ func (_c *MockQueryCoord_ShowLoadPartitions_Call) RunAndReturn(run func(context. return _c } -// Start provides a mock function with given fields: +// Start provides a mock function with no fields func (_m *MockQueryCoord) Start() error { ret := _m.Called() @@ -2163,7 +1927,7 @@ func (_c *MockQueryCoord_Start_Call) RunAndReturn(run func() error) *MockQueryCo return _c } -// Stop provides a mock function with given fields: +// Stop provides a mock function with no fields func (_m *MockQueryCoord) Stop() error { ret := _m.Called() @@ -2768,7 +2532,7 @@ func (_c *MockQueryCoord_UpdateStateCode_Call) Return() *MockQueryCoord_UpdateSt } func (_c *MockQueryCoord_UpdateStateCode_Call) RunAndReturn(run func(commonpb.StateCode)) *MockQueryCoord_UpdateStateCode_Call { - _c.Call.Return(run) + _c.Run(run) return _c } diff --git a/internal/mocks/mock_querycoord_client.go b/internal/mocks/mock_querycoord_client.go index 835a7289bc..6eba9c1faf 100644 --- a/internal/mocks/mock_querycoord_client.go +++ b/internal/mocks/mock_querycoord_client.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.46.0. DO NOT EDIT. +// Code generated by mockery v2.53.3. DO NOT EDIT. package mocks @@ -327,7 +327,7 @@ func (_c *MockQueryCoordClient_CheckQueryNodeDistribution_Call) RunAndReturn(run return _c } -// Close provides a mock function with given fields: +// Close provides a mock function with no fields func (_m *MockQueryCoordClient) Close() error { ret := _m.Called() @@ -668,80 +668,6 @@ func (_c *MockQueryCoordClient_DropResourceGroup_Call) RunAndReturn(run func(con return _c } -// GetComponentStates provides a mock function with given fields: ctx, in, opts -func (_m *MockQueryCoordClient) GetComponentStates(ctx context.Context, in *milvuspb.GetComponentStatesRequest, opts ...grpc.CallOption) (*milvuspb.ComponentStates, 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 GetComponentStates") - } - - var r0 *milvuspb.ComponentStates - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.GetComponentStatesRequest, ...grpc.CallOption) (*milvuspb.ComponentStates, error)); ok { - return rf(ctx, in, opts...) - } - if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.GetComponentStatesRequest, ...grpc.CallOption) *milvuspb.ComponentStates); ok { - r0 = rf(ctx, in, opts...) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*milvuspb.ComponentStates) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, *milvuspb.GetComponentStatesRequest, ...grpc.CallOption) error); ok { - r1 = rf(ctx, in, opts...) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockQueryCoordClient_GetComponentStates_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetComponentStates' -type MockQueryCoordClient_GetComponentStates_Call struct { - *mock.Call -} - -// GetComponentStates is a helper method to define mock.On call -// - ctx context.Context -// - in *milvuspb.GetComponentStatesRequest -// - opts ...grpc.CallOption -func (_e *MockQueryCoordClient_Expecter) GetComponentStates(ctx interface{}, in interface{}, opts ...interface{}) *MockQueryCoordClient_GetComponentStates_Call { - return &MockQueryCoordClient_GetComponentStates_Call{Call: _e.mock.On("GetComponentStates", - append([]interface{}{ctx, in}, opts...)...)} -} - -func (_c *MockQueryCoordClient_GetComponentStates_Call) Run(run func(ctx context.Context, in *milvuspb.GetComponentStatesRequest, opts ...grpc.CallOption)) *MockQueryCoordClient_GetComponentStates_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.GetComponentStatesRequest), variadicArgs...) - }) - return _c -} - -func (_c *MockQueryCoordClient_GetComponentStates_Call) Return(_a0 *milvuspb.ComponentStates, _a1 error) *MockQueryCoordClient_GetComponentStates_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockQueryCoordClient_GetComponentStates_Call) RunAndReturn(run func(context.Context, *milvuspb.GetComponentStatesRequest, ...grpc.CallOption) (*milvuspb.ComponentStates, error)) *MockQueryCoordClient_GetComponentStates_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)) @@ -1186,154 +1112,6 @@ func (_c *MockQueryCoordClient_GetShardLeaders_Call) RunAndReturn(run func(conte return _c } -// GetStatisticsChannel provides a mock function with given fields: ctx, in, opts -func (_m *MockQueryCoordClient) GetStatisticsChannel(ctx context.Context, in *internalpb.GetStatisticsChannelRequest, opts ...grpc.CallOption) (*milvuspb.StringResponse, 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 GetStatisticsChannel") - } - - var r0 *milvuspb.StringResponse - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, *internalpb.GetStatisticsChannelRequest, ...grpc.CallOption) (*milvuspb.StringResponse, error)); ok { - return rf(ctx, in, opts...) - } - if rf, ok := ret.Get(0).(func(context.Context, *internalpb.GetStatisticsChannelRequest, ...grpc.CallOption) *milvuspb.StringResponse); ok { - r0 = rf(ctx, in, opts...) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*milvuspb.StringResponse) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, *internalpb.GetStatisticsChannelRequest, ...grpc.CallOption) error); ok { - r1 = rf(ctx, in, opts...) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockQueryCoordClient_GetStatisticsChannel_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetStatisticsChannel' -type MockQueryCoordClient_GetStatisticsChannel_Call struct { - *mock.Call -} - -// GetStatisticsChannel is a helper method to define mock.On call -// - ctx context.Context -// - in *internalpb.GetStatisticsChannelRequest -// - opts ...grpc.CallOption -func (_e *MockQueryCoordClient_Expecter) GetStatisticsChannel(ctx interface{}, in interface{}, opts ...interface{}) *MockQueryCoordClient_GetStatisticsChannel_Call { - return &MockQueryCoordClient_GetStatisticsChannel_Call{Call: _e.mock.On("GetStatisticsChannel", - append([]interface{}{ctx, in}, opts...)...)} -} - -func (_c *MockQueryCoordClient_GetStatisticsChannel_Call) Run(run func(ctx context.Context, in *internalpb.GetStatisticsChannelRequest, opts ...grpc.CallOption)) *MockQueryCoordClient_GetStatisticsChannel_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.GetStatisticsChannelRequest), variadicArgs...) - }) - return _c -} - -func (_c *MockQueryCoordClient_GetStatisticsChannel_Call) Return(_a0 *milvuspb.StringResponse, _a1 error) *MockQueryCoordClient_GetStatisticsChannel_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockQueryCoordClient_GetStatisticsChannel_Call) RunAndReturn(run func(context.Context, *internalpb.GetStatisticsChannelRequest, ...grpc.CallOption) (*milvuspb.StringResponse, error)) *MockQueryCoordClient_GetStatisticsChannel_Call { - _c.Call.Return(run) - return _c -} - -// GetTimeTickChannel provides a mock function with given fields: ctx, in, opts -func (_m *MockQueryCoordClient) GetTimeTickChannel(ctx context.Context, in *internalpb.GetTimeTickChannelRequest, opts ...grpc.CallOption) (*milvuspb.StringResponse, 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 GetTimeTickChannel") - } - - var r0 *milvuspb.StringResponse - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, *internalpb.GetTimeTickChannelRequest, ...grpc.CallOption) (*milvuspb.StringResponse, error)); ok { - return rf(ctx, in, opts...) - } - if rf, ok := ret.Get(0).(func(context.Context, *internalpb.GetTimeTickChannelRequest, ...grpc.CallOption) *milvuspb.StringResponse); ok { - r0 = rf(ctx, in, opts...) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*milvuspb.StringResponse) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, *internalpb.GetTimeTickChannelRequest, ...grpc.CallOption) error); ok { - r1 = rf(ctx, in, opts...) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockQueryCoordClient_GetTimeTickChannel_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetTimeTickChannel' -type MockQueryCoordClient_GetTimeTickChannel_Call struct { - *mock.Call -} - -// GetTimeTickChannel is a helper method to define mock.On call -// - ctx context.Context -// - in *internalpb.GetTimeTickChannelRequest -// - opts ...grpc.CallOption -func (_e *MockQueryCoordClient_Expecter) GetTimeTickChannel(ctx interface{}, in interface{}, opts ...interface{}) *MockQueryCoordClient_GetTimeTickChannel_Call { - return &MockQueryCoordClient_GetTimeTickChannel_Call{Call: _e.mock.On("GetTimeTickChannel", - append([]interface{}{ctx, in}, opts...)...)} -} - -func (_c *MockQueryCoordClient_GetTimeTickChannel_Call) Run(run func(ctx context.Context, in *internalpb.GetTimeTickChannelRequest, opts ...grpc.CallOption)) *MockQueryCoordClient_GetTimeTickChannel_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.GetTimeTickChannelRequest), variadicArgs...) - }) - return _c -} - -func (_c *MockQueryCoordClient_GetTimeTickChannel_Call) Return(_a0 *milvuspb.StringResponse, _a1 error) *MockQueryCoordClient_GetTimeTickChannel_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockQueryCoordClient_GetTimeTickChannel_Call) RunAndReturn(run func(context.Context, *internalpb.GetTimeTickChannelRequest, ...grpc.CallOption) (*milvuspb.StringResponse, error)) *MockQueryCoordClient_GetTimeTickChannel_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)) diff --git a/internal/mocks/mock_rootcoord.go b/internal/mocks/mock_rootcoord.go index 4578536d4a..24f914b882 100644 --- a/internal/mocks/mock_rootcoord.go +++ b/internal/mocks/mock_rootcoord.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.46.0. DO NOT EDIT. +// Code generated by mockery v2.53.3. DO NOT EDIT. package mocks @@ -8,8 +8,6 @@ import ( commonpb "github.com/milvus-io/milvus-proto/go-api/v2/commonpb" clientv3 "go.etcd.io/etcd/client/v3" - 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" @@ -25,21 +23,21 @@ import ( types "github.com/milvus-io/milvus/internal/types" ) -// RootCoord is an autogenerated mock type for the RootCoordComponent type -type RootCoord struct { +// MockRootCoord is an autogenerated mock type for the RootCoordComponent type +type MockRootCoord struct { mock.Mock } -type RootCoord_Expecter struct { +type MockRootCoord_Expecter struct { mock *mock.Mock } -func (_m *RootCoord) EXPECT() *RootCoord_Expecter { - return &RootCoord_Expecter{mock: &_m.Mock} +func (_m *MockRootCoord) EXPECT() *MockRootCoord_Expecter { + return &MockRootCoord_Expecter{mock: &_m.Mock} } // AddCollectionField provides a mock function with given fields: _a0, _a1 -func (_m *RootCoord) AddCollectionField(_a0 context.Context, _a1 *milvuspb.AddCollectionFieldRequest) (*commonpb.Status, error) { +func (_m *MockRootCoord) AddCollectionField(_a0 context.Context, _a1 *milvuspb.AddCollectionFieldRequest) (*commonpb.Status, error) { ret := _m.Called(_a0, _a1) if len(ret) == 0 { @@ -68,37 +66,37 @@ func (_m *RootCoord) AddCollectionField(_a0 context.Context, _a1 *milvuspb.AddCo return r0, r1 } -// RootCoord_AddCollectionField_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'AddCollectionField' -type RootCoord_AddCollectionField_Call struct { +// MockRootCoord_AddCollectionField_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'AddCollectionField' +type MockRootCoord_AddCollectionField_Call struct { *mock.Call } // AddCollectionField is a helper method to define mock.On call // - _a0 context.Context // - _a1 *milvuspb.AddCollectionFieldRequest -func (_e *RootCoord_Expecter) AddCollectionField(_a0 interface{}, _a1 interface{}) *RootCoord_AddCollectionField_Call { - return &RootCoord_AddCollectionField_Call{Call: _e.mock.On("AddCollectionField", _a0, _a1)} +func (_e *MockRootCoord_Expecter) AddCollectionField(_a0 interface{}, _a1 interface{}) *MockRootCoord_AddCollectionField_Call { + return &MockRootCoord_AddCollectionField_Call{Call: _e.mock.On("AddCollectionField", _a0, _a1)} } -func (_c *RootCoord_AddCollectionField_Call) Run(run func(_a0 context.Context, _a1 *milvuspb.AddCollectionFieldRequest)) *RootCoord_AddCollectionField_Call { +func (_c *MockRootCoord_AddCollectionField_Call) Run(run func(_a0 context.Context, _a1 *milvuspb.AddCollectionFieldRequest)) *MockRootCoord_AddCollectionField_Call { _c.Call.Run(func(args mock.Arguments) { run(args[0].(context.Context), args[1].(*milvuspb.AddCollectionFieldRequest)) }) return _c } -func (_c *RootCoord_AddCollectionField_Call) Return(_a0 *commonpb.Status, _a1 error) *RootCoord_AddCollectionField_Call { +func (_c *MockRootCoord_AddCollectionField_Call) Return(_a0 *commonpb.Status, _a1 error) *MockRootCoord_AddCollectionField_Call { _c.Call.Return(_a0, _a1) return _c } -func (_c *RootCoord_AddCollectionField_Call) RunAndReturn(run func(context.Context, *milvuspb.AddCollectionFieldRequest) (*commonpb.Status, error)) *RootCoord_AddCollectionField_Call { +func (_c *MockRootCoord_AddCollectionField_Call) RunAndReturn(run func(context.Context, *milvuspb.AddCollectionFieldRequest) (*commonpb.Status, error)) *MockRootCoord_AddCollectionField_Call { _c.Call.Return(run) return _c } // AllocID provides a mock function with given fields: _a0, _a1 -func (_m *RootCoord) AllocID(_a0 context.Context, _a1 *rootcoordpb.AllocIDRequest) (*rootcoordpb.AllocIDResponse, error) { +func (_m *MockRootCoord) AllocID(_a0 context.Context, _a1 *rootcoordpb.AllocIDRequest) (*rootcoordpb.AllocIDResponse, error) { ret := _m.Called(_a0, _a1) if len(ret) == 0 { @@ -127,37 +125,37 @@ func (_m *RootCoord) AllocID(_a0 context.Context, _a1 *rootcoordpb.AllocIDReques return r0, r1 } -// RootCoord_AllocID_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'AllocID' -type RootCoord_AllocID_Call struct { +// MockRootCoord_AllocID_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'AllocID' +type MockRootCoord_AllocID_Call struct { *mock.Call } // AllocID is a helper method to define mock.On call // - _a0 context.Context // - _a1 *rootcoordpb.AllocIDRequest -func (_e *RootCoord_Expecter) AllocID(_a0 interface{}, _a1 interface{}) *RootCoord_AllocID_Call { - return &RootCoord_AllocID_Call{Call: _e.mock.On("AllocID", _a0, _a1)} +func (_e *MockRootCoord_Expecter) AllocID(_a0 interface{}, _a1 interface{}) *MockRootCoord_AllocID_Call { + return &MockRootCoord_AllocID_Call{Call: _e.mock.On("AllocID", _a0, _a1)} } -func (_c *RootCoord_AllocID_Call) Run(run func(_a0 context.Context, _a1 *rootcoordpb.AllocIDRequest)) *RootCoord_AllocID_Call { +func (_c *MockRootCoord_AllocID_Call) Run(run func(_a0 context.Context, _a1 *rootcoordpb.AllocIDRequest)) *MockRootCoord_AllocID_Call { _c.Call.Run(func(args mock.Arguments) { run(args[0].(context.Context), args[1].(*rootcoordpb.AllocIDRequest)) }) return _c } -func (_c *RootCoord_AllocID_Call) Return(_a0 *rootcoordpb.AllocIDResponse, _a1 error) *RootCoord_AllocID_Call { +func (_c *MockRootCoord_AllocID_Call) Return(_a0 *rootcoordpb.AllocIDResponse, _a1 error) *MockRootCoord_AllocID_Call { _c.Call.Return(_a0, _a1) return _c } -func (_c *RootCoord_AllocID_Call) RunAndReturn(run func(context.Context, *rootcoordpb.AllocIDRequest) (*rootcoordpb.AllocIDResponse, error)) *RootCoord_AllocID_Call { +func (_c *MockRootCoord_AllocID_Call) RunAndReturn(run func(context.Context, *rootcoordpb.AllocIDRequest) (*rootcoordpb.AllocIDResponse, error)) *MockRootCoord_AllocID_Call { _c.Call.Return(run) return _c } // AllocTimestamp provides a mock function with given fields: _a0, _a1 -func (_m *RootCoord) AllocTimestamp(_a0 context.Context, _a1 *rootcoordpb.AllocTimestampRequest) (*rootcoordpb.AllocTimestampResponse, error) { +func (_m *MockRootCoord) AllocTimestamp(_a0 context.Context, _a1 *rootcoordpb.AllocTimestampRequest) (*rootcoordpb.AllocTimestampResponse, error) { ret := _m.Called(_a0, _a1) if len(ret) == 0 { @@ -186,37 +184,37 @@ func (_m *RootCoord) AllocTimestamp(_a0 context.Context, _a1 *rootcoordpb.AllocT return r0, r1 } -// RootCoord_AllocTimestamp_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'AllocTimestamp' -type RootCoord_AllocTimestamp_Call struct { +// MockRootCoord_AllocTimestamp_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'AllocTimestamp' +type MockRootCoord_AllocTimestamp_Call struct { *mock.Call } // AllocTimestamp is a helper method to define mock.On call // - _a0 context.Context // - _a1 *rootcoordpb.AllocTimestampRequest -func (_e *RootCoord_Expecter) AllocTimestamp(_a0 interface{}, _a1 interface{}) *RootCoord_AllocTimestamp_Call { - return &RootCoord_AllocTimestamp_Call{Call: _e.mock.On("AllocTimestamp", _a0, _a1)} +func (_e *MockRootCoord_Expecter) AllocTimestamp(_a0 interface{}, _a1 interface{}) *MockRootCoord_AllocTimestamp_Call { + return &MockRootCoord_AllocTimestamp_Call{Call: _e.mock.On("AllocTimestamp", _a0, _a1)} } -func (_c *RootCoord_AllocTimestamp_Call) Run(run func(_a0 context.Context, _a1 *rootcoordpb.AllocTimestampRequest)) *RootCoord_AllocTimestamp_Call { +func (_c *MockRootCoord_AllocTimestamp_Call) Run(run func(_a0 context.Context, _a1 *rootcoordpb.AllocTimestampRequest)) *MockRootCoord_AllocTimestamp_Call { _c.Call.Run(func(args mock.Arguments) { run(args[0].(context.Context), args[1].(*rootcoordpb.AllocTimestampRequest)) }) return _c } -func (_c *RootCoord_AllocTimestamp_Call) Return(_a0 *rootcoordpb.AllocTimestampResponse, _a1 error) *RootCoord_AllocTimestamp_Call { +func (_c *MockRootCoord_AllocTimestamp_Call) Return(_a0 *rootcoordpb.AllocTimestampResponse, _a1 error) *MockRootCoord_AllocTimestamp_Call { _c.Call.Return(_a0, _a1) return _c } -func (_c *RootCoord_AllocTimestamp_Call) RunAndReturn(run func(context.Context, *rootcoordpb.AllocTimestampRequest) (*rootcoordpb.AllocTimestampResponse, error)) *RootCoord_AllocTimestamp_Call { +func (_c *MockRootCoord_AllocTimestamp_Call) RunAndReturn(run func(context.Context, *rootcoordpb.AllocTimestampRequest) (*rootcoordpb.AllocTimestampResponse, error)) *MockRootCoord_AllocTimestamp_Call { _c.Call.Return(run) return _c } // AlterAlias provides a mock function with given fields: _a0, _a1 -func (_m *RootCoord) AlterAlias(_a0 context.Context, _a1 *milvuspb.AlterAliasRequest) (*commonpb.Status, error) { +func (_m *MockRootCoord) AlterAlias(_a0 context.Context, _a1 *milvuspb.AlterAliasRequest) (*commonpb.Status, error) { ret := _m.Called(_a0, _a1) if len(ret) == 0 { @@ -245,37 +243,37 @@ func (_m *RootCoord) AlterAlias(_a0 context.Context, _a1 *milvuspb.AlterAliasReq return r0, r1 } -// RootCoord_AlterAlias_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'AlterAlias' -type RootCoord_AlterAlias_Call struct { +// MockRootCoord_AlterAlias_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'AlterAlias' +type MockRootCoord_AlterAlias_Call struct { *mock.Call } // AlterAlias is a helper method to define mock.On call // - _a0 context.Context // - _a1 *milvuspb.AlterAliasRequest -func (_e *RootCoord_Expecter) AlterAlias(_a0 interface{}, _a1 interface{}) *RootCoord_AlterAlias_Call { - return &RootCoord_AlterAlias_Call{Call: _e.mock.On("AlterAlias", _a0, _a1)} +func (_e *MockRootCoord_Expecter) AlterAlias(_a0 interface{}, _a1 interface{}) *MockRootCoord_AlterAlias_Call { + return &MockRootCoord_AlterAlias_Call{Call: _e.mock.On("AlterAlias", _a0, _a1)} } -func (_c *RootCoord_AlterAlias_Call) Run(run func(_a0 context.Context, _a1 *milvuspb.AlterAliasRequest)) *RootCoord_AlterAlias_Call { +func (_c *MockRootCoord_AlterAlias_Call) Run(run func(_a0 context.Context, _a1 *milvuspb.AlterAliasRequest)) *MockRootCoord_AlterAlias_Call { _c.Call.Run(func(args mock.Arguments) { run(args[0].(context.Context), args[1].(*milvuspb.AlterAliasRequest)) }) return _c } -func (_c *RootCoord_AlterAlias_Call) Return(_a0 *commonpb.Status, _a1 error) *RootCoord_AlterAlias_Call { +func (_c *MockRootCoord_AlterAlias_Call) Return(_a0 *commonpb.Status, _a1 error) *MockRootCoord_AlterAlias_Call { _c.Call.Return(_a0, _a1) return _c } -func (_c *RootCoord_AlterAlias_Call) RunAndReturn(run func(context.Context, *milvuspb.AlterAliasRequest) (*commonpb.Status, error)) *RootCoord_AlterAlias_Call { +func (_c *MockRootCoord_AlterAlias_Call) RunAndReturn(run func(context.Context, *milvuspb.AlterAliasRequest) (*commonpb.Status, error)) *MockRootCoord_AlterAlias_Call { _c.Call.Return(run) return _c } // AlterCollection provides a mock function with given fields: _a0, _a1 -func (_m *RootCoord) AlterCollection(_a0 context.Context, _a1 *milvuspb.AlterCollectionRequest) (*commonpb.Status, error) { +func (_m *MockRootCoord) AlterCollection(_a0 context.Context, _a1 *milvuspb.AlterCollectionRequest) (*commonpb.Status, error) { ret := _m.Called(_a0, _a1) if len(ret) == 0 { @@ -304,37 +302,37 @@ func (_m *RootCoord) AlterCollection(_a0 context.Context, _a1 *milvuspb.AlterCol return r0, r1 } -// RootCoord_AlterCollection_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'AlterCollection' -type RootCoord_AlterCollection_Call struct { +// MockRootCoord_AlterCollection_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'AlterCollection' +type MockRootCoord_AlterCollection_Call struct { *mock.Call } // AlterCollection is a helper method to define mock.On call // - _a0 context.Context // - _a1 *milvuspb.AlterCollectionRequest -func (_e *RootCoord_Expecter) AlterCollection(_a0 interface{}, _a1 interface{}) *RootCoord_AlterCollection_Call { - return &RootCoord_AlterCollection_Call{Call: _e.mock.On("AlterCollection", _a0, _a1)} +func (_e *MockRootCoord_Expecter) AlterCollection(_a0 interface{}, _a1 interface{}) *MockRootCoord_AlterCollection_Call { + return &MockRootCoord_AlterCollection_Call{Call: _e.mock.On("AlterCollection", _a0, _a1)} } -func (_c *RootCoord_AlterCollection_Call) Run(run func(_a0 context.Context, _a1 *milvuspb.AlterCollectionRequest)) *RootCoord_AlterCollection_Call { +func (_c *MockRootCoord_AlterCollection_Call) Run(run func(_a0 context.Context, _a1 *milvuspb.AlterCollectionRequest)) *MockRootCoord_AlterCollection_Call { _c.Call.Run(func(args mock.Arguments) { run(args[0].(context.Context), args[1].(*milvuspb.AlterCollectionRequest)) }) return _c } -func (_c *RootCoord_AlterCollection_Call) Return(_a0 *commonpb.Status, _a1 error) *RootCoord_AlterCollection_Call { +func (_c *MockRootCoord_AlterCollection_Call) Return(_a0 *commonpb.Status, _a1 error) *MockRootCoord_AlterCollection_Call { _c.Call.Return(_a0, _a1) return _c } -func (_c *RootCoord_AlterCollection_Call) RunAndReturn(run func(context.Context, *milvuspb.AlterCollectionRequest) (*commonpb.Status, error)) *RootCoord_AlterCollection_Call { +func (_c *MockRootCoord_AlterCollection_Call) RunAndReturn(run func(context.Context, *milvuspb.AlterCollectionRequest) (*commonpb.Status, error)) *MockRootCoord_AlterCollection_Call { _c.Call.Return(run) return _c } // AlterCollectionField provides a mock function with given fields: _a0, _a1 -func (_m *RootCoord) AlterCollectionField(_a0 context.Context, _a1 *milvuspb.AlterCollectionFieldRequest) (*commonpb.Status, error) { +func (_m *MockRootCoord) AlterCollectionField(_a0 context.Context, _a1 *milvuspb.AlterCollectionFieldRequest) (*commonpb.Status, error) { ret := _m.Called(_a0, _a1) if len(ret) == 0 { @@ -363,37 +361,37 @@ func (_m *RootCoord) AlterCollectionField(_a0 context.Context, _a1 *milvuspb.Alt return r0, r1 } -// RootCoord_AlterCollectionField_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'AlterCollectionField' -type RootCoord_AlterCollectionField_Call struct { +// MockRootCoord_AlterCollectionField_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'AlterCollectionField' +type MockRootCoord_AlterCollectionField_Call struct { *mock.Call } // AlterCollectionField is a helper method to define mock.On call // - _a0 context.Context // - _a1 *milvuspb.AlterCollectionFieldRequest -func (_e *RootCoord_Expecter) AlterCollectionField(_a0 interface{}, _a1 interface{}) *RootCoord_AlterCollectionField_Call { - return &RootCoord_AlterCollectionField_Call{Call: _e.mock.On("AlterCollectionField", _a0, _a1)} +func (_e *MockRootCoord_Expecter) AlterCollectionField(_a0 interface{}, _a1 interface{}) *MockRootCoord_AlterCollectionField_Call { + return &MockRootCoord_AlterCollectionField_Call{Call: _e.mock.On("AlterCollectionField", _a0, _a1)} } -func (_c *RootCoord_AlterCollectionField_Call) Run(run func(_a0 context.Context, _a1 *milvuspb.AlterCollectionFieldRequest)) *RootCoord_AlterCollectionField_Call { +func (_c *MockRootCoord_AlterCollectionField_Call) Run(run func(_a0 context.Context, _a1 *milvuspb.AlterCollectionFieldRequest)) *MockRootCoord_AlterCollectionField_Call { _c.Call.Run(func(args mock.Arguments) { run(args[0].(context.Context), args[1].(*milvuspb.AlterCollectionFieldRequest)) }) return _c } -func (_c *RootCoord_AlterCollectionField_Call) Return(_a0 *commonpb.Status, _a1 error) *RootCoord_AlterCollectionField_Call { +func (_c *MockRootCoord_AlterCollectionField_Call) Return(_a0 *commonpb.Status, _a1 error) *MockRootCoord_AlterCollectionField_Call { _c.Call.Return(_a0, _a1) return _c } -func (_c *RootCoord_AlterCollectionField_Call) RunAndReturn(run func(context.Context, *milvuspb.AlterCollectionFieldRequest) (*commonpb.Status, error)) *RootCoord_AlterCollectionField_Call { +func (_c *MockRootCoord_AlterCollectionField_Call) RunAndReturn(run func(context.Context, *milvuspb.AlterCollectionFieldRequest) (*commonpb.Status, error)) *MockRootCoord_AlterCollectionField_Call { _c.Call.Return(run) return _c } // AlterDatabase provides a mock function with given fields: _a0, _a1 -func (_m *RootCoord) AlterDatabase(_a0 context.Context, _a1 *rootcoordpb.AlterDatabaseRequest) (*commonpb.Status, error) { +func (_m *MockRootCoord) AlterDatabase(_a0 context.Context, _a1 *rootcoordpb.AlterDatabaseRequest) (*commonpb.Status, error) { ret := _m.Called(_a0, _a1) if len(ret) == 0 { @@ -422,37 +420,37 @@ func (_m *RootCoord) AlterDatabase(_a0 context.Context, _a1 *rootcoordpb.AlterDa return r0, r1 } -// RootCoord_AlterDatabase_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'AlterDatabase' -type RootCoord_AlterDatabase_Call struct { +// MockRootCoord_AlterDatabase_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'AlterDatabase' +type MockRootCoord_AlterDatabase_Call struct { *mock.Call } // AlterDatabase is a helper method to define mock.On call // - _a0 context.Context // - _a1 *rootcoordpb.AlterDatabaseRequest -func (_e *RootCoord_Expecter) AlterDatabase(_a0 interface{}, _a1 interface{}) *RootCoord_AlterDatabase_Call { - return &RootCoord_AlterDatabase_Call{Call: _e.mock.On("AlterDatabase", _a0, _a1)} +func (_e *MockRootCoord_Expecter) AlterDatabase(_a0 interface{}, _a1 interface{}) *MockRootCoord_AlterDatabase_Call { + return &MockRootCoord_AlterDatabase_Call{Call: _e.mock.On("AlterDatabase", _a0, _a1)} } -func (_c *RootCoord_AlterDatabase_Call) Run(run func(_a0 context.Context, _a1 *rootcoordpb.AlterDatabaseRequest)) *RootCoord_AlterDatabase_Call { +func (_c *MockRootCoord_AlterDatabase_Call) Run(run func(_a0 context.Context, _a1 *rootcoordpb.AlterDatabaseRequest)) *MockRootCoord_AlterDatabase_Call { _c.Call.Run(func(args mock.Arguments) { run(args[0].(context.Context), args[1].(*rootcoordpb.AlterDatabaseRequest)) }) return _c } -func (_c *RootCoord_AlterDatabase_Call) Return(_a0 *commonpb.Status, _a1 error) *RootCoord_AlterDatabase_Call { +func (_c *MockRootCoord_AlterDatabase_Call) Return(_a0 *commonpb.Status, _a1 error) *MockRootCoord_AlterDatabase_Call { _c.Call.Return(_a0, _a1) return _c } -func (_c *RootCoord_AlterDatabase_Call) RunAndReturn(run func(context.Context, *rootcoordpb.AlterDatabaseRequest) (*commonpb.Status, error)) *RootCoord_AlterDatabase_Call { +func (_c *MockRootCoord_AlterDatabase_Call) RunAndReturn(run func(context.Context, *rootcoordpb.AlterDatabaseRequest) (*commonpb.Status, error)) *MockRootCoord_AlterDatabase_Call { _c.Call.Return(run) return _c } // BackupRBAC provides a mock function with given fields: _a0, _a1 -func (_m *RootCoord) BackupRBAC(_a0 context.Context, _a1 *milvuspb.BackupRBACMetaRequest) (*milvuspb.BackupRBACMetaResponse, error) { +func (_m *MockRootCoord) BackupRBAC(_a0 context.Context, _a1 *milvuspb.BackupRBACMetaRequest) (*milvuspb.BackupRBACMetaResponse, error) { ret := _m.Called(_a0, _a1) if len(ret) == 0 { @@ -481,37 +479,37 @@ func (_m *RootCoord) BackupRBAC(_a0 context.Context, _a1 *milvuspb.BackupRBACMet return r0, r1 } -// RootCoord_BackupRBAC_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'BackupRBAC' -type RootCoord_BackupRBAC_Call struct { +// MockRootCoord_BackupRBAC_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'BackupRBAC' +type MockRootCoord_BackupRBAC_Call struct { *mock.Call } // BackupRBAC is a helper method to define mock.On call // - _a0 context.Context // - _a1 *milvuspb.BackupRBACMetaRequest -func (_e *RootCoord_Expecter) BackupRBAC(_a0 interface{}, _a1 interface{}) *RootCoord_BackupRBAC_Call { - return &RootCoord_BackupRBAC_Call{Call: _e.mock.On("BackupRBAC", _a0, _a1)} +func (_e *MockRootCoord_Expecter) BackupRBAC(_a0 interface{}, _a1 interface{}) *MockRootCoord_BackupRBAC_Call { + return &MockRootCoord_BackupRBAC_Call{Call: _e.mock.On("BackupRBAC", _a0, _a1)} } -func (_c *RootCoord_BackupRBAC_Call) Run(run func(_a0 context.Context, _a1 *milvuspb.BackupRBACMetaRequest)) *RootCoord_BackupRBAC_Call { +func (_c *MockRootCoord_BackupRBAC_Call) Run(run func(_a0 context.Context, _a1 *milvuspb.BackupRBACMetaRequest)) *MockRootCoord_BackupRBAC_Call { _c.Call.Run(func(args mock.Arguments) { run(args[0].(context.Context), args[1].(*milvuspb.BackupRBACMetaRequest)) }) return _c } -func (_c *RootCoord_BackupRBAC_Call) Return(_a0 *milvuspb.BackupRBACMetaResponse, _a1 error) *RootCoord_BackupRBAC_Call { +func (_c *MockRootCoord_BackupRBAC_Call) Return(_a0 *milvuspb.BackupRBACMetaResponse, _a1 error) *MockRootCoord_BackupRBAC_Call { _c.Call.Return(_a0, _a1) return _c } -func (_c *RootCoord_BackupRBAC_Call) RunAndReturn(run func(context.Context, *milvuspb.BackupRBACMetaRequest) (*milvuspb.BackupRBACMetaResponse, error)) *RootCoord_BackupRBAC_Call { +func (_c *MockRootCoord_BackupRBAC_Call) RunAndReturn(run func(context.Context, *milvuspb.BackupRBACMetaRequest) (*milvuspb.BackupRBACMetaResponse, error)) *MockRootCoord_BackupRBAC_Call { _c.Call.Return(run) return _c } // CheckHealth provides a mock function with given fields: _a0, _a1 -func (_m *RootCoord) CheckHealth(_a0 context.Context, _a1 *milvuspb.CheckHealthRequest) (*milvuspb.CheckHealthResponse, error) { +func (_m *MockRootCoord) CheckHealth(_a0 context.Context, _a1 *milvuspb.CheckHealthRequest) (*milvuspb.CheckHealthResponse, error) { ret := _m.Called(_a0, _a1) if len(ret) == 0 { @@ -540,37 +538,37 @@ func (_m *RootCoord) CheckHealth(_a0 context.Context, _a1 *milvuspb.CheckHealthR return r0, r1 } -// RootCoord_CheckHealth_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CheckHealth' -type RootCoord_CheckHealth_Call struct { +// MockRootCoord_CheckHealth_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CheckHealth' +type MockRootCoord_CheckHealth_Call struct { *mock.Call } // CheckHealth is a helper method to define mock.On call // - _a0 context.Context // - _a1 *milvuspb.CheckHealthRequest -func (_e *RootCoord_Expecter) CheckHealth(_a0 interface{}, _a1 interface{}) *RootCoord_CheckHealth_Call { - return &RootCoord_CheckHealth_Call{Call: _e.mock.On("CheckHealth", _a0, _a1)} +func (_e *MockRootCoord_Expecter) CheckHealth(_a0 interface{}, _a1 interface{}) *MockRootCoord_CheckHealth_Call { + return &MockRootCoord_CheckHealth_Call{Call: _e.mock.On("CheckHealth", _a0, _a1)} } -func (_c *RootCoord_CheckHealth_Call) Run(run func(_a0 context.Context, _a1 *milvuspb.CheckHealthRequest)) *RootCoord_CheckHealth_Call { +func (_c *MockRootCoord_CheckHealth_Call) Run(run func(_a0 context.Context, _a1 *milvuspb.CheckHealthRequest)) *MockRootCoord_CheckHealth_Call { _c.Call.Run(func(args mock.Arguments) { run(args[0].(context.Context), args[1].(*milvuspb.CheckHealthRequest)) }) return _c } -func (_c *RootCoord_CheckHealth_Call) Return(_a0 *milvuspb.CheckHealthResponse, _a1 error) *RootCoord_CheckHealth_Call { +func (_c *MockRootCoord_CheckHealth_Call) Return(_a0 *milvuspb.CheckHealthResponse, _a1 error) *MockRootCoord_CheckHealth_Call { _c.Call.Return(_a0, _a1) return _c } -func (_c *RootCoord_CheckHealth_Call) RunAndReturn(run func(context.Context, *milvuspb.CheckHealthRequest) (*milvuspb.CheckHealthResponse, error)) *RootCoord_CheckHealth_Call { +func (_c *MockRootCoord_CheckHealth_Call) RunAndReturn(run func(context.Context, *milvuspb.CheckHealthRequest) (*milvuspb.CheckHealthResponse, error)) *MockRootCoord_CheckHealth_Call { _c.Call.Return(run) return _c } // CreateAlias provides a mock function with given fields: _a0, _a1 -func (_m *RootCoord) CreateAlias(_a0 context.Context, _a1 *milvuspb.CreateAliasRequest) (*commonpb.Status, error) { +func (_m *MockRootCoord) CreateAlias(_a0 context.Context, _a1 *milvuspb.CreateAliasRequest) (*commonpb.Status, error) { ret := _m.Called(_a0, _a1) if len(ret) == 0 { @@ -599,37 +597,37 @@ func (_m *RootCoord) CreateAlias(_a0 context.Context, _a1 *milvuspb.CreateAliasR return r0, r1 } -// RootCoord_CreateAlias_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CreateAlias' -type RootCoord_CreateAlias_Call struct { +// MockRootCoord_CreateAlias_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CreateAlias' +type MockRootCoord_CreateAlias_Call struct { *mock.Call } // CreateAlias is a helper method to define mock.On call // - _a0 context.Context // - _a1 *milvuspb.CreateAliasRequest -func (_e *RootCoord_Expecter) CreateAlias(_a0 interface{}, _a1 interface{}) *RootCoord_CreateAlias_Call { - return &RootCoord_CreateAlias_Call{Call: _e.mock.On("CreateAlias", _a0, _a1)} +func (_e *MockRootCoord_Expecter) CreateAlias(_a0 interface{}, _a1 interface{}) *MockRootCoord_CreateAlias_Call { + return &MockRootCoord_CreateAlias_Call{Call: _e.mock.On("CreateAlias", _a0, _a1)} } -func (_c *RootCoord_CreateAlias_Call) Run(run func(_a0 context.Context, _a1 *milvuspb.CreateAliasRequest)) *RootCoord_CreateAlias_Call { +func (_c *MockRootCoord_CreateAlias_Call) Run(run func(_a0 context.Context, _a1 *milvuspb.CreateAliasRequest)) *MockRootCoord_CreateAlias_Call { _c.Call.Run(func(args mock.Arguments) { run(args[0].(context.Context), args[1].(*milvuspb.CreateAliasRequest)) }) return _c } -func (_c *RootCoord_CreateAlias_Call) Return(_a0 *commonpb.Status, _a1 error) *RootCoord_CreateAlias_Call { +func (_c *MockRootCoord_CreateAlias_Call) Return(_a0 *commonpb.Status, _a1 error) *MockRootCoord_CreateAlias_Call { _c.Call.Return(_a0, _a1) return _c } -func (_c *RootCoord_CreateAlias_Call) RunAndReturn(run func(context.Context, *milvuspb.CreateAliasRequest) (*commonpb.Status, error)) *RootCoord_CreateAlias_Call { +func (_c *MockRootCoord_CreateAlias_Call) RunAndReturn(run func(context.Context, *milvuspb.CreateAliasRequest) (*commonpb.Status, error)) *MockRootCoord_CreateAlias_Call { _c.Call.Return(run) return _c } // CreateCollection provides a mock function with given fields: _a0, _a1 -func (_m *RootCoord) CreateCollection(_a0 context.Context, _a1 *milvuspb.CreateCollectionRequest) (*commonpb.Status, error) { +func (_m *MockRootCoord) CreateCollection(_a0 context.Context, _a1 *milvuspb.CreateCollectionRequest) (*commonpb.Status, error) { ret := _m.Called(_a0, _a1) if len(ret) == 0 { @@ -658,37 +656,37 @@ func (_m *RootCoord) CreateCollection(_a0 context.Context, _a1 *milvuspb.CreateC return r0, r1 } -// RootCoord_CreateCollection_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CreateCollection' -type RootCoord_CreateCollection_Call struct { +// MockRootCoord_CreateCollection_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CreateCollection' +type MockRootCoord_CreateCollection_Call struct { *mock.Call } // CreateCollection is a helper method to define mock.On call // - _a0 context.Context // - _a1 *milvuspb.CreateCollectionRequest -func (_e *RootCoord_Expecter) CreateCollection(_a0 interface{}, _a1 interface{}) *RootCoord_CreateCollection_Call { - return &RootCoord_CreateCollection_Call{Call: _e.mock.On("CreateCollection", _a0, _a1)} +func (_e *MockRootCoord_Expecter) CreateCollection(_a0 interface{}, _a1 interface{}) *MockRootCoord_CreateCollection_Call { + return &MockRootCoord_CreateCollection_Call{Call: _e.mock.On("CreateCollection", _a0, _a1)} } -func (_c *RootCoord_CreateCollection_Call) Run(run func(_a0 context.Context, _a1 *milvuspb.CreateCollectionRequest)) *RootCoord_CreateCollection_Call { +func (_c *MockRootCoord_CreateCollection_Call) Run(run func(_a0 context.Context, _a1 *milvuspb.CreateCollectionRequest)) *MockRootCoord_CreateCollection_Call { _c.Call.Run(func(args mock.Arguments) { run(args[0].(context.Context), args[1].(*milvuspb.CreateCollectionRequest)) }) return _c } -func (_c *RootCoord_CreateCollection_Call) Return(_a0 *commonpb.Status, _a1 error) *RootCoord_CreateCollection_Call { +func (_c *MockRootCoord_CreateCollection_Call) Return(_a0 *commonpb.Status, _a1 error) *MockRootCoord_CreateCollection_Call { _c.Call.Return(_a0, _a1) return _c } -func (_c *RootCoord_CreateCollection_Call) RunAndReturn(run func(context.Context, *milvuspb.CreateCollectionRequest) (*commonpb.Status, error)) *RootCoord_CreateCollection_Call { +func (_c *MockRootCoord_CreateCollection_Call) RunAndReturn(run func(context.Context, *milvuspb.CreateCollectionRequest) (*commonpb.Status, error)) *MockRootCoord_CreateCollection_Call { _c.Call.Return(run) return _c } // CreateCredential provides a mock function with given fields: _a0, _a1 -func (_m *RootCoord) CreateCredential(_a0 context.Context, _a1 *internalpb.CredentialInfo) (*commonpb.Status, error) { +func (_m *MockRootCoord) CreateCredential(_a0 context.Context, _a1 *internalpb.CredentialInfo) (*commonpb.Status, error) { ret := _m.Called(_a0, _a1) if len(ret) == 0 { @@ -717,37 +715,37 @@ func (_m *RootCoord) CreateCredential(_a0 context.Context, _a1 *internalpb.Crede return r0, r1 } -// RootCoord_CreateCredential_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CreateCredential' -type RootCoord_CreateCredential_Call struct { +// MockRootCoord_CreateCredential_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CreateCredential' +type MockRootCoord_CreateCredential_Call struct { *mock.Call } // CreateCredential is a helper method to define mock.On call // - _a0 context.Context // - _a1 *internalpb.CredentialInfo -func (_e *RootCoord_Expecter) CreateCredential(_a0 interface{}, _a1 interface{}) *RootCoord_CreateCredential_Call { - return &RootCoord_CreateCredential_Call{Call: _e.mock.On("CreateCredential", _a0, _a1)} +func (_e *MockRootCoord_Expecter) CreateCredential(_a0 interface{}, _a1 interface{}) *MockRootCoord_CreateCredential_Call { + return &MockRootCoord_CreateCredential_Call{Call: _e.mock.On("CreateCredential", _a0, _a1)} } -func (_c *RootCoord_CreateCredential_Call) Run(run func(_a0 context.Context, _a1 *internalpb.CredentialInfo)) *RootCoord_CreateCredential_Call { +func (_c *MockRootCoord_CreateCredential_Call) Run(run func(_a0 context.Context, _a1 *internalpb.CredentialInfo)) *MockRootCoord_CreateCredential_Call { _c.Call.Run(func(args mock.Arguments) { run(args[0].(context.Context), args[1].(*internalpb.CredentialInfo)) }) return _c } -func (_c *RootCoord_CreateCredential_Call) Return(_a0 *commonpb.Status, _a1 error) *RootCoord_CreateCredential_Call { +func (_c *MockRootCoord_CreateCredential_Call) Return(_a0 *commonpb.Status, _a1 error) *MockRootCoord_CreateCredential_Call { _c.Call.Return(_a0, _a1) return _c } -func (_c *RootCoord_CreateCredential_Call) RunAndReturn(run func(context.Context, *internalpb.CredentialInfo) (*commonpb.Status, error)) *RootCoord_CreateCredential_Call { +func (_c *MockRootCoord_CreateCredential_Call) RunAndReturn(run func(context.Context, *internalpb.CredentialInfo) (*commonpb.Status, error)) *MockRootCoord_CreateCredential_Call { _c.Call.Return(run) return _c } // CreateDatabase provides a mock function with given fields: _a0, _a1 -func (_m *RootCoord) CreateDatabase(_a0 context.Context, _a1 *milvuspb.CreateDatabaseRequest) (*commonpb.Status, error) { +func (_m *MockRootCoord) CreateDatabase(_a0 context.Context, _a1 *milvuspb.CreateDatabaseRequest) (*commonpb.Status, error) { ret := _m.Called(_a0, _a1) if len(ret) == 0 { @@ -776,37 +774,37 @@ func (_m *RootCoord) CreateDatabase(_a0 context.Context, _a1 *milvuspb.CreateDat return r0, r1 } -// RootCoord_CreateDatabase_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CreateDatabase' -type RootCoord_CreateDatabase_Call struct { +// MockRootCoord_CreateDatabase_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CreateDatabase' +type MockRootCoord_CreateDatabase_Call struct { *mock.Call } // CreateDatabase is a helper method to define mock.On call // - _a0 context.Context // - _a1 *milvuspb.CreateDatabaseRequest -func (_e *RootCoord_Expecter) CreateDatabase(_a0 interface{}, _a1 interface{}) *RootCoord_CreateDatabase_Call { - return &RootCoord_CreateDatabase_Call{Call: _e.mock.On("CreateDatabase", _a0, _a1)} +func (_e *MockRootCoord_Expecter) CreateDatabase(_a0 interface{}, _a1 interface{}) *MockRootCoord_CreateDatabase_Call { + return &MockRootCoord_CreateDatabase_Call{Call: _e.mock.On("CreateDatabase", _a0, _a1)} } -func (_c *RootCoord_CreateDatabase_Call) Run(run func(_a0 context.Context, _a1 *milvuspb.CreateDatabaseRequest)) *RootCoord_CreateDatabase_Call { +func (_c *MockRootCoord_CreateDatabase_Call) Run(run func(_a0 context.Context, _a1 *milvuspb.CreateDatabaseRequest)) *MockRootCoord_CreateDatabase_Call { _c.Call.Run(func(args mock.Arguments) { run(args[0].(context.Context), args[1].(*milvuspb.CreateDatabaseRequest)) }) return _c } -func (_c *RootCoord_CreateDatabase_Call) Return(_a0 *commonpb.Status, _a1 error) *RootCoord_CreateDatabase_Call { +func (_c *MockRootCoord_CreateDatabase_Call) Return(_a0 *commonpb.Status, _a1 error) *MockRootCoord_CreateDatabase_Call { _c.Call.Return(_a0, _a1) return _c } -func (_c *RootCoord_CreateDatabase_Call) RunAndReturn(run func(context.Context, *milvuspb.CreateDatabaseRequest) (*commonpb.Status, error)) *RootCoord_CreateDatabase_Call { +func (_c *MockRootCoord_CreateDatabase_Call) RunAndReturn(run func(context.Context, *milvuspb.CreateDatabaseRequest) (*commonpb.Status, error)) *MockRootCoord_CreateDatabase_Call { _c.Call.Return(run) return _c } // CreatePartition provides a mock function with given fields: _a0, _a1 -func (_m *RootCoord) CreatePartition(_a0 context.Context, _a1 *milvuspb.CreatePartitionRequest) (*commonpb.Status, error) { +func (_m *MockRootCoord) CreatePartition(_a0 context.Context, _a1 *milvuspb.CreatePartitionRequest) (*commonpb.Status, error) { ret := _m.Called(_a0, _a1) if len(ret) == 0 { @@ -835,37 +833,37 @@ func (_m *RootCoord) CreatePartition(_a0 context.Context, _a1 *milvuspb.CreatePa return r0, r1 } -// RootCoord_CreatePartition_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CreatePartition' -type RootCoord_CreatePartition_Call struct { +// MockRootCoord_CreatePartition_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CreatePartition' +type MockRootCoord_CreatePartition_Call struct { *mock.Call } // CreatePartition is a helper method to define mock.On call // - _a0 context.Context // - _a1 *milvuspb.CreatePartitionRequest -func (_e *RootCoord_Expecter) CreatePartition(_a0 interface{}, _a1 interface{}) *RootCoord_CreatePartition_Call { - return &RootCoord_CreatePartition_Call{Call: _e.mock.On("CreatePartition", _a0, _a1)} +func (_e *MockRootCoord_Expecter) CreatePartition(_a0 interface{}, _a1 interface{}) *MockRootCoord_CreatePartition_Call { + return &MockRootCoord_CreatePartition_Call{Call: _e.mock.On("CreatePartition", _a0, _a1)} } -func (_c *RootCoord_CreatePartition_Call) Run(run func(_a0 context.Context, _a1 *milvuspb.CreatePartitionRequest)) *RootCoord_CreatePartition_Call { +func (_c *MockRootCoord_CreatePartition_Call) Run(run func(_a0 context.Context, _a1 *milvuspb.CreatePartitionRequest)) *MockRootCoord_CreatePartition_Call { _c.Call.Run(func(args mock.Arguments) { run(args[0].(context.Context), args[1].(*milvuspb.CreatePartitionRequest)) }) return _c } -func (_c *RootCoord_CreatePartition_Call) Return(_a0 *commonpb.Status, _a1 error) *RootCoord_CreatePartition_Call { +func (_c *MockRootCoord_CreatePartition_Call) Return(_a0 *commonpb.Status, _a1 error) *MockRootCoord_CreatePartition_Call { _c.Call.Return(_a0, _a1) return _c } -func (_c *RootCoord_CreatePartition_Call) RunAndReturn(run func(context.Context, *milvuspb.CreatePartitionRequest) (*commonpb.Status, error)) *RootCoord_CreatePartition_Call { +func (_c *MockRootCoord_CreatePartition_Call) RunAndReturn(run func(context.Context, *milvuspb.CreatePartitionRequest) (*commonpb.Status, error)) *MockRootCoord_CreatePartition_Call { _c.Call.Return(run) return _c } // CreatePrivilegeGroup provides a mock function with given fields: _a0, _a1 -func (_m *RootCoord) CreatePrivilegeGroup(_a0 context.Context, _a1 *milvuspb.CreatePrivilegeGroupRequest) (*commonpb.Status, error) { +func (_m *MockRootCoord) CreatePrivilegeGroup(_a0 context.Context, _a1 *milvuspb.CreatePrivilegeGroupRequest) (*commonpb.Status, error) { ret := _m.Called(_a0, _a1) if len(ret) == 0 { @@ -894,37 +892,37 @@ func (_m *RootCoord) CreatePrivilegeGroup(_a0 context.Context, _a1 *milvuspb.Cre return r0, r1 } -// RootCoord_CreatePrivilegeGroup_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CreatePrivilegeGroup' -type RootCoord_CreatePrivilegeGroup_Call struct { +// MockRootCoord_CreatePrivilegeGroup_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CreatePrivilegeGroup' +type MockRootCoord_CreatePrivilegeGroup_Call struct { *mock.Call } // CreatePrivilegeGroup is a helper method to define mock.On call // - _a0 context.Context // - _a1 *milvuspb.CreatePrivilegeGroupRequest -func (_e *RootCoord_Expecter) CreatePrivilegeGroup(_a0 interface{}, _a1 interface{}) *RootCoord_CreatePrivilegeGroup_Call { - return &RootCoord_CreatePrivilegeGroup_Call{Call: _e.mock.On("CreatePrivilegeGroup", _a0, _a1)} +func (_e *MockRootCoord_Expecter) CreatePrivilegeGroup(_a0 interface{}, _a1 interface{}) *MockRootCoord_CreatePrivilegeGroup_Call { + return &MockRootCoord_CreatePrivilegeGroup_Call{Call: _e.mock.On("CreatePrivilegeGroup", _a0, _a1)} } -func (_c *RootCoord_CreatePrivilegeGroup_Call) Run(run func(_a0 context.Context, _a1 *milvuspb.CreatePrivilegeGroupRequest)) *RootCoord_CreatePrivilegeGroup_Call { +func (_c *MockRootCoord_CreatePrivilegeGroup_Call) Run(run func(_a0 context.Context, _a1 *milvuspb.CreatePrivilegeGroupRequest)) *MockRootCoord_CreatePrivilegeGroup_Call { _c.Call.Run(func(args mock.Arguments) { run(args[0].(context.Context), args[1].(*milvuspb.CreatePrivilegeGroupRequest)) }) return _c } -func (_c *RootCoord_CreatePrivilegeGroup_Call) Return(_a0 *commonpb.Status, _a1 error) *RootCoord_CreatePrivilegeGroup_Call { +func (_c *MockRootCoord_CreatePrivilegeGroup_Call) Return(_a0 *commonpb.Status, _a1 error) *MockRootCoord_CreatePrivilegeGroup_Call { _c.Call.Return(_a0, _a1) return _c } -func (_c *RootCoord_CreatePrivilegeGroup_Call) RunAndReturn(run func(context.Context, *milvuspb.CreatePrivilegeGroupRequest) (*commonpb.Status, error)) *RootCoord_CreatePrivilegeGroup_Call { +func (_c *MockRootCoord_CreatePrivilegeGroup_Call) RunAndReturn(run func(context.Context, *milvuspb.CreatePrivilegeGroupRequest) (*commonpb.Status, error)) *MockRootCoord_CreatePrivilegeGroup_Call { _c.Call.Return(run) return _c } // CreateRole provides a mock function with given fields: _a0, _a1 -func (_m *RootCoord) CreateRole(_a0 context.Context, _a1 *milvuspb.CreateRoleRequest) (*commonpb.Status, error) { +func (_m *MockRootCoord) CreateRole(_a0 context.Context, _a1 *milvuspb.CreateRoleRequest) (*commonpb.Status, error) { ret := _m.Called(_a0, _a1) if len(ret) == 0 { @@ -953,37 +951,37 @@ func (_m *RootCoord) CreateRole(_a0 context.Context, _a1 *milvuspb.CreateRoleReq return r0, r1 } -// RootCoord_CreateRole_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CreateRole' -type RootCoord_CreateRole_Call struct { +// MockRootCoord_CreateRole_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CreateRole' +type MockRootCoord_CreateRole_Call struct { *mock.Call } // CreateRole is a helper method to define mock.On call // - _a0 context.Context // - _a1 *milvuspb.CreateRoleRequest -func (_e *RootCoord_Expecter) CreateRole(_a0 interface{}, _a1 interface{}) *RootCoord_CreateRole_Call { - return &RootCoord_CreateRole_Call{Call: _e.mock.On("CreateRole", _a0, _a1)} +func (_e *MockRootCoord_Expecter) CreateRole(_a0 interface{}, _a1 interface{}) *MockRootCoord_CreateRole_Call { + return &MockRootCoord_CreateRole_Call{Call: _e.mock.On("CreateRole", _a0, _a1)} } -func (_c *RootCoord_CreateRole_Call) Run(run func(_a0 context.Context, _a1 *milvuspb.CreateRoleRequest)) *RootCoord_CreateRole_Call { +func (_c *MockRootCoord_CreateRole_Call) Run(run func(_a0 context.Context, _a1 *milvuspb.CreateRoleRequest)) *MockRootCoord_CreateRole_Call { _c.Call.Run(func(args mock.Arguments) { run(args[0].(context.Context), args[1].(*milvuspb.CreateRoleRequest)) }) return _c } -func (_c *RootCoord_CreateRole_Call) Return(_a0 *commonpb.Status, _a1 error) *RootCoord_CreateRole_Call { +func (_c *MockRootCoord_CreateRole_Call) Return(_a0 *commonpb.Status, _a1 error) *MockRootCoord_CreateRole_Call { _c.Call.Return(_a0, _a1) return _c } -func (_c *RootCoord_CreateRole_Call) RunAndReturn(run func(context.Context, *milvuspb.CreateRoleRequest) (*commonpb.Status, error)) *RootCoord_CreateRole_Call { +func (_c *MockRootCoord_CreateRole_Call) RunAndReturn(run func(context.Context, *milvuspb.CreateRoleRequest) (*commonpb.Status, error)) *MockRootCoord_CreateRole_Call { _c.Call.Return(run) return _c } // DeleteCredential provides a mock function with given fields: _a0, _a1 -func (_m *RootCoord) DeleteCredential(_a0 context.Context, _a1 *milvuspb.DeleteCredentialRequest) (*commonpb.Status, error) { +func (_m *MockRootCoord) DeleteCredential(_a0 context.Context, _a1 *milvuspb.DeleteCredentialRequest) (*commonpb.Status, error) { ret := _m.Called(_a0, _a1) if len(ret) == 0 { @@ -1012,37 +1010,37 @@ func (_m *RootCoord) DeleteCredential(_a0 context.Context, _a1 *milvuspb.DeleteC return r0, r1 } -// RootCoord_DeleteCredential_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeleteCredential' -type RootCoord_DeleteCredential_Call struct { +// MockRootCoord_DeleteCredential_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeleteCredential' +type MockRootCoord_DeleteCredential_Call struct { *mock.Call } // DeleteCredential is a helper method to define mock.On call // - _a0 context.Context // - _a1 *milvuspb.DeleteCredentialRequest -func (_e *RootCoord_Expecter) DeleteCredential(_a0 interface{}, _a1 interface{}) *RootCoord_DeleteCredential_Call { - return &RootCoord_DeleteCredential_Call{Call: _e.mock.On("DeleteCredential", _a0, _a1)} +func (_e *MockRootCoord_Expecter) DeleteCredential(_a0 interface{}, _a1 interface{}) *MockRootCoord_DeleteCredential_Call { + return &MockRootCoord_DeleteCredential_Call{Call: _e.mock.On("DeleteCredential", _a0, _a1)} } -func (_c *RootCoord_DeleteCredential_Call) Run(run func(_a0 context.Context, _a1 *milvuspb.DeleteCredentialRequest)) *RootCoord_DeleteCredential_Call { +func (_c *MockRootCoord_DeleteCredential_Call) Run(run func(_a0 context.Context, _a1 *milvuspb.DeleteCredentialRequest)) *MockRootCoord_DeleteCredential_Call { _c.Call.Run(func(args mock.Arguments) { run(args[0].(context.Context), args[1].(*milvuspb.DeleteCredentialRequest)) }) return _c } -func (_c *RootCoord_DeleteCredential_Call) Return(_a0 *commonpb.Status, _a1 error) *RootCoord_DeleteCredential_Call { +func (_c *MockRootCoord_DeleteCredential_Call) Return(_a0 *commonpb.Status, _a1 error) *MockRootCoord_DeleteCredential_Call { _c.Call.Return(_a0, _a1) return _c } -func (_c *RootCoord_DeleteCredential_Call) RunAndReturn(run func(context.Context, *milvuspb.DeleteCredentialRequest) (*commonpb.Status, error)) *RootCoord_DeleteCredential_Call { +func (_c *MockRootCoord_DeleteCredential_Call) RunAndReturn(run func(context.Context, *milvuspb.DeleteCredentialRequest) (*commonpb.Status, error)) *MockRootCoord_DeleteCredential_Call { _c.Call.Return(run) return _c } // DescribeAlias provides a mock function with given fields: _a0, _a1 -func (_m *RootCoord) DescribeAlias(_a0 context.Context, _a1 *milvuspb.DescribeAliasRequest) (*milvuspb.DescribeAliasResponse, error) { +func (_m *MockRootCoord) DescribeAlias(_a0 context.Context, _a1 *milvuspb.DescribeAliasRequest) (*milvuspb.DescribeAliasResponse, error) { ret := _m.Called(_a0, _a1) if len(ret) == 0 { @@ -1071,37 +1069,37 @@ func (_m *RootCoord) DescribeAlias(_a0 context.Context, _a1 *milvuspb.DescribeAl return r0, r1 } -// RootCoord_DescribeAlias_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DescribeAlias' -type RootCoord_DescribeAlias_Call struct { +// MockRootCoord_DescribeAlias_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DescribeAlias' +type MockRootCoord_DescribeAlias_Call struct { *mock.Call } // DescribeAlias is a helper method to define mock.On call // - _a0 context.Context // - _a1 *milvuspb.DescribeAliasRequest -func (_e *RootCoord_Expecter) DescribeAlias(_a0 interface{}, _a1 interface{}) *RootCoord_DescribeAlias_Call { - return &RootCoord_DescribeAlias_Call{Call: _e.mock.On("DescribeAlias", _a0, _a1)} +func (_e *MockRootCoord_Expecter) DescribeAlias(_a0 interface{}, _a1 interface{}) *MockRootCoord_DescribeAlias_Call { + return &MockRootCoord_DescribeAlias_Call{Call: _e.mock.On("DescribeAlias", _a0, _a1)} } -func (_c *RootCoord_DescribeAlias_Call) Run(run func(_a0 context.Context, _a1 *milvuspb.DescribeAliasRequest)) *RootCoord_DescribeAlias_Call { +func (_c *MockRootCoord_DescribeAlias_Call) Run(run func(_a0 context.Context, _a1 *milvuspb.DescribeAliasRequest)) *MockRootCoord_DescribeAlias_Call { _c.Call.Run(func(args mock.Arguments) { run(args[0].(context.Context), args[1].(*milvuspb.DescribeAliasRequest)) }) return _c } -func (_c *RootCoord_DescribeAlias_Call) Return(_a0 *milvuspb.DescribeAliasResponse, _a1 error) *RootCoord_DescribeAlias_Call { +func (_c *MockRootCoord_DescribeAlias_Call) Return(_a0 *milvuspb.DescribeAliasResponse, _a1 error) *MockRootCoord_DescribeAlias_Call { _c.Call.Return(_a0, _a1) return _c } -func (_c *RootCoord_DescribeAlias_Call) RunAndReturn(run func(context.Context, *milvuspb.DescribeAliasRequest) (*milvuspb.DescribeAliasResponse, error)) *RootCoord_DescribeAlias_Call { +func (_c *MockRootCoord_DescribeAlias_Call) RunAndReturn(run func(context.Context, *milvuspb.DescribeAliasRequest) (*milvuspb.DescribeAliasResponse, error)) *MockRootCoord_DescribeAlias_Call { _c.Call.Return(run) return _c } // DescribeCollection provides a mock function with given fields: _a0, _a1 -func (_m *RootCoord) DescribeCollection(_a0 context.Context, _a1 *milvuspb.DescribeCollectionRequest) (*milvuspb.DescribeCollectionResponse, error) { +func (_m *MockRootCoord) DescribeCollection(_a0 context.Context, _a1 *milvuspb.DescribeCollectionRequest) (*milvuspb.DescribeCollectionResponse, error) { ret := _m.Called(_a0, _a1) if len(ret) == 0 { @@ -1130,37 +1128,37 @@ func (_m *RootCoord) DescribeCollection(_a0 context.Context, _a1 *milvuspb.Descr return r0, r1 } -// RootCoord_DescribeCollection_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DescribeCollection' -type RootCoord_DescribeCollection_Call struct { +// MockRootCoord_DescribeCollection_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DescribeCollection' +type MockRootCoord_DescribeCollection_Call struct { *mock.Call } // DescribeCollection is a helper method to define mock.On call // - _a0 context.Context // - _a1 *milvuspb.DescribeCollectionRequest -func (_e *RootCoord_Expecter) DescribeCollection(_a0 interface{}, _a1 interface{}) *RootCoord_DescribeCollection_Call { - return &RootCoord_DescribeCollection_Call{Call: _e.mock.On("DescribeCollection", _a0, _a1)} +func (_e *MockRootCoord_Expecter) DescribeCollection(_a0 interface{}, _a1 interface{}) *MockRootCoord_DescribeCollection_Call { + return &MockRootCoord_DescribeCollection_Call{Call: _e.mock.On("DescribeCollection", _a0, _a1)} } -func (_c *RootCoord_DescribeCollection_Call) Run(run func(_a0 context.Context, _a1 *milvuspb.DescribeCollectionRequest)) *RootCoord_DescribeCollection_Call { +func (_c *MockRootCoord_DescribeCollection_Call) Run(run func(_a0 context.Context, _a1 *milvuspb.DescribeCollectionRequest)) *MockRootCoord_DescribeCollection_Call { _c.Call.Run(func(args mock.Arguments) { run(args[0].(context.Context), args[1].(*milvuspb.DescribeCollectionRequest)) }) return _c } -func (_c *RootCoord_DescribeCollection_Call) Return(_a0 *milvuspb.DescribeCollectionResponse, _a1 error) *RootCoord_DescribeCollection_Call { +func (_c *MockRootCoord_DescribeCollection_Call) Return(_a0 *milvuspb.DescribeCollectionResponse, _a1 error) *MockRootCoord_DescribeCollection_Call { _c.Call.Return(_a0, _a1) return _c } -func (_c *RootCoord_DescribeCollection_Call) RunAndReturn(run func(context.Context, *milvuspb.DescribeCollectionRequest) (*milvuspb.DescribeCollectionResponse, error)) *RootCoord_DescribeCollection_Call { +func (_c *MockRootCoord_DescribeCollection_Call) RunAndReturn(run func(context.Context, *milvuspb.DescribeCollectionRequest) (*milvuspb.DescribeCollectionResponse, error)) *MockRootCoord_DescribeCollection_Call { _c.Call.Return(run) return _c } // DescribeCollectionInternal provides a mock function with given fields: _a0, _a1 -func (_m *RootCoord) DescribeCollectionInternal(_a0 context.Context, _a1 *milvuspb.DescribeCollectionRequest) (*milvuspb.DescribeCollectionResponse, error) { +func (_m *MockRootCoord) DescribeCollectionInternal(_a0 context.Context, _a1 *milvuspb.DescribeCollectionRequest) (*milvuspb.DescribeCollectionResponse, error) { ret := _m.Called(_a0, _a1) if len(ret) == 0 { @@ -1189,37 +1187,37 @@ func (_m *RootCoord) DescribeCollectionInternal(_a0 context.Context, _a1 *milvus return r0, r1 } -// RootCoord_DescribeCollectionInternal_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DescribeCollectionInternal' -type RootCoord_DescribeCollectionInternal_Call struct { +// MockRootCoord_DescribeCollectionInternal_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DescribeCollectionInternal' +type MockRootCoord_DescribeCollectionInternal_Call struct { *mock.Call } // DescribeCollectionInternal is a helper method to define mock.On call // - _a0 context.Context // - _a1 *milvuspb.DescribeCollectionRequest -func (_e *RootCoord_Expecter) DescribeCollectionInternal(_a0 interface{}, _a1 interface{}) *RootCoord_DescribeCollectionInternal_Call { - return &RootCoord_DescribeCollectionInternal_Call{Call: _e.mock.On("DescribeCollectionInternal", _a0, _a1)} +func (_e *MockRootCoord_Expecter) DescribeCollectionInternal(_a0 interface{}, _a1 interface{}) *MockRootCoord_DescribeCollectionInternal_Call { + return &MockRootCoord_DescribeCollectionInternal_Call{Call: _e.mock.On("DescribeCollectionInternal", _a0, _a1)} } -func (_c *RootCoord_DescribeCollectionInternal_Call) Run(run func(_a0 context.Context, _a1 *milvuspb.DescribeCollectionRequest)) *RootCoord_DescribeCollectionInternal_Call { +func (_c *MockRootCoord_DescribeCollectionInternal_Call) Run(run func(_a0 context.Context, _a1 *milvuspb.DescribeCollectionRequest)) *MockRootCoord_DescribeCollectionInternal_Call { _c.Call.Run(func(args mock.Arguments) { run(args[0].(context.Context), args[1].(*milvuspb.DescribeCollectionRequest)) }) return _c } -func (_c *RootCoord_DescribeCollectionInternal_Call) Return(_a0 *milvuspb.DescribeCollectionResponse, _a1 error) *RootCoord_DescribeCollectionInternal_Call { +func (_c *MockRootCoord_DescribeCollectionInternal_Call) Return(_a0 *milvuspb.DescribeCollectionResponse, _a1 error) *MockRootCoord_DescribeCollectionInternal_Call { _c.Call.Return(_a0, _a1) return _c } -func (_c *RootCoord_DescribeCollectionInternal_Call) RunAndReturn(run func(context.Context, *milvuspb.DescribeCollectionRequest) (*milvuspb.DescribeCollectionResponse, error)) *RootCoord_DescribeCollectionInternal_Call { +func (_c *MockRootCoord_DescribeCollectionInternal_Call) RunAndReturn(run func(context.Context, *milvuspb.DescribeCollectionRequest) (*milvuspb.DescribeCollectionResponse, error)) *MockRootCoord_DescribeCollectionInternal_Call { _c.Call.Return(run) return _c } // DescribeDatabase provides a mock function with given fields: _a0, _a1 -func (_m *RootCoord) DescribeDatabase(_a0 context.Context, _a1 *rootcoordpb.DescribeDatabaseRequest) (*rootcoordpb.DescribeDatabaseResponse, error) { +func (_m *MockRootCoord) DescribeDatabase(_a0 context.Context, _a1 *rootcoordpb.DescribeDatabaseRequest) (*rootcoordpb.DescribeDatabaseResponse, error) { ret := _m.Called(_a0, _a1) if len(ret) == 0 { @@ -1248,37 +1246,37 @@ func (_m *RootCoord) DescribeDatabase(_a0 context.Context, _a1 *rootcoordpb.Desc return r0, r1 } -// RootCoord_DescribeDatabase_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DescribeDatabase' -type RootCoord_DescribeDatabase_Call struct { +// MockRootCoord_DescribeDatabase_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DescribeDatabase' +type MockRootCoord_DescribeDatabase_Call struct { *mock.Call } // DescribeDatabase is a helper method to define mock.On call // - _a0 context.Context // - _a1 *rootcoordpb.DescribeDatabaseRequest -func (_e *RootCoord_Expecter) DescribeDatabase(_a0 interface{}, _a1 interface{}) *RootCoord_DescribeDatabase_Call { - return &RootCoord_DescribeDatabase_Call{Call: _e.mock.On("DescribeDatabase", _a0, _a1)} +func (_e *MockRootCoord_Expecter) DescribeDatabase(_a0 interface{}, _a1 interface{}) *MockRootCoord_DescribeDatabase_Call { + return &MockRootCoord_DescribeDatabase_Call{Call: _e.mock.On("DescribeDatabase", _a0, _a1)} } -func (_c *RootCoord_DescribeDatabase_Call) Run(run func(_a0 context.Context, _a1 *rootcoordpb.DescribeDatabaseRequest)) *RootCoord_DescribeDatabase_Call { +func (_c *MockRootCoord_DescribeDatabase_Call) Run(run func(_a0 context.Context, _a1 *rootcoordpb.DescribeDatabaseRequest)) *MockRootCoord_DescribeDatabase_Call { _c.Call.Run(func(args mock.Arguments) { run(args[0].(context.Context), args[1].(*rootcoordpb.DescribeDatabaseRequest)) }) return _c } -func (_c *RootCoord_DescribeDatabase_Call) Return(_a0 *rootcoordpb.DescribeDatabaseResponse, _a1 error) *RootCoord_DescribeDatabase_Call { +func (_c *MockRootCoord_DescribeDatabase_Call) Return(_a0 *rootcoordpb.DescribeDatabaseResponse, _a1 error) *MockRootCoord_DescribeDatabase_Call { _c.Call.Return(_a0, _a1) return _c } -func (_c *RootCoord_DescribeDatabase_Call) RunAndReturn(run func(context.Context, *rootcoordpb.DescribeDatabaseRequest) (*rootcoordpb.DescribeDatabaseResponse, error)) *RootCoord_DescribeDatabase_Call { +func (_c *MockRootCoord_DescribeDatabase_Call) RunAndReturn(run func(context.Context, *rootcoordpb.DescribeDatabaseRequest) (*rootcoordpb.DescribeDatabaseResponse, error)) *MockRootCoord_DescribeDatabase_Call { _c.Call.Return(run) return _c } // DropAlias provides a mock function with given fields: _a0, _a1 -func (_m *RootCoord) DropAlias(_a0 context.Context, _a1 *milvuspb.DropAliasRequest) (*commonpb.Status, error) { +func (_m *MockRootCoord) DropAlias(_a0 context.Context, _a1 *milvuspb.DropAliasRequest) (*commonpb.Status, error) { ret := _m.Called(_a0, _a1) if len(ret) == 0 { @@ -1307,37 +1305,37 @@ func (_m *RootCoord) DropAlias(_a0 context.Context, _a1 *milvuspb.DropAliasReque return r0, r1 } -// RootCoord_DropAlias_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DropAlias' -type RootCoord_DropAlias_Call struct { +// MockRootCoord_DropAlias_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DropAlias' +type MockRootCoord_DropAlias_Call struct { *mock.Call } // DropAlias is a helper method to define mock.On call // - _a0 context.Context // - _a1 *milvuspb.DropAliasRequest -func (_e *RootCoord_Expecter) DropAlias(_a0 interface{}, _a1 interface{}) *RootCoord_DropAlias_Call { - return &RootCoord_DropAlias_Call{Call: _e.mock.On("DropAlias", _a0, _a1)} +func (_e *MockRootCoord_Expecter) DropAlias(_a0 interface{}, _a1 interface{}) *MockRootCoord_DropAlias_Call { + return &MockRootCoord_DropAlias_Call{Call: _e.mock.On("DropAlias", _a0, _a1)} } -func (_c *RootCoord_DropAlias_Call) Run(run func(_a0 context.Context, _a1 *milvuspb.DropAliasRequest)) *RootCoord_DropAlias_Call { +func (_c *MockRootCoord_DropAlias_Call) Run(run func(_a0 context.Context, _a1 *milvuspb.DropAliasRequest)) *MockRootCoord_DropAlias_Call { _c.Call.Run(func(args mock.Arguments) { run(args[0].(context.Context), args[1].(*milvuspb.DropAliasRequest)) }) return _c } -func (_c *RootCoord_DropAlias_Call) Return(_a0 *commonpb.Status, _a1 error) *RootCoord_DropAlias_Call { +func (_c *MockRootCoord_DropAlias_Call) Return(_a0 *commonpb.Status, _a1 error) *MockRootCoord_DropAlias_Call { _c.Call.Return(_a0, _a1) return _c } -func (_c *RootCoord_DropAlias_Call) RunAndReturn(run func(context.Context, *milvuspb.DropAliasRequest) (*commonpb.Status, error)) *RootCoord_DropAlias_Call { +func (_c *MockRootCoord_DropAlias_Call) RunAndReturn(run func(context.Context, *milvuspb.DropAliasRequest) (*commonpb.Status, error)) *MockRootCoord_DropAlias_Call { _c.Call.Return(run) return _c } // DropCollection provides a mock function with given fields: _a0, _a1 -func (_m *RootCoord) DropCollection(_a0 context.Context, _a1 *milvuspb.DropCollectionRequest) (*commonpb.Status, error) { +func (_m *MockRootCoord) DropCollection(_a0 context.Context, _a1 *milvuspb.DropCollectionRequest) (*commonpb.Status, error) { ret := _m.Called(_a0, _a1) if len(ret) == 0 { @@ -1366,37 +1364,37 @@ func (_m *RootCoord) DropCollection(_a0 context.Context, _a1 *milvuspb.DropColle return r0, r1 } -// RootCoord_DropCollection_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DropCollection' -type RootCoord_DropCollection_Call struct { +// MockRootCoord_DropCollection_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DropCollection' +type MockRootCoord_DropCollection_Call struct { *mock.Call } // DropCollection is a helper method to define mock.On call // - _a0 context.Context // - _a1 *milvuspb.DropCollectionRequest -func (_e *RootCoord_Expecter) DropCollection(_a0 interface{}, _a1 interface{}) *RootCoord_DropCollection_Call { - return &RootCoord_DropCollection_Call{Call: _e.mock.On("DropCollection", _a0, _a1)} +func (_e *MockRootCoord_Expecter) DropCollection(_a0 interface{}, _a1 interface{}) *MockRootCoord_DropCollection_Call { + return &MockRootCoord_DropCollection_Call{Call: _e.mock.On("DropCollection", _a0, _a1)} } -func (_c *RootCoord_DropCollection_Call) Run(run func(_a0 context.Context, _a1 *milvuspb.DropCollectionRequest)) *RootCoord_DropCollection_Call { +func (_c *MockRootCoord_DropCollection_Call) Run(run func(_a0 context.Context, _a1 *milvuspb.DropCollectionRequest)) *MockRootCoord_DropCollection_Call { _c.Call.Run(func(args mock.Arguments) { run(args[0].(context.Context), args[1].(*milvuspb.DropCollectionRequest)) }) return _c } -func (_c *RootCoord_DropCollection_Call) Return(_a0 *commonpb.Status, _a1 error) *RootCoord_DropCollection_Call { +func (_c *MockRootCoord_DropCollection_Call) Return(_a0 *commonpb.Status, _a1 error) *MockRootCoord_DropCollection_Call { _c.Call.Return(_a0, _a1) return _c } -func (_c *RootCoord_DropCollection_Call) RunAndReturn(run func(context.Context, *milvuspb.DropCollectionRequest) (*commonpb.Status, error)) *RootCoord_DropCollection_Call { +func (_c *MockRootCoord_DropCollection_Call) RunAndReturn(run func(context.Context, *milvuspb.DropCollectionRequest) (*commonpb.Status, error)) *MockRootCoord_DropCollection_Call { _c.Call.Return(run) return _c } // DropDatabase provides a mock function with given fields: _a0, _a1 -func (_m *RootCoord) DropDatabase(_a0 context.Context, _a1 *milvuspb.DropDatabaseRequest) (*commonpb.Status, error) { +func (_m *MockRootCoord) DropDatabase(_a0 context.Context, _a1 *milvuspb.DropDatabaseRequest) (*commonpb.Status, error) { ret := _m.Called(_a0, _a1) if len(ret) == 0 { @@ -1425,37 +1423,37 @@ func (_m *RootCoord) DropDatabase(_a0 context.Context, _a1 *milvuspb.DropDatabas return r0, r1 } -// RootCoord_DropDatabase_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DropDatabase' -type RootCoord_DropDatabase_Call struct { +// MockRootCoord_DropDatabase_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DropDatabase' +type MockRootCoord_DropDatabase_Call struct { *mock.Call } // DropDatabase is a helper method to define mock.On call // - _a0 context.Context // - _a1 *milvuspb.DropDatabaseRequest -func (_e *RootCoord_Expecter) DropDatabase(_a0 interface{}, _a1 interface{}) *RootCoord_DropDatabase_Call { - return &RootCoord_DropDatabase_Call{Call: _e.mock.On("DropDatabase", _a0, _a1)} +func (_e *MockRootCoord_Expecter) DropDatabase(_a0 interface{}, _a1 interface{}) *MockRootCoord_DropDatabase_Call { + return &MockRootCoord_DropDatabase_Call{Call: _e.mock.On("DropDatabase", _a0, _a1)} } -func (_c *RootCoord_DropDatabase_Call) Run(run func(_a0 context.Context, _a1 *milvuspb.DropDatabaseRequest)) *RootCoord_DropDatabase_Call { +func (_c *MockRootCoord_DropDatabase_Call) Run(run func(_a0 context.Context, _a1 *milvuspb.DropDatabaseRequest)) *MockRootCoord_DropDatabase_Call { _c.Call.Run(func(args mock.Arguments) { run(args[0].(context.Context), args[1].(*milvuspb.DropDatabaseRequest)) }) return _c } -func (_c *RootCoord_DropDatabase_Call) Return(_a0 *commonpb.Status, _a1 error) *RootCoord_DropDatabase_Call { +func (_c *MockRootCoord_DropDatabase_Call) Return(_a0 *commonpb.Status, _a1 error) *MockRootCoord_DropDatabase_Call { _c.Call.Return(_a0, _a1) return _c } -func (_c *RootCoord_DropDatabase_Call) RunAndReturn(run func(context.Context, *milvuspb.DropDatabaseRequest) (*commonpb.Status, error)) *RootCoord_DropDatabase_Call { +func (_c *MockRootCoord_DropDatabase_Call) RunAndReturn(run func(context.Context, *milvuspb.DropDatabaseRequest) (*commonpb.Status, error)) *MockRootCoord_DropDatabase_Call { _c.Call.Return(run) return _c } // DropPartition provides a mock function with given fields: _a0, _a1 -func (_m *RootCoord) DropPartition(_a0 context.Context, _a1 *milvuspb.DropPartitionRequest) (*commonpb.Status, error) { +func (_m *MockRootCoord) DropPartition(_a0 context.Context, _a1 *milvuspb.DropPartitionRequest) (*commonpb.Status, error) { ret := _m.Called(_a0, _a1) if len(ret) == 0 { @@ -1484,37 +1482,37 @@ func (_m *RootCoord) DropPartition(_a0 context.Context, _a1 *milvuspb.DropPartit return r0, r1 } -// RootCoord_DropPartition_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DropPartition' -type RootCoord_DropPartition_Call struct { +// MockRootCoord_DropPartition_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DropPartition' +type MockRootCoord_DropPartition_Call struct { *mock.Call } // DropPartition is a helper method to define mock.On call // - _a0 context.Context // - _a1 *milvuspb.DropPartitionRequest -func (_e *RootCoord_Expecter) DropPartition(_a0 interface{}, _a1 interface{}) *RootCoord_DropPartition_Call { - return &RootCoord_DropPartition_Call{Call: _e.mock.On("DropPartition", _a0, _a1)} +func (_e *MockRootCoord_Expecter) DropPartition(_a0 interface{}, _a1 interface{}) *MockRootCoord_DropPartition_Call { + return &MockRootCoord_DropPartition_Call{Call: _e.mock.On("DropPartition", _a0, _a1)} } -func (_c *RootCoord_DropPartition_Call) Run(run func(_a0 context.Context, _a1 *milvuspb.DropPartitionRequest)) *RootCoord_DropPartition_Call { +func (_c *MockRootCoord_DropPartition_Call) Run(run func(_a0 context.Context, _a1 *milvuspb.DropPartitionRequest)) *MockRootCoord_DropPartition_Call { _c.Call.Run(func(args mock.Arguments) { run(args[0].(context.Context), args[1].(*milvuspb.DropPartitionRequest)) }) return _c } -func (_c *RootCoord_DropPartition_Call) Return(_a0 *commonpb.Status, _a1 error) *RootCoord_DropPartition_Call { +func (_c *MockRootCoord_DropPartition_Call) Return(_a0 *commonpb.Status, _a1 error) *MockRootCoord_DropPartition_Call { _c.Call.Return(_a0, _a1) return _c } -func (_c *RootCoord_DropPartition_Call) RunAndReturn(run func(context.Context, *milvuspb.DropPartitionRequest) (*commonpb.Status, error)) *RootCoord_DropPartition_Call { +func (_c *MockRootCoord_DropPartition_Call) RunAndReturn(run func(context.Context, *milvuspb.DropPartitionRequest) (*commonpb.Status, error)) *MockRootCoord_DropPartition_Call { _c.Call.Return(run) return _c } // DropPrivilegeGroup provides a mock function with given fields: _a0, _a1 -func (_m *RootCoord) DropPrivilegeGroup(_a0 context.Context, _a1 *milvuspb.DropPrivilegeGroupRequest) (*commonpb.Status, error) { +func (_m *MockRootCoord) DropPrivilegeGroup(_a0 context.Context, _a1 *milvuspb.DropPrivilegeGroupRequest) (*commonpb.Status, error) { ret := _m.Called(_a0, _a1) if len(ret) == 0 { @@ -1543,37 +1541,37 @@ func (_m *RootCoord) DropPrivilegeGroup(_a0 context.Context, _a1 *milvuspb.DropP return r0, r1 } -// RootCoord_DropPrivilegeGroup_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DropPrivilegeGroup' -type RootCoord_DropPrivilegeGroup_Call struct { +// MockRootCoord_DropPrivilegeGroup_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DropPrivilegeGroup' +type MockRootCoord_DropPrivilegeGroup_Call struct { *mock.Call } // DropPrivilegeGroup is a helper method to define mock.On call // - _a0 context.Context // - _a1 *milvuspb.DropPrivilegeGroupRequest -func (_e *RootCoord_Expecter) DropPrivilegeGroup(_a0 interface{}, _a1 interface{}) *RootCoord_DropPrivilegeGroup_Call { - return &RootCoord_DropPrivilegeGroup_Call{Call: _e.mock.On("DropPrivilegeGroup", _a0, _a1)} +func (_e *MockRootCoord_Expecter) DropPrivilegeGroup(_a0 interface{}, _a1 interface{}) *MockRootCoord_DropPrivilegeGroup_Call { + return &MockRootCoord_DropPrivilegeGroup_Call{Call: _e.mock.On("DropPrivilegeGroup", _a0, _a1)} } -func (_c *RootCoord_DropPrivilegeGroup_Call) Run(run func(_a0 context.Context, _a1 *milvuspb.DropPrivilegeGroupRequest)) *RootCoord_DropPrivilegeGroup_Call { +func (_c *MockRootCoord_DropPrivilegeGroup_Call) Run(run func(_a0 context.Context, _a1 *milvuspb.DropPrivilegeGroupRequest)) *MockRootCoord_DropPrivilegeGroup_Call { _c.Call.Run(func(args mock.Arguments) { run(args[0].(context.Context), args[1].(*milvuspb.DropPrivilegeGroupRequest)) }) return _c } -func (_c *RootCoord_DropPrivilegeGroup_Call) Return(_a0 *commonpb.Status, _a1 error) *RootCoord_DropPrivilegeGroup_Call { +func (_c *MockRootCoord_DropPrivilegeGroup_Call) Return(_a0 *commonpb.Status, _a1 error) *MockRootCoord_DropPrivilegeGroup_Call { _c.Call.Return(_a0, _a1) return _c } -func (_c *RootCoord_DropPrivilegeGroup_Call) RunAndReturn(run func(context.Context, *milvuspb.DropPrivilegeGroupRequest) (*commonpb.Status, error)) *RootCoord_DropPrivilegeGroup_Call { +func (_c *MockRootCoord_DropPrivilegeGroup_Call) RunAndReturn(run func(context.Context, *milvuspb.DropPrivilegeGroupRequest) (*commonpb.Status, error)) *MockRootCoord_DropPrivilegeGroup_Call { _c.Call.Return(run) return _c } // DropRole provides a mock function with given fields: _a0, _a1 -func (_m *RootCoord) DropRole(_a0 context.Context, _a1 *milvuspb.DropRoleRequest) (*commonpb.Status, error) { +func (_m *MockRootCoord) DropRole(_a0 context.Context, _a1 *milvuspb.DropRoleRequest) (*commonpb.Status, error) { ret := _m.Called(_a0, _a1) if len(ret) == 0 { @@ -1602,37 +1600,37 @@ func (_m *RootCoord) DropRole(_a0 context.Context, _a1 *milvuspb.DropRoleRequest return r0, r1 } -// RootCoord_DropRole_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DropRole' -type RootCoord_DropRole_Call struct { +// MockRootCoord_DropRole_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DropRole' +type MockRootCoord_DropRole_Call struct { *mock.Call } // DropRole is a helper method to define mock.On call // - _a0 context.Context // - _a1 *milvuspb.DropRoleRequest -func (_e *RootCoord_Expecter) DropRole(_a0 interface{}, _a1 interface{}) *RootCoord_DropRole_Call { - return &RootCoord_DropRole_Call{Call: _e.mock.On("DropRole", _a0, _a1)} +func (_e *MockRootCoord_Expecter) DropRole(_a0 interface{}, _a1 interface{}) *MockRootCoord_DropRole_Call { + return &MockRootCoord_DropRole_Call{Call: _e.mock.On("DropRole", _a0, _a1)} } -func (_c *RootCoord_DropRole_Call) Run(run func(_a0 context.Context, _a1 *milvuspb.DropRoleRequest)) *RootCoord_DropRole_Call { +func (_c *MockRootCoord_DropRole_Call) Run(run func(_a0 context.Context, _a1 *milvuspb.DropRoleRequest)) *MockRootCoord_DropRole_Call { _c.Call.Run(func(args mock.Arguments) { run(args[0].(context.Context), args[1].(*milvuspb.DropRoleRequest)) }) return _c } -func (_c *RootCoord_DropRole_Call) Return(_a0 *commonpb.Status, _a1 error) *RootCoord_DropRole_Call { +func (_c *MockRootCoord_DropRole_Call) Return(_a0 *commonpb.Status, _a1 error) *MockRootCoord_DropRole_Call { _c.Call.Return(_a0, _a1) return _c } -func (_c *RootCoord_DropRole_Call) RunAndReturn(run func(context.Context, *milvuspb.DropRoleRequest) (*commonpb.Status, error)) *RootCoord_DropRole_Call { +func (_c *MockRootCoord_DropRole_Call) RunAndReturn(run func(context.Context, *milvuspb.DropRoleRequest) (*commonpb.Status, error)) *MockRootCoord_DropRole_Call { _c.Call.Return(run) return _c } // GetComponentStates provides a mock function with given fields: _a0, _a1 -func (_m *RootCoord) GetComponentStates(_a0 context.Context, _a1 *milvuspb.GetComponentStatesRequest) (*milvuspb.ComponentStates, error) { +func (_m *MockRootCoord) GetComponentStates(_a0 context.Context, _a1 *milvuspb.GetComponentStatesRequest) (*milvuspb.ComponentStates, error) { ret := _m.Called(_a0, _a1) if len(ret) == 0 { @@ -1661,37 +1659,37 @@ func (_m *RootCoord) GetComponentStates(_a0 context.Context, _a1 *milvuspb.GetCo return r0, r1 } -// RootCoord_GetComponentStates_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetComponentStates' -type RootCoord_GetComponentStates_Call struct { +// MockRootCoord_GetComponentStates_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetComponentStates' +type MockRootCoord_GetComponentStates_Call struct { *mock.Call } // GetComponentStates is a helper method to define mock.On call // - _a0 context.Context // - _a1 *milvuspb.GetComponentStatesRequest -func (_e *RootCoord_Expecter) GetComponentStates(_a0 interface{}, _a1 interface{}) *RootCoord_GetComponentStates_Call { - return &RootCoord_GetComponentStates_Call{Call: _e.mock.On("GetComponentStates", _a0, _a1)} +func (_e *MockRootCoord_Expecter) GetComponentStates(_a0 interface{}, _a1 interface{}) *MockRootCoord_GetComponentStates_Call { + return &MockRootCoord_GetComponentStates_Call{Call: _e.mock.On("GetComponentStates", _a0, _a1)} } -func (_c *RootCoord_GetComponentStates_Call) Run(run func(_a0 context.Context, _a1 *milvuspb.GetComponentStatesRequest)) *RootCoord_GetComponentStates_Call { +func (_c *MockRootCoord_GetComponentStates_Call) Run(run func(_a0 context.Context, _a1 *milvuspb.GetComponentStatesRequest)) *MockRootCoord_GetComponentStates_Call { _c.Call.Run(func(args mock.Arguments) { run(args[0].(context.Context), args[1].(*milvuspb.GetComponentStatesRequest)) }) return _c } -func (_c *RootCoord_GetComponentStates_Call) Return(_a0 *milvuspb.ComponentStates, _a1 error) *RootCoord_GetComponentStates_Call { +func (_c *MockRootCoord_GetComponentStates_Call) Return(_a0 *milvuspb.ComponentStates, _a1 error) *MockRootCoord_GetComponentStates_Call { _c.Call.Return(_a0, _a1) return _c } -func (_c *RootCoord_GetComponentStates_Call) RunAndReturn(run func(context.Context, *milvuspb.GetComponentStatesRequest) (*milvuspb.ComponentStates, error)) *RootCoord_GetComponentStates_Call { +func (_c *MockRootCoord_GetComponentStates_Call) RunAndReturn(run func(context.Context, *milvuspb.GetComponentStatesRequest) (*milvuspb.ComponentStates, error)) *MockRootCoord_GetComponentStates_Call { _c.Call.Return(run) return _c } // GetCredential provides a mock function with given fields: _a0, _a1 -func (_m *RootCoord) GetCredential(_a0 context.Context, _a1 *rootcoordpb.GetCredentialRequest) (*rootcoordpb.GetCredentialResponse, error) { +func (_m *MockRootCoord) GetCredential(_a0 context.Context, _a1 *rootcoordpb.GetCredentialRequest) (*rootcoordpb.GetCredentialResponse, error) { ret := _m.Called(_a0, _a1) if len(ret) == 0 { @@ -1720,37 +1718,37 @@ func (_m *RootCoord) GetCredential(_a0 context.Context, _a1 *rootcoordpb.GetCred return r0, r1 } -// RootCoord_GetCredential_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetCredential' -type RootCoord_GetCredential_Call struct { +// MockRootCoord_GetCredential_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetCredential' +type MockRootCoord_GetCredential_Call struct { *mock.Call } // GetCredential is a helper method to define mock.On call // - _a0 context.Context // - _a1 *rootcoordpb.GetCredentialRequest -func (_e *RootCoord_Expecter) GetCredential(_a0 interface{}, _a1 interface{}) *RootCoord_GetCredential_Call { - return &RootCoord_GetCredential_Call{Call: _e.mock.On("GetCredential", _a0, _a1)} +func (_e *MockRootCoord_Expecter) GetCredential(_a0 interface{}, _a1 interface{}) *MockRootCoord_GetCredential_Call { + return &MockRootCoord_GetCredential_Call{Call: _e.mock.On("GetCredential", _a0, _a1)} } -func (_c *RootCoord_GetCredential_Call) Run(run func(_a0 context.Context, _a1 *rootcoordpb.GetCredentialRequest)) *RootCoord_GetCredential_Call { +func (_c *MockRootCoord_GetCredential_Call) Run(run func(_a0 context.Context, _a1 *rootcoordpb.GetCredentialRequest)) *MockRootCoord_GetCredential_Call { _c.Call.Run(func(args mock.Arguments) { run(args[0].(context.Context), args[1].(*rootcoordpb.GetCredentialRequest)) }) return _c } -func (_c *RootCoord_GetCredential_Call) Return(_a0 *rootcoordpb.GetCredentialResponse, _a1 error) *RootCoord_GetCredential_Call { +func (_c *MockRootCoord_GetCredential_Call) Return(_a0 *rootcoordpb.GetCredentialResponse, _a1 error) *MockRootCoord_GetCredential_Call { _c.Call.Return(_a0, _a1) return _c } -func (_c *RootCoord_GetCredential_Call) RunAndReturn(run func(context.Context, *rootcoordpb.GetCredentialRequest) (*rootcoordpb.GetCredentialResponse, error)) *RootCoord_GetCredential_Call { +func (_c *MockRootCoord_GetCredential_Call) RunAndReturn(run func(context.Context, *rootcoordpb.GetCredentialRequest) (*rootcoordpb.GetCredentialResponse, error)) *MockRootCoord_GetCredential_Call { _c.Call.Return(run) return _c } // GetMetrics provides a mock function with given fields: ctx, req -func (_m *RootCoord) GetMetrics(ctx context.Context, req *milvuspb.GetMetricsRequest) (*milvuspb.GetMetricsResponse, error) { +func (_m *MockRootCoord) GetMetrics(ctx context.Context, req *milvuspb.GetMetricsRequest) (*milvuspb.GetMetricsResponse, error) { ret := _m.Called(ctx, req) if len(ret) == 0 { @@ -1779,37 +1777,37 @@ func (_m *RootCoord) GetMetrics(ctx context.Context, req *milvuspb.GetMetricsReq return r0, r1 } -// RootCoord_GetMetrics_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetMetrics' -type RootCoord_GetMetrics_Call struct { +// MockRootCoord_GetMetrics_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetMetrics' +type MockRootCoord_GetMetrics_Call struct { *mock.Call } // GetMetrics is a helper method to define mock.On call // - ctx context.Context // - req *milvuspb.GetMetricsRequest -func (_e *RootCoord_Expecter) GetMetrics(ctx interface{}, req interface{}) *RootCoord_GetMetrics_Call { - return &RootCoord_GetMetrics_Call{Call: _e.mock.On("GetMetrics", ctx, req)} +func (_e *MockRootCoord_Expecter) GetMetrics(ctx interface{}, req interface{}) *MockRootCoord_GetMetrics_Call { + return &MockRootCoord_GetMetrics_Call{Call: _e.mock.On("GetMetrics", ctx, req)} } -func (_c *RootCoord_GetMetrics_Call) Run(run func(ctx context.Context, req *milvuspb.GetMetricsRequest)) *RootCoord_GetMetrics_Call { +func (_c *MockRootCoord_GetMetrics_Call) Run(run func(ctx context.Context, req *milvuspb.GetMetricsRequest)) *MockRootCoord_GetMetrics_Call { _c.Call.Run(func(args mock.Arguments) { run(args[0].(context.Context), args[1].(*milvuspb.GetMetricsRequest)) }) return _c } -func (_c *RootCoord_GetMetrics_Call) Return(_a0 *milvuspb.GetMetricsResponse, _a1 error) *RootCoord_GetMetrics_Call { +func (_c *MockRootCoord_GetMetrics_Call) Return(_a0 *milvuspb.GetMetricsResponse, _a1 error) *MockRootCoord_GetMetrics_Call { _c.Call.Return(_a0, _a1) return _c } -func (_c *RootCoord_GetMetrics_Call) RunAndReturn(run func(context.Context, *milvuspb.GetMetricsRequest) (*milvuspb.GetMetricsResponse, error)) *RootCoord_GetMetrics_Call { +func (_c *MockRootCoord_GetMetrics_Call) RunAndReturn(run func(context.Context, *milvuspb.GetMetricsRequest) (*milvuspb.GetMetricsResponse, error)) *MockRootCoord_GetMetrics_Call { _c.Call.Return(run) return _c } // GetPChannelInfo provides a mock function with given fields: _a0, _a1 -func (_m *RootCoord) GetPChannelInfo(_a0 context.Context, _a1 *rootcoordpb.GetPChannelInfoRequest) (*rootcoordpb.GetPChannelInfoResponse, error) { +func (_m *MockRootCoord) GetPChannelInfo(_a0 context.Context, _a1 *rootcoordpb.GetPChannelInfoRequest) (*rootcoordpb.GetPChannelInfoResponse, error) { ret := _m.Called(_a0, _a1) if len(ret) == 0 { @@ -1838,37 +1836,96 @@ func (_m *RootCoord) GetPChannelInfo(_a0 context.Context, _a1 *rootcoordpb.GetPC return r0, r1 } -// RootCoord_GetPChannelInfo_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetPChannelInfo' -type RootCoord_GetPChannelInfo_Call struct { +// MockRootCoord_GetPChannelInfo_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetPChannelInfo' +type MockRootCoord_GetPChannelInfo_Call struct { *mock.Call } // GetPChannelInfo is a helper method to define mock.On call // - _a0 context.Context // - _a1 *rootcoordpb.GetPChannelInfoRequest -func (_e *RootCoord_Expecter) GetPChannelInfo(_a0 interface{}, _a1 interface{}) *RootCoord_GetPChannelInfo_Call { - return &RootCoord_GetPChannelInfo_Call{Call: _e.mock.On("GetPChannelInfo", _a0, _a1)} +func (_e *MockRootCoord_Expecter) GetPChannelInfo(_a0 interface{}, _a1 interface{}) *MockRootCoord_GetPChannelInfo_Call { + return &MockRootCoord_GetPChannelInfo_Call{Call: _e.mock.On("GetPChannelInfo", _a0, _a1)} } -func (_c *RootCoord_GetPChannelInfo_Call) Run(run func(_a0 context.Context, _a1 *rootcoordpb.GetPChannelInfoRequest)) *RootCoord_GetPChannelInfo_Call { +func (_c *MockRootCoord_GetPChannelInfo_Call) Run(run func(_a0 context.Context, _a1 *rootcoordpb.GetPChannelInfoRequest)) *MockRootCoord_GetPChannelInfo_Call { _c.Call.Run(func(args mock.Arguments) { run(args[0].(context.Context), args[1].(*rootcoordpb.GetPChannelInfoRequest)) }) return _c } -func (_c *RootCoord_GetPChannelInfo_Call) Return(_a0 *rootcoordpb.GetPChannelInfoResponse, _a1 error) *RootCoord_GetPChannelInfo_Call { +func (_c *MockRootCoord_GetPChannelInfo_Call) Return(_a0 *rootcoordpb.GetPChannelInfoResponse, _a1 error) *MockRootCoord_GetPChannelInfo_Call { _c.Call.Return(_a0, _a1) return _c } -func (_c *RootCoord_GetPChannelInfo_Call) RunAndReturn(run func(context.Context, *rootcoordpb.GetPChannelInfoRequest) (*rootcoordpb.GetPChannelInfoResponse, error)) *RootCoord_GetPChannelInfo_Call { +func (_c *MockRootCoord_GetPChannelInfo_Call) RunAndReturn(run func(context.Context, *rootcoordpb.GetPChannelInfoRequest) (*rootcoordpb.GetPChannelInfoResponse, error)) *MockRootCoord_GetPChannelInfo_Call { + _c.Call.Return(run) + return _c +} + +// GetQuotaMetrics provides a mock function with given fields: _a0, _a1 +func (_m *MockRootCoord) GetQuotaMetrics(_a0 context.Context, _a1 *internalpb.GetQuotaMetricsRequest) (*internalpb.GetQuotaMetricsResponse, error) { + ret := _m.Called(_a0, _a1) + + if len(ret) == 0 { + panic("no return value specified for GetQuotaMetrics") + } + + var r0 *internalpb.GetQuotaMetricsResponse + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, *internalpb.GetQuotaMetricsRequest) (*internalpb.GetQuotaMetricsResponse, error)); ok { + return rf(_a0, _a1) + } + if rf, ok := ret.Get(0).(func(context.Context, *internalpb.GetQuotaMetricsRequest) *internalpb.GetQuotaMetricsResponse); ok { + r0 = rf(_a0, _a1) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*internalpb.GetQuotaMetricsResponse) + } + } + + if rf, ok := ret.Get(1).(func(context.Context, *internalpb.GetQuotaMetricsRequest) error); ok { + r1 = rf(_a0, _a1) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// MockRootCoord_GetQuotaMetrics_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetQuotaMetrics' +type MockRootCoord_GetQuotaMetrics_Call struct { + *mock.Call +} + +// GetQuotaMetrics is a helper method to define mock.On call +// - _a0 context.Context +// - _a1 *internalpb.GetQuotaMetricsRequest +func (_e *MockRootCoord_Expecter) GetQuotaMetrics(_a0 interface{}, _a1 interface{}) *MockRootCoord_GetQuotaMetrics_Call { + return &MockRootCoord_GetQuotaMetrics_Call{Call: _e.mock.On("GetQuotaMetrics", _a0, _a1)} +} + +func (_c *MockRootCoord_GetQuotaMetrics_Call) Run(run func(_a0 context.Context, _a1 *internalpb.GetQuotaMetricsRequest)) *MockRootCoord_GetQuotaMetrics_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(*internalpb.GetQuotaMetricsRequest)) + }) + return _c +} + +func (_c *MockRootCoord_GetQuotaMetrics_Call) Return(_a0 *internalpb.GetQuotaMetricsResponse, _a1 error) *MockRootCoord_GetQuotaMetrics_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *MockRootCoord_GetQuotaMetrics_Call) RunAndReturn(run func(context.Context, *internalpb.GetQuotaMetricsRequest) (*internalpb.GetQuotaMetricsResponse, error)) *MockRootCoord_GetQuotaMetrics_Call { _c.Call.Return(run) return _c } // GetStatisticsChannel provides a mock function with given fields: _a0, _a1 -func (_m *RootCoord) GetStatisticsChannel(_a0 context.Context, _a1 *internalpb.GetStatisticsChannelRequest) (*milvuspb.StringResponse, error) { +func (_m *MockRootCoord) GetStatisticsChannel(_a0 context.Context, _a1 *internalpb.GetStatisticsChannelRequest) (*milvuspb.StringResponse, error) { ret := _m.Called(_a0, _a1) if len(ret) == 0 { @@ -1897,37 +1954,37 @@ func (_m *RootCoord) GetStatisticsChannel(_a0 context.Context, _a1 *internalpb.G return r0, r1 } -// RootCoord_GetStatisticsChannel_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetStatisticsChannel' -type RootCoord_GetStatisticsChannel_Call struct { +// MockRootCoord_GetStatisticsChannel_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetStatisticsChannel' +type MockRootCoord_GetStatisticsChannel_Call struct { *mock.Call } // GetStatisticsChannel is a helper method to define mock.On call // - _a0 context.Context // - _a1 *internalpb.GetStatisticsChannelRequest -func (_e *RootCoord_Expecter) GetStatisticsChannel(_a0 interface{}, _a1 interface{}) *RootCoord_GetStatisticsChannel_Call { - return &RootCoord_GetStatisticsChannel_Call{Call: _e.mock.On("GetStatisticsChannel", _a0, _a1)} +func (_e *MockRootCoord_Expecter) GetStatisticsChannel(_a0 interface{}, _a1 interface{}) *MockRootCoord_GetStatisticsChannel_Call { + return &MockRootCoord_GetStatisticsChannel_Call{Call: _e.mock.On("GetStatisticsChannel", _a0, _a1)} } -func (_c *RootCoord_GetStatisticsChannel_Call) Run(run func(_a0 context.Context, _a1 *internalpb.GetStatisticsChannelRequest)) *RootCoord_GetStatisticsChannel_Call { +func (_c *MockRootCoord_GetStatisticsChannel_Call) Run(run func(_a0 context.Context, _a1 *internalpb.GetStatisticsChannelRequest)) *MockRootCoord_GetStatisticsChannel_Call { _c.Call.Run(func(args mock.Arguments) { run(args[0].(context.Context), args[1].(*internalpb.GetStatisticsChannelRequest)) }) return _c } -func (_c *RootCoord_GetStatisticsChannel_Call) Return(_a0 *milvuspb.StringResponse, _a1 error) *RootCoord_GetStatisticsChannel_Call { +func (_c *MockRootCoord_GetStatisticsChannel_Call) Return(_a0 *milvuspb.StringResponse, _a1 error) *MockRootCoord_GetStatisticsChannel_Call { _c.Call.Return(_a0, _a1) return _c } -func (_c *RootCoord_GetStatisticsChannel_Call) RunAndReturn(run func(context.Context, *internalpb.GetStatisticsChannelRequest) (*milvuspb.StringResponse, error)) *RootCoord_GetStatisticsChannel_Call { +func (_c *MockRootCoord_GetStatisticsChannel_Call) RunAndReturn(run func(context.Context, *internalpb.GetStatisticsChannelRequest) (*milvuspb.StringResponse, error)) *MockRootCoord_GetStatisticsChannel_Call { _c.Call.Return(run) return _c } // GetTimeTickChannel provides a mock function with given fields: _a0, _a1 -func (_m *RootCoord) GetTimeTickChannel(_a0 context.Context, _a1 *internalpb.GetTimeTickChannelRequest) (*milvuspb.StringResponse, error) { +func (_m *MockRootCoord) GetTimeTickChannel(_a0 context.Context, _a1 *internalpb.GetTimeTickChannelRequest) (*milvuspb.StringResponse, error) { ret := _m.Called(_a0, _a1) if len(ret) == 0 { @@ -1956,69 +2013,37 @@ func (_m *RootCoord) GetTimeTickChannel(_a0 context.Context, _a1 *internalpb.Get return r0, r1 } -// RootCoord_GetTimeTickChannel_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetTimeTickChannel' -type RootCoord_GetTimeTickChannel_Call struct { +// MockRootCoord_GetTimeTickChannel_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetTimeTickChannel' +type MockRootCoord_GetTimeTickChannel_Call struct { *mock.Call } // GetTimeTickChannel is a helper method to define mock.On call // - _a0 context.Context // - _a1 *internalpb.GetTimeTickChannelRequest -func (_e *RootCoord_Expecter) GetTimeTickChannel(_a0 interface{}, _a1 interface{}) *RootCoord_GetTimeTickChannel_Call { - return &RootCoord_GetTimeTickChannel_Call{Call: _e.mock.On("GetTimeTickChannel", _a0, _a1)} +func (_e *MockRootCoord_Expecter) GetTimeTickChannel(_a0 interface{}, _a1 interface{}) *MockRootCoord_GetTimeTickChannel_Call { + return &MockRootCoord_GetTimeTickChannel_Call{Call: _e.mock.On("GetTimeTickChannel", _a0, _a1)} } -func (_c *RootCoord_GetTimeTickChannel_Call) Run(run func(_a0 context.Context, _a1 *internalpb.GetTimeTickChannelRequest)) *RootCoord_GetTimeTickChannel_Call { +func (_c *MockRootCoord_GetTimeTickChannel_Call) Run(run func(_a0 context.Context, _a1 *internalpb.GetTimeTickChannelRequest)) *MockRootCoord_GetTimeTickChannel_Call { _c.Call.Run(func(args mock.Arguments) { run(args[0].(context.Context), args[1].(*internalpb.GetTimeTickChannelRequest)) }) return _c } -func (_c *RootCoord_GetTimeTickChannel_Call) Return(_a0 *milvuspb.StringResponse, _a1 error) *RootCoord_GetTimeTickChannel_Call { +func (_c *MockRootCoord_GetTimeTickChannel_Call) Return(_a0 *milvuspb.StringResponse, _a1 error) *MockRootCoord_GetTimeTickChannel_Call { _c.Call.Return(_a0, _a1) return _c } -func (_c *RootCoord_GetTimeTickChannel_Call) RunAndReturn(run func(context.Context, *internalpb.GetTimeTickChannelRequest) (*milvuspb.StringResponse, error)) *RootCoord_GetTimeTickChannel_Call { - _c.Call.Return(run) - return _c -} - -// GracefulStop provides a mock function with given fields: -func (_m *RootCoord) GracefulStop() { - _m.Called() -} - -// RootCoord_GracefulStop_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GracefulStop' -type RootCoord_GracefulStop_Call struct { - *mock.Call -} - -// GracefulStop is a helper method to define mock.On call -func (_e *RootCoord_Expecter) GracefulStop() *RootCoord_GracefulStop_Call { - return &RootCoord_GracefulStop_Call{Call: _e.mock.On("GracefulStop")} -} - -func (_c *RootCoord_GracefulStop_Call) Run(run func()) *RootCoord_GracefulStop_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *RootCoord_GracefulStop_Call) Return() *RootCoord_GracefulStop_Call { - _c.Call.Return() - return _c -} - -func (_c *RootCoord_GracefulStop_Call) RunAndReturn(run func()) *RootCoord_GracefulStop_Call { +func (_c *MockRootCoord_GetTimeTickChannel_Call) RunAndReturn(run func(context.Context, *internalpb.GetTimeTickChannelRequest) (*milvuspb.StringResponse, error)) *MockRootCoord_GetTimeTickChannel_Call { _c.Call.Return(run) return _c } // HasCollection provides a mock function with given fields: _a0, _a1 -func (_m *RootCoord) HasCollection(_a0 context.Context, _a1 *milvuspb.HasCollectionRequest) (*milvuspb.BoolResponse, error) { +func (_m *MockRootCoord) HasCollection(_a0 context.Context, _a1 *milvuspb.HasCollectionRequest) (*milvuspb.BoolResponse, error) { ret := _m.Called(_a0, _a1) if len(ret) == 0 { @@ -2047,37 +2072,37 @@ func (_m *RootCoord) HasCollection(_a0 context.Context, _a1 *milvuspb.HasCollect return r0, r1 } -// RootCoord_HasCollection_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'HasCollection' -type RootCoord_HasCollection_Call struct { +// MockRootCoord_HasCollection_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'HasCollection' +type MockRootCoord_HasCollection_Call struct { *mock.Call } // HasCollection is a helper method to define mock.On call // - _a0 context.Context // - _a1 *milvuspb.HasCollectionRequest -func (_e *RootCoord_Expecter) HasCollection(_a0 interface{}, _a1 interface{}) *RootCoord_HasCollection_Call { - return &RootCoord_HasCollection_Call{Call: _e.mock.On("HasCollection", _a0, _a1)} +func (_e *MockRootCoord_Expecter) HasCollection(_a0 interface{}, _a1 interface{}) *MockRootCoord_HasCollection_Call { + return &MockRootCoord_HasCollection_Call{Call: _e.mock.On("HasCollection", _a0, _a1)} } -func (_c *RootCoord_HasCollection_Call) Run(run func(_a0 context.Context, _a1 *milvuspb.HasCollectionRequest)) *RootCoord_HasCollection_Call { +func (_c *MockRootCoord_HasCollection_Call) Run(run func(_a0 context.Context, _a1 *milvuspb.HasCollectionRequest)) *MockRootCoord_HasCollection_Call { _c.Call.Run(func(args mock.Arguments) { run(args[0].(context.Context), args[1].(*milvuspb.HasCollectionRequest)) }) return _c } -func (_c *RootCoord_HasCollection_Call) Return(_a0 *milvuspb.BoolResponse, _a1 error) *RootCoord_HasCollection_Call { +func (_c *MockRootCoord_HasCollection_Call) Return(_a0 *milvuspb.BoolResponse, _a1 error) *MockRootCoord_HasCollection_Call { _c.Call.Return(_a0, _a1) return _c } -func (_c *RootCoord_HasCollection_Call) RunAndReturn(run func(context.Context, *milvuspb.HasCollectionRequest) (*milvuspb.BoolResponse, error)) *RootCoord_HasCollection_Call { +func (_c *MockRootCoord_HasCollection_Call) RunAndReturn(run func(context.Context, *milvuspb.HasCollectionRequest) (*milvuspb.BoolResponse, error)) *MockRootCoord_HasCollection_Call { _c.Call.Return(run) return _c } // HasPartition provides a mock function with given fields: _a0, _a1 -func (_m *RootCoord) HasPartition(_a0 context.Context, _a1 *milvuspb.HasPartitionRequest) (*milvuspb.BoolResponse, error) { +func (_m *MockRootCoord) HasPartition(_a0 context.Context, _a1 *milvuspb.HasPartitionRequest) (*milvuspb.BoolResponse, error) { ret := _m.Called(_a0, _a1) if len(ret) == 0 { @@ -2106,37 +2131,37 @@ func (_m *RootCoord) HasPartition(_a0 context.Context, _a1 *milvuspb.HasPartitio return r0, r1 } -// RootCoord_HasPartition_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'HasPartition' -type RootCoord_HasPartition_Call struct { +// MockRootCoord_HasPartition_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'HasPartition' +type MockRootCoord_HasPartition_Call struct { *mock.Call } // HasPartition is a helper method to define mock.On call // - _a0 context.Context // - _a1 *milvuspb.HasPartitionRequest -func (_e *RootCoord_Expecter) HasPartition(_a0 interface{}, _a1 interface{}) *RootCoord_HasPartition_Call { - return &RootCoord_HasPartition_Call{Call: _e.mock.On("HasPartition", _a0, _a1)} +func (_e *MockRootCoord_Expecter) HasPartition(_a0 interface{}, _a1 interface{}) *MockRootCoord_HasPartition_Call { + return &MockRootCoord_HasPartition_Call{Call: _e.mock.On("HasPartition", _a0, _a1)} } -func (_c *RootCoord_HasPartition_Call) Run(run func(_a0 context.Context, _a1 *milvuspb.HasPartitionRequest)) *RootCoord_HasPartition_Call { +func (_c *MockRootCoord_HasPartition_Call) Run(run func(_a0 context.Context, _a1 *milvuspb.HasPartitionRequest)) *MockRootCoord_HasPartition_Call { _c.Call.Run(func(args mock.Arguments) { run(args[0].(context.Context), args[1].(*milvuspb.HasPartitionRequest)) }) return _c } -func (_c *RootCoord_HasPartition_Call) Return(_a0 *milvuspb.BoolResponse, _a1 error) *RootCoord_HasPartition_Call { +func (_c *MockRootCoord_HasPartition_Call) Return(_a0 *milvuspb.BoolResponse, _a1 error) *MockRootCoord_HasPartition_Call { _c.Call.Return(_a0, _a1) return _c } -func (_c *RootCoord_HasPartition_Call) RunAndReturn(run func(context.Context, *milvuspb.HasPartitionRequest) (*milvuspb.BoolResponse, error)) *RootCoord_HasPartition_Call { +func (_c *MockRootCoord_HasPartition_Call) RunAndReturn(run func(context.Context, *milvuspb.HasPartitionRequest) (*milvuspb.BoolResponse, error)) *MockRootCoord_HasPartition_Call { _c.Call.Return(run) return _c } -// Init provides a mock function with given fields: -func (_m *RootCoord) Init() error { +// Init provides a mock function with no fields +func (_m *MockRootCoord) Init() error { ret := _m.Called() if len(ret) == 0 { @@ -2153,35 +2178,35 @@ func (_m *RootCoord) Init() error { return r0 } -// RootCoord_Init_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Init' -type RootCoord_Init_Call struct { +// MockRootCoord_Init_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Init' +type MockRootCoord_Init_Call struct { *mock.Call } // Init is a helper method to define mock.On call -func (_e *RootCoord_Expecter) Init() *RootCoord_Init_Call { - return &RootCoord_Init_Call{Call: _e.mock.On("Init")} +func (_e *MockRootCoord_Expecter) Init() *MockRootCoord_Init_Call { + return &MockRootCoord_Init_Call{Call: _e.mock.On("Init")} } -func (_c *RootCoord_Init_Call) Run(run func()) *RootCoord_Init_Call { +func (_c *MockRootCoord_Init_Call) Run(run func()) *MockRootCoord_Init_Call { _c.Call.Run(func(args mock.Arguments) { run() }) return _c } -func (_c *RootCoord_Init_Call) Return(_a0 error) *RootCoord_Init_Call { +func (_c *MockRootCoord_Init_Call) Return(_a0 error) *MockRootCoord_Init_Call { _c.Call.Return(_a0) return _c } -func (_c *RootCoord_Init_Call) RunAndReturn(run func() error) *RootCoord_Init_Call { +func (_c *MockRootCoord_Init_Call) RunAndReturn(run func() error) *MockRootCoord_Init_Call { _c.Call.Return(run) return _c } // InvalidateCollectionMetaCache provides a mock function with given fields: _a0, _a1 -func (_m *RootCoord) InvalidateCollectionMetaCache(_a0 context.Context, _a1 *proxypb.InvalidateCollMetaCacheRequest) (*commonpb.Status, error) { +func (_m *MockRootCoord) InvalidateCollectionMetaCache(_a0 context.Context, _a1 *proxypb.InvalidateCollMetaCacheRequest) (*commonpb.Status, error) { ret := _m.Called(_a0, _a1) if len(ret) == 0 { @@ -2210,37 +2235,37 @@ func (_m *RootCoord) InvalidateCollectionMetaCache(_a0 context.Context, _a1 *pro return r0, r1 } -// RootCoord_InvalidateCollectionMetaCache_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'InvalidateCollectionMetaCache' -type RootCoord_InvalidateCollectionMetaCache_Call struct { +// MockRootCoord_InvalidateCollectionMetaCache_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'InvalidateCollectionMetaCache' +type MockRootCoord_InvalidateCollectionMetaCache_Call struct { *mock.Call } // InvalidateCollectionMetaCache is a helper method to define mock.On call // - _a0 context.Context // - _a1 *proxypb.InvalidateCollMetaCacheRequest -func (_e *RootCoord_Expecter) InvalidateCollectionMetaCache(_a0 interface{}, _a1 interface{}) *RootCoord_InvalidateCollectionMetaCache_Call { - return &RootCoord_InvalidateCollectionMetaCache_Call{Call: _e.mock.On("InvalidateCollectionMetaCache", _a0, _a1)} +func (_e *MockRootCoord_Expecter) InvalidateCollectionMetaCache(_a0 interface{}, _a1 interface{}) *MockRootCoord_InvalidateCollectionMetaCache_Call { + return &MockRootCoord_InvalidateCollectionMetaCache_Call{Call: _e.mock.On("InvalidateCollectionMetaCache", _a0, _a1)} } -func (_c *RootCoord_InvalidateCollectionMetaCache_Call) Run(run func(_a0 context.Context, _a1 *proxypb.InvalidateCollMetaCacheRequest)) *RootCoord_InvalidateCollectionMetaCache_Call { +func (_c *MockRootCoord_InvalidateCollectionMetaCache_Call) Run(run func(_a0 context.Context, _a1 *proxypb.InvalidateCollMetaCacheRequest)) *MockRootCoord_InvalidateCollectionMetaCache_Call { _c.Call.Run(func(args mock.Arguments) { run(args[0].(context.Context), args[1].(*proxypb.InvalidateCollMetaCacheRequest)) }) return _c } -func (_c *RootCoord_InvalidateCollectionMetaCache_Call) Return(_a0 *commonpb.Status, _a1 error) *RootCoord_InvalidateCollectionMetaCache_Call { +func (_c *MockRootCoord_InvalidateCollectionMetaCache_Call) Return(_a0 *commonpb.Status, _a1 error) *MockRootCoord_InvalidateCollectionMetaCache_Call { _c.Call.Return(_a0, _a1) return _c } -func (_c *RootCoord_InvalidateCollectionMetaCache_Call) RunAndReturn(run func(context.Context, *proxypb.InvalidateCollMetaCacheRequest) (*commonpb.Status, error)) *RootCoord_InvalidateCollectionMetaCache_Call { +func (_c *MockRootCoord_InvalidateCollectionMetaCache_Call) RunAndReturn(run func(context.Context, *proxypb.InvalidateCollMetaCacheRequest) (*commonpb.Status, error)) *MockRootCoord_InvalidateCollectionMetaCache_Call { _c.Call.Return(run) return _c } // ListAliases provides a mock function with given fields: _a0, _a1 -func (_m *RootCoord) ListAliases(_a0 context.Context, _a1 *milvuspb.ListAliasesRequest) (*milvuspb.ListAliasesResponse, error) { +func (_m *MockRootCoord) ListAliases(_a0 context.Context, _a1 *milvuspb.ListAliasesRequest) (*milvuspb.ListAliasesResponse, error) { ret := _m.Called(_a0, _a1) if len(ret) == 0 { @@ -2269,37 +2294,37 @@ func (_m *RootCoord) ListAliases(_a0 context.Context, _a1 *milvuspb.ListAliasesR return r0, r1 } -// RootCoord_ListAliases_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListAliases' -type RootCoord_ListAliases_Call struct { +// MockRootCoord_ListAliases_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListAliases' +type MockRootCoord_ListAliases_Call struct { *mock.Call } // ListAliases is a helper method to define mock.On call // - _a0 context.Context // - _a1 *milvuspb.ListAliasesRequest -func (_e *RootCoord_Expecter) ListAliases(_a0 interface{}, _a1 interface{}) *RootCoord_ListAliases_Call { - return &RootCoord_ListAliases_Call{Call: _e.mock.On("ListAliases", _a0, _a1)} +func (_e *MockRootCoord_Expecter) ListAliases(_a0 interface{}, _a1 interface{}) *MockRootCoord_ListAliases_Call { + return &MockRootCoord_ListAliases_Call{Call: _e.mock.On("ListAliases", _a0, _a1)} } -func (_c *RootCoord_ListAliases_Call) Run(run func(_a0 context.Context, _a1 *milvuspb.ListAliasesRequest)) *RootCoord_ListAliases_Call { +func (_c *MockRootCoord_ListAliases_Call) Run(run func(_a0 context.Context, _a1 *milvuspb.ListAliasesRequest)) *MockRootCoord_ListAliases_Call { _c.Call.Run(func(args mock.Arguments) { run(args[0].(context.Context), args[1].(*milvuspb.ListAliasesRequest)) }) return _c } -func (_c *RootCoord_ListAliases_Call) Return(_a0 *milvuspb.ListAliasesResponse, _a1 error) *RootCoord_ListAliases_Call { +func (_c *MockRootCoord_ListAliases_Call) Return(_a0 *milvuspb.ListAliasesResponse, _a1 error) *MockRootCoord_ListAliases_Call { _c.Call.Return(_a0, _a1) return _c } -func (_c *RootCoord_ListAliases_Call) RunAndReturn(run func(context.Context, *milvuspb.ListAliasesRequest) (*milvuspb.ListAliasesResponse, error)) *RootCoord_ListAliases_Call { +func (_c *MockRootCoord_ListAliases_Call) RunAndReturn(run func(context.Context, *milvuspb.ListAliasesRequest) (*milvuspb.ListAliasesResponse, error)) *MockRootCoord_ListAliases_Call { _c.Call.Return(run) return _c } // ListCredUsers provides a mock function with given fields: _a0, _a1 -func (_m *RootCoord) ListCredUsers(_a0 context.Context, _a1 *milvuspb.ListCredUsersRequest) (*milvuspb.ListCredUsersResponse, error) { +func (_m *MockRootCoord) ListCredUsers(_a0 context.Context, _a1 *milvuspb.ListCredUsersRequest) (*milvuspb.ListCredUsersResponse, error) { ret := _m.Called(_a0, _a1) if len(ret) == 0 { @@ -2328,37 +2353,37 @@ func (_m *RootCoord) ListCredUsers(_a0 context.Context, _a1 *milvuspb.ListCredUs return r0, r1 } -// RootCoord_ListCredUsers_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListCredUsers' -type RootCoord_ListCredUsers_Call struct { +// MockRootCoord_ListCredUsers_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListCredUsers' +type MockRootCoord_ListCredUsers_Call struct { *mock.Call } // ListCredUsers is a helper method to define mock.On call // - _a0 context.Context // - _a1 *milvuspb.ListCredUsersRequest -func (_e *RootCoord_Expecter) ListCredUsers(_a0 interface{}, _a1 interface{}) *RootCoord_ListCredUsers_Call { - return &RootCoord_ListCredUsers_Call{Call: _e.mock.On("ListCredUsers", _a0, _a1)} +func (_e *MockRootCoord_Expecter) ListCredUsers(_a0 interface{}, _a1 interface{}) *MockRootCoord_ListCredUsers_Call { + return &MockRootCoord_ListCredUsers_Call{Call: _e.mock.On("ListCredUsers", _a0, _a1)} } -func (_c *RootCoord_ListCredUsers_Call) Run(run func(_a0 context.Context, _a1 *milvuspb.ListCredUsersRequest)) *RootCoord_ListCredUsers_Call { +func (_c *MockRootCoord_ListCredUsers_Call) Run(run func(_a0 context.Context, _a1 *milvuspb.ListCredUsersRequest)) *MockRootCoord_ListCredUsers_Call { _c.Call.Run(func(args mock.Arguments) { run(args[0].(context.Context), args[1].(*milvuspb.ListCredUsersRequest)) }) return _c } -func (_c *RootCoord_ListCredUsers_Call) Return(_a0 *milvuspb.ListCredUsersResponse, _a1 error) *RootCoord_ListCredUsers_Call { +func (_c *MockRootCoord_ListCredUsers_Call) Return(_a0 *milvuspb.ListCredUsersResponse, _a1 error) *MockRootCoord_ListCredUsers_Call { _c.Call.Return(_a0, _a1) return _c } -func (_c *RootCoord_ListCredUsers_Call) RunAndReturn(run func(context.Context, *milvuspb.ListCredUsersRequest) (*milvuspb.ListCredUsersResponse, error)) *RootCoord_ListCredUsers_Call { +func (_c *MockRootCoord_ListCredUsers_Call) RunAndReturn(run func(context.Context, *milvuspb.ListCredUsersRequest) (*milvuspb.ListCredUsersResponse, error)) *MockRootCoord_ListCredUsers_Call { _c.Call.Return(run) return _c } // ListDatabases provides a mock function with given fields: _a0, _a1 -func (_m *RootCoord) ListDatabases(_a0 context.Context, _a1 *milvuspb.ListDatabasesRequest) (*milvuspb.ListDatabasesResponse, error) { +func (_m *MockRootCoord) ListDatabases(_a0 context.Context, _a1 *milvuspb.ListDatabasesRequest) (*milvuspb.ListDatabasesResponse, error) { ret := _m.Called(_a0, _a1) if len(ret) == 0 { @@ -2387,37 +2412,37 @@ func (_m *RootCoord) ListDatabases(_a0 context.Context, _a1 *milvuspb.ListDataba return r0, r1 } -// RootCoord_ListDatabases_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListDatabases' -type RootCoord_ListDatabases_Call struct { +// MockRootCoord_ListDatabases_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListDatabases' +type MockRootCoord_ListDatabases_Call struct { *mock.Call } // ListDatabases is a helper method to define mock.On call // - _a0 context.Context // - _a1 *milvuspb.ListDatabasesRequest -func (_e *RootCoord_Expecter) ListDatabases(_a0 interface{}, _a1 interface{}) *RootCoord_ListDatabases_Call { - return &RootCoord_ListDatabases_Call{Call: _e.mock.On("ListDatabases", _a0, _a1)} +func (_e *MockRootCoord_Expecter) ListDatabases(_a0 interface{}, _a1 interface{}) *MockRootCoord_ListDatabases_Call { + return &MockRootCoord_ListDatabases_Call{Call: _e.mock.On("ListDatabases", _a0, _a1)} } -func (_c *RootCoord_ListDatabases_Call) Run(run func(_a0 context.Context, _a1 *milvuspb.ListDatabasesRequest)) *RootCoord_ListDatabases_Call { +func (_c *MockRootCoord_ListDatabases_Call) Run(run func(_a0 context.Context, _a1 *milvuspb.ListDatabasesRequest)) *MockRootCoord_ListDatabases_Call { _c.Call.Run(func(args mock.Arguments) { run(args[0].(context.Context), args[1].(*milvuspb.ListDatabasesRequest)) }) return _c } -func (_c *RootCoord_ListDatabases_Call) Return(_a0 *milvuspb.ListDatabasesResponse, _a1 error) *RootCoord_ListDatabases_Call { +func (_c *MockRootCoord_ListDatabases_Call) Return(_a0 *milvuspb.ListDatabasesResponse, _a1 error) *MockRootCoord_ListDatabases_Call { _c.Call.Return(_a0, _a1) return _c } -func (_c *RootCoord_ListDatabases_Call) RunAndReturn(run func(context.Context, *milvuspb.ListDatabasesRequest) (*milvuspb.ListDatabasesResponse, error)) *RootCoord_ListDatabases_Call { +func (_c *MockRootCoord_ListDatabases_Call) RunAndReturn(run func(context.Context, *milvuspb.ListDatabasesRequest) (*milvuspb.ListDatabasesResponse, error)) *MockRootCoord_ListDatabases_Call { _c.Call.Return(run) return _c } // ListPolicy provides a mock function with given fields: _a0, _a1 -func (_m *RootCoord) ListPolicy(_a0 context.Context, _a1 *internalpb.ListPolicyRequest) (*internalpb.ListPolicyResponse, error) { +func (_m *MockRootCoord) ListPolicy(_a0 context.Context, _a1 *internalpb.ListPolicyRequest) (*internalpb.ListPolicyResponse, error) { ret := _m.Called(_a0, _a1) if len(ret) == 0 { @@ -2446,37 +2471,37 @@ func (_m *RootCoord) ListPolicy(_a0 context.Context, _a1 *internalpb.ListPolicyR return r0, r1 } -// RootCoord_ListPolicy_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListPolicy' -type RootCoord_ListPolicy_Call struct { +// MockRootCoord_ListPolicy_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListPolicy' +type MockRootCoord_ListPolicy_Call struct { *mock.Call } // ListPolicy is a helper method to define mock.On call // - _a0 context.Context // - _a1 *internalpb.ListPolicyRequest -func (_e *RootCoord_Expecter) ListPolicy(_a0 interface{}, _a1 interface{}) *RootCoord_ListPolicy_Call { - return &RootCoord_ListPolicy_Call{Call: _e.mock.On("ListPolicy", _a0, _a1)} +func (_e *MockRootCoord_Expecter) ListPolicy(_a0 interface{}, _a1 interface{}) *MockRootCoord_ListPolicy_Call { + return &MockRootCoord_ListPolicy_Call{Call: _e.mock.On("ListPolicy", _a0, _a1)} } -func (_c *RootCoord_ListPolicy_Call) Run(run func(_a0 context.Context, _a1 *internalpb.ListPolicyRequest)) *RootCoord_ListPolicy_Call { +func (_c *MockRootCoord_ListPolicy_Call) Run(run func(_a0 context.Context, _a1 *internalpb.ListPolicyRequest)) *MockRootCoord_ListPolicy_Call { _c.Call.Run(func(args mock.Arguments) { run(args[0].(context.Context), args[1].(*internalpb.ListPolicyRequest)) }) return _c } -func (_c *RootCoord_ListPolicy_Call) Return(_a0 *internalpb.ListPolicyResponse, _a1 error) *RootCoord_ListPolicy_Call { +func (_c *MockRootCoord_ListPolicy_Call) Return(_a0 *internalpb.ListPolicyResponse, _a1 error) *MockRootCoord_ListPolicy_Call { _c.Call.Return(_a0, _a1) return _c } -func (_c *RootCoord_ListPolicy_Call) RunAndReturn(run func(context.Context, *internalpb.ListPolicyRequest) (*internalpb.ListPolicyResponse, error)) *RootCoord_ListPolicy_Call { +func (_c *MockRootCoord_ListPolicy_Call) RunAndReturn(run func(context.Context, *internalpb.ListPolicyRequest) (*internalpb.ListPolicyResponse, error)) *MockRootCoord_ListPolicy_Call { _c.Call.Return(run) return _c } // ListPrivilegeGroups provides a mock function with given fields: _a0, _a1 -func (_m *RootCoord) ListPrivilegeGroups(_a0 context.Context, _a1 *milvuspb.ListPrivilegeGroupsRequest) (*milvuspb.ListPrivilegeGroupsResponse, error) { +func (_m *MockRootCoord) ListPrivilegeGroups(_a0 context.Context, _a1 *milvuspb.ListPrivilegeGroupsRequest) (*milvuspb.ListPrivilegeGroupsResponse, error) { ret := _m.Called(_a0, _a1) if len(ret) == 0 { @@ -2505,37 +2530,37 @@ func (_m *RootCoord) ListPrivilegeGroups(_a0 context.Context, _a1 *milvuspb.List return r0, r1 } -// RootCoord_ListPrivilegeGroups_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListPrivilegeGroups' -type RootCoord_ListPrivilegeGroups_Call struct { +// MockRootCoord_ListPrivilegeGroups_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListPrivilegeGroups' +type MockRootCoord_ListPrivilegeGroups_Call struct { *mock.Call } // ListPrivilegeGroups is a helper method to define mock.On call // - _a0 context.Context // - _a1 *milvuspb.ListPrivilegeGroupsRequest -func (_e *RootCoord_Expecter) ListPrivilegeGroups(_a0 interface{}, _a1 interface{}) *RootCoord_ListPrivilegeGroups_Call { - return &RootCoord_ListPrivilegeGroups_Call{Call: _e.mock.On("ListPrivilegeGroups", _a0, _a1)} +func (_e *MockRootCoord_Expecter) ListPrivilegeGroups(_a0 interface{}, _a1 interface{}) *MockRootCoord_ListPrivilegeGroups_Call { + return &MockRootCoord_ListPrivilegeGroups_Call{Call: _e.mock.On("ListPrivilegeGroups", _a0, _a1)} } -func (_c *RootCoord_ListPrivilegeGroups_Call) Run(run func(_a0 context.Context, _a1 *milvuspb.ListPrivilegeGroupsRequest)) *RootCoord_ListPrivilegeGroups_Call { +func (_c *MockRootCoord_ListPrivilegeGroups_Call) Run(run func(_a0 context.Context, _a1 *milvuspb.ListPrivilegeGroupsRequest)) *MockRootCoord_ListPrivilegeGroups_Call { _c.Call.Run(func(args mock.Arguments) { run(args[0].(context.Context), args[1].(*milvuspb.ListPrivilegeGroupsRequest)) }) return _c } -func (_c *RootCoord_ListPrivilegeGroups_Call) Return(_a0 *milvuspb.ListPrivilegeGroupsResponse, _a1 error) *RootCoord_ListPrivilegeGroups_Call { +func (_c *MockRootCoord_ListPrivilegeGroups_Call) Return(_a0 *milvuspb.ListPrivilegeGroupsResponse, _a1 error) *MockRootCoord_ListPrivilegeGroups_Call { _c.Call.Return(_a0, _a1) return _c } -func (_c *RootCoord_ListPrivilegeGroups_Call) RunAndReturn(run func(context.Context, *milvuspb.ListPrivilegeGroupsRequest) (*milvuspb.ListPrivilegeGroupsResponse, error)) *RootCoord_ListPrivilegeGroups_Call { +func (_c *MockRootCoord_ListPrivilegeGroups_Call) RunAndReturn(run func(context.Context, *milvuspb.ListPrivilegeGroupsRequest) (*milvuspb.ListPrivilegeGroupsResponse, error)) *MockRootCoord_ListPrivilegeGroups_Call { _c.Call.Return(run) return _c } // OperatePrivilege provides a mock function with given fields: _a0, _a1 -func (_m *RootCoord) OperatePrivilege(_a0 context.Context, _a1 *milvuspb.OperatePrivilegeRequest) (*commonpb.Status, error) { +func (_m *MockRootCoord) OperatePrivilege(_a0 context.Context, _a1 *milvuspb.OperatePrivilegeRequest) (*commonpb.Status, error) { ret := _m.Called(_a0, _a1) if len(ret) == 0 { @@ -2564,37 +2589,37 @@ func (_m *RootCoord) OperatePrivilege(_a0 context.Context, _a1 *milvuspb.Operate return r0, r1 } -// RootCoord_OperatePrivilege_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'OperatePrivilege' -type RootCoord_OperatePrivilege_Call struct { +// MockRootCoord_OperatePrivilege_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'OperatePrivilege' +type MockRootCoord_OperatePrivilege_Call struct { *mock.Call } // OperatePrivilege is a helper method to define mock.On call // - _a0 context.Context // - _a1 *milvuspb.OperatePrivilegeRequest -func (_e *RootCoord_Expecter) OperatePrivilege(_a0 interface{}, _a1 interface{}) *RootCoord_OperatePrivilege_Call { - return &RootCoord_OperatePrivilege_Call{Call: _e.mock.On("OperatePrivilege", _a0, _a1)} +func (_e *MockRootCoord_Expecter) OperatePrivilege(_a0 interface{}, _a1 interface{}) *MockRootCoord_OperatePrivilege_Call { + return &MockRootCoord_OperatePrivilege_Call{Call: _e.mock.On("OperatePrivilege", _a0, _a1)} } -func (_c *RootCoord_OperatePrivilege_Call) Run(run func(_a0 context.Context, _a1 *milvuspb.OperatePrivilegeRequest)) *RootCoord_OperatePrivilege_Call { +func (_c *MockRootCoord_OperatePrivilege_Call) Run(run func(_a0 context.Context, _a1 *milvuspb.OperatePrivilegeRequest)) *MockRootCoord_OperatePrivilege_Call { _c.Call.Run(func(args mock.Arguments) { run(args[0].(context.Context), args[1].(*milvuspb.OperatePrivilegeRequest)) }) return _c } -func (_c *RootCoord_OperatePrivilege_Call) Return(_a0 *commonpb.Status, _a1 error) *RootCoord_OperatePrivilege_Call { +func (_c *MockRootCoord_OperatePrivilege_Call) Return(_a0 *commonpb.Status, _a1 error) *MockRootCoord_OperatePrivilege_Call { _c.Call.Return(_a0, _a1) return _c } -func (_c *RootCoord_OperatePrivilege_Call) RunAndReturn(run func(context.Context, *milvuspb.OperatePrivilegeRequest) (*commonpb.Status, error)) *RootCoord_OperatePrivilege_Call { +func (_c *MockRootCoord_OperatePrivilege_Call) RunAndReturn(run func(context.Context, *milvuspb.OperatePrivilegeRequest) (*commonpb.Status, error)) *MockRootCoord_OperatePrivilege_Call { _c.Call.Return(run) return _c } // OperatePrivilegeGroup provides a mock function with given fields: _a0, _a1 -func (_m *RootCoord) OperatePrivilegeGroup(_a0 context.Context, _a1 *milvuspb.OperatePrivilegeGroupRequest) (*commonpb.Status, error) { +func (_m *MockRootCoord) OperatePrivilegeGroup(_a0 context.Context, _a1 *milvuspb.OperatePrivilegeGroupRequest) (*commonpb.Status, error) { ret := _m.Called(_a0, _a1) if len(ret) == 0 { @@ -2623,37 +2648,37 @@ func (_m *RootCoord) OperatePrivilegeGroup(_a0 context.Context, _a1 *milvuspb.Op return r0, r1 } -// RootCoord_OperatePrivilegeGroup_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'OperatePrivilegeGroup' -type RootCoord_OperatePrivilegeGroup_Call struct { +// MockRootCoord_OperatePrivilegeGroup_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'OperatePrivilegeGroup' +type MockRootCoord_OperatePrivilegeGroup_Call struct { *mock.Call } // OperatePrivilegeGroup is a helper method to define mock.On call // - _a0 context.Context // - _a1 *milvuspb.OperatePrivilegeGroupRequest -func (_e *RootCoord_Expecter) OperatePrivilegeGroup(_a0 interface{}, _a1 interface{}) *RootCoord_OperatePrivilegeGroup_Call { - return &RootCoord_OperatePrivilegeGroup_Call{Call: _e.mock.On("OperatePrivilegeGroup", _a0, _a1)} +func (_e *MockRootCoord_Expecter) OperatePrivilegeGroup(_a0 interface{}, _a1 interface{}) *MockRootCoord_OperatePrivilegeGroup_Call { + return &MockRootCoord_OperatePrivilegeGroup_Call{Call: _e.mock.On("OperatePrivilegeGroup", _a0, _a1)} } -func (_c *RootCoord_OperatePrivilegeGroup_Call) Run(run func(_a0 context.Context, _a1 *milvuspb.OperatePrivilegeGroupRequest)) *RootCoord_OperatePrivilegeGroup_Call { +func (_c *MockRootCoord_OperatePrivilegeGroup_Call) Run(run func(_a0 context.Context, _a1 *milvuspb.OperatePrivilegeGroupRequest)) *MockRootCoord_OperatePrivilegeGroup_Call { _c.Call.Run(func(args mock.Arguments) { run(args[0].(context.Context), args[1].(*milvuspb.OperatePrivilegeGroupRequest)) }) return _c } -func (_c *RootCoord_OperatePrivilegeGroup_Call) Return(_a0 *commonpb.Status, _a1 error) *RootCoord_OperatePrivilegeGroup_Call { +func (_c *MockRootCoord_OperatePrivilegeGroup_Call) Return(_a0 *commonpb.Status, _a1 error) *MockRootCoord_OperatePrivilegeGroup_Call { _c.Call.Return(_a0, _a1) return _c } -func (_c *RootCoord_OperatePrivilegeGroup_Call) RunAndReturn(run func(context.Context, *milvuspb.OperatePrivilegeGroupRequest) (*commonpb.Status, error)) *RootCoord_OperatePrivilegeGroup_Call { +func (_c *MockRootCoord_OperatePrivilegeGroup_Call) RunAndReturn(run func(context.Context, *milvuspb.OperatePrivilegeGroupRequest) (*commonpb.Status, error)) *MockRootCoord_OperatePrivilegeGroup_Call { _c.Call.Return(run) return _c } // OperateUserRole provides a mock function with given fields: _a0, _a1 -func (_m *RootCoord) OperateUserRole(_a0 context.Context, _a1 *milvuspb.OperateUserRoleRequest) (*commonpb.Status, error) { +func (_m *MockRootCoord) OperateUserRole(_a0 context.Context, _a1 *milvuspb.OperateUserRoleRequest) (*commonpb.Status, error) { ret := _m.Called(_a0, _a1) if len(ret) == 0 { @@ -2682,37 +2707,37 @@ func (_m *RootCoord) OperateUserRole(_a0 context.Context, _a1 *milvuspb.OperateU return r0, r1 } -// RootCoord_OperateUserRole_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'OperateUserRole' -type RootCoord_OperateUserRole_Call struct { +// MockRootCoord_OperateUserRole_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'OperateUserRole' +type MockRootCoord_OperateUserRole_Call struct { *mock.Call } // OperateUserRole is a helper method to define mock.On call // - _a0 context.Context // - _a1 *milvuspb.OperateUserRoleRequest -func (_e *RootCoord_Expecter) OperateUserRole(_a0 interface{}, _a1 interface{}) *RootCoord_OperateUserRole_Call { - return &RootCoord_OperateUserRole_Call{Call: _e.mock.On("OperateUserRole", _a0, _a1)} +func (_e *MockRootCoord_Expecter) OperateUserRole(_a0 interface{}, _a1 interface{}) *MockRootCoord_OperateUserRole_Call { + return &MockRootCoord_OperateUserRole_Call{Call: _e.mock.On("OperateUserRole", _a0, _a1)} } -func (_c *RootCoord_OperateUserRole_Call) Run(run func(_a0 context.Context, _a1 *milvuspb.OperateUserRoleRequest)) *RootCoord_OperateUserRole_Call { +func (_c *MockRootCoord_OperateUserRole_Call) Run(run func(_a0 context.Context, _a1 *milvuspb.OperateUserRoleRequest)) *MockRootCoord_OperateUserRole_Call { _c.Call.Run(func(args mock.Arguments) { run(args[0].(context.Context), args[1].(*milvuspb.OperateUserRoleRequest)) }) return _c } -func (_c *RootCoord_OperateUserRole_Call) Return(_a0 *commonpb.Status, _a1 error) *RootCoord_OperateUserRole_Call { +func (_c *MockRootCoord_OperateUserRole_Call) Return(_a0 *commonpb.Status, _a1 error) *MockRootCoord_OperateUserRole_Call { _c.Call.Return(_a0, _a1) return _c } -func (_c *RootCoord_OperateUserRole_Call) RunAndReturn(run func(context.Context, *milvuspb.OperateUserRoleRequest) (*commonpb.Status, error)) *RootCoord_OperateUserRole_Call { +func (_c *MockRootCoord_OperateUserRole_Call) RunAndReturn(run func(context.Context, *milvuspb.OperateUserRoleRequest) (*commonpb.Status, error)) *MockRootCoord_OperateUserRole_Call { _c.Call.Return(run) return _c } -// Register provides a mock function with given fields: -func (_m *RootCoord) Register() error { +// Register provides a mock function with no fields +func (_m *MockRootCoord) Register() error { ret := _m.Called() if len(ret) == 0 { @@ -2729,68 +2754,35 @@ func (_m *RootCoord) Register() error { return r0 } -// RootCoord_Register_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Register' -type RootCoord_Register_Call struct { +// MockRootCoord_Register_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Register' +type MockRootCoord_Register_Call struct { *mock.Call } // Register is a helper method to define mock.On call -func (_e *RootCoord_Expecter) Register() *RootCoord_Register_Call { - return &RootCoord_Register_Call{Call: _e.mock.On("Register")} +func (_e *MockRootCoord_Expecter) Register() *MockRootCoord_Register_Call { + return &MockRootCoord_Register_Call{Call: _e.mock.On("Register")} } -func (_c *RootCoord_Register_Call) Run(run func()) *RootCoord_Register_Call { +func (_c *MockRootCoord_Register_Call) Run(run func()) *MockRootCoord_Register_Call { _c.Call.Run(func(args mock.Arguments) { run() }) return _c } -func (_c *RootCoord_Register_Call) Return(_a0 error) *RootCoord_Register_Call { +func (_c *MockRootCoord_Register_Call) Return(_a0 error) *MockRootCoord_Register_Call { _c.Call.Return(_a0) return _c } -func (_c *RootCoord_Register_Call) RunAndReturn(run func() error) *RootCoord_Register_Call { - _c.Call.Return(run) - return _c -} - -// RegisterStreamingCoordGRPCService provides a mock function with given fields: server -func (_m *RootCoord) RegisterStreamingCoordGRPCService(server *grpc.Server) { - _m.Called(server) -} - -// RootCoord_RegisterStreamingCoordGRPCService_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'RegisterStreamingCoordGRPCService' -type RootCoord_RegisterStreamingCoordGRPCService_Call struct { - *mock.Call -} - -// RegisterStreamingCoordGRPCService is a helper method to define mock.On call -// - server *grpc.Server -func (_e *RootCoord_Expecter) RegisterStreamingCoordGRPCService(server interface{}) *RootCoord_RegisterStreamingCoordGRPCService_Call { - return &RootCoord_RegisterStreamingCoordGRPCService_Call{Call: _e.mock.On("RegisterStreamingCoordGRPCService", server)} -} - -func (_c *RootCoord_RegisterStreamingCoordGRPCService_Call) Run(run func(server *grpc.Server)) *RootCoord_RegisterStreamingCoordGRPCService_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(*grpc.Server)) - }) - return _c -} - -func (_c *RootCoord_RegisterStreamingCoordGRPCService_Call) Return() *RootCoord_RegisterStreamingCoordGRPCService_Call { - _c.Call.Return() - return _c -} - -func (_c *RootCoord_RegisterStreamingCoordGRPCService_Call) RunAndReturn(run func(*grpc.Server)) *RootCoord_RegisterStreamingCoordGRPCService_Call { +func (_c *MockRootCoord_Register_Call) RunAndReturn(run func() error) *MockRootCoord_Register_Call { _c.Call.Return(run) return _c } // RenameCollection provides a mock function with given fields: _a0, _a1 -func (_m *RootCoord) RenameCollection(_a0 context.Context, _a1 *milvuspb.RenameCollectionRequest) (*commonpb.Status, error) { +func (_m *MockRootCoord) RenameCollection(_a0 context.Context, _a1 *milvuspb.RenameCollectionRequest) (*commonpb.Status, error) { ret := _m.Called(_a0, _a1) if len(ret) == 0 { @@ -2819,37 +2811,37 @@ func (_m *RootCoord) RenameCollection(_a0 context.Context, _a1 *milvuspb.RenameC return r0, r1 } -// RootCoord_RenameCollection_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'RenameCollection' -type RootCoord_RenameCollection_Call struct { +// MockRootCoord_RenameCollection_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'RenameCollection' +type MockRootCoord_RenameCollection_Call struct { *mock.Call } // RenameCollection is a helper method to define mock.On call // - _a0 context.Context // - _a1 *milvuspb.RenameCollectionRequest -func (_e *RootCoord_Expecter) RenameCollection(_a0 interface{}, _a1 interface{}) *RootCoord_RenameCollection_Call { - return &RootCoord_RenameCollection_Call{Call: _e.mock.On("RenameCollection", _a0, _a1)} +func (_e *MockRootCoord_Expecter) RenameCollection(_a0 interface{}, _a1 interface{}) *MockRootCoord_RenameCollection_Call { + return &MockRootCoord_RenameCollection_Call{Call: _e.mock.On("RenameCollection", _a0, _a1)} } -func (_c *RootCoord_RenameCollection_Call) Run(run func(_a0 context.Context, _a1 *milvuspb.RenameCollectionRequest)) *RootCoord_RenameCollection_Call { +func (_c *MockRootCoord_RenameCollection_Call) Run(run func(_a0 context.Context, _a1 *milvuspb.RenameCollectionRequest)) *MockRootCoord_RenameCollection_Call { _c.Call.Run(func(args mock.Arguments) { run(args[0].(context.Context), args[1].(*milvuspb.RenameCollectionRequest)) }) return _c } -func (_c *RootCoord_RenameCollection_Call) Return(_a0 *commonpb.Status, _a1 error) *RootCoord_RenameCollection_Call { +func (_c *MockRootCoord_RenameCollection_Call) Return(_a0 *commonpb.Status, _a1 error) *MockRootCoord_RenameCollection_Call { _c.Call.Return(_a0, _a1) return _c } -func (_c *RootCoord_RenameCollection_Call) RunAndReturn(run func(context.Context, *milvuspb.RenameCollectionRequest) (*commonpb.Status, error)) *RootCoord_RenameCollection_Call { +func (_c *MockRootCoord_RenameCollection_Call) RunAndReturn(run func(context.Context, *milvuspb.RenameCollectionRequest) (*commonpb.Status, error)) *MockRootCoord_RenameCollection_Call { _c.Call.Return(run) return _c } // RestoreRBAC provides a mock function with given fields: _a0, _a1 -func (_m *RootCoord) RestoreRBAC(_a0 context.Context, _a1 *milvuspb.RestoreRBACMetaRequest) (*commonpb.Status, error) { +func (_m *MockRootCoord) RestoreRBAC(_a0 context.Context, _a1 *milvuspb.RestoreRBACMetaRequest) (*commonpb.Status, error) { ret := _m.Called(_a0, _a1) if len(ret) == 0 { @@ -2878,37 +2870,37 @@ func (_m *RootCoord) RestoreRBAC(_a0 context.Context, _a1 *milvuspb.RestoreRBACM return r0, r1 } -// RootCoord_RestoreRBAC_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'RestoreRBAC' -type RootCoord_RestoreRBAC_Call struct { +// MockRootCoord_RestoreRBAC_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'RestoreRBAC' +type MockRootCoord_RestoreRBAC_Call struct { *mock.Call } // RestoreRBAC is a helper method to define mock.On call // - _a0 context.Context // - _a1 *milvuspb.RestoreRBACMetaRequest -func (_e *RootCoord_Expecter) RestoreRBAC(_a0 interface{}, _a1 interface{}) *RootCoord_RestoreRBAC_Call { - return &RootCoord_RestoreRBAC_Call{Call: _e.mock.On("RestoreRBAC", _a0, _a1)} +func (_e *MockRootCoord_Expecter) RestoreRBAC(_a0 interface{}, _a1 interface{}) *MockRootCoord_RestoreRBAC_Call { + return &MockRootCoord_RestoreRBAC_Call{Call: _e.mock.On("RestoreRBAC", _a0, _a1)} } -func (_c *RootCoord_RestoreRBAC_Call) Run(run func(_a0 context.Context, _a1 *milvuspb.RestoreRBACMetaRequest)) *RootCoord_RestoreRBAC_Call { +func (_c *MockRootCoord_RestoreRBAC_Call) Run(run func(_a0 context.Context, _a1 *milvuspb.RestoreRBACMetaRequest)) *MockRootCoord_RestoreRBAC_Call { _c.Call.Run(func(args mock.Arguments) { run(args[0].(context.Context), args[1].(*milvuspb.RestoreRBACMetaRequest)) }) return _c } -func (_c *RootCoord_RestoreRBAC_Call) Return(_a0 *commonpb.Status, _a1 error) *RootCoord_RestoreRBAC_Call { +func (_c *MockRootCoord_RestoreRBAC_Call) Return(_a0 *commonpb.Status, _a1 error) *MockRootCoord_RestoreRBAC_Call { _c.Call.Return(_a0, _a1) return _c } -func (_c *RootCoord_RestoreRBAC_Call) RunAndReturn(run func(context.Context, *milvuspb.RestoreRBACMetaRequest) (*commonpb.Status, error)) *RootCoord_RestoreRBAC_Call { +func (_c *MockRootCoord_RestoreRBAC_Call) RunAndReturn(run func(context.Context, *milvuspb.RestoreRBACMetaRequest) (*commonpb.Status, error)) *MockRootCoord_RestoreRBAC_Call { _c.Call.Return(run) return _c } // SelectGrant provides a mock function with given fields: _a0, _a1 -func (_m *RootCoord) SelectGrant(_a0 context.Context, _a1 *milvuspb.SelectGrantRequest) (*milvuspb.SelectGrantResponse, error) { +func (_m *MockRootCoord) SelectGrant(_a0 context.Context, _a1 *milvuspb.SelectGrantRequest) (*milvuspb.SelectGrantResponse, error) { ret := _m.Called(_a0, _a1) if len(ret) == 0 { @@ -2937,37 +2929,37 @@ func (_m *RootCoord) SelectGrant(_a0 context.Context, _a1 *milvuspb.SelectGrantR return r0, r1 } -// RootCoord_SelectGrant_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SelectGrant' -type RootCoord_SelectGrant_Call struct { +// MockRootCoord_SelectGrant_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SelectGrant' +type MockRootCoord_SelectGrant_Call struct { *mock.Call } // SelectGrant is a helper method to define mock.On call // - _a0 context.Context // - _a1 *milvuspb.SelectGrantRequest -func (_e *RootCoord_Expecter) SelectGrant(_a0 interface{}, _a1 interface{}) *RootCoord_SelectGrant_Call { - return &RootCoord_SelectGrant_Call{Call: _e.mock.On("SelectGrant", _a0, _a1)} +func (_e *MockRootCoord_Expecter) SelectGrant(_a0 interface{}, _a1 interface{}) *MockRootCoord_SelectGrant_Call { + return &MockRootCoord_SelectGrant_Call{Call: _e.mock.On("SelectGrant", _a0, _a1)} } -func (_c *RootCoord_SelectGrant_Call) Run(run func(_a0 context.Context, _a1 *milvuspb.SelectGrantRequest)) *RootCoord_SelectGrant_Call { +func (_c *MockRootCoord_SelectGrant_Call) Run(run func(_a0 context.Context, _a1 *milvuspb.SelectGrantRequest)) *MockRootCoord_SelectGrant_Call { _c.Call.Run(func(args mock.Arguments) { run(args[0].(context.Context), args[1].(*milvuspb.SelectGrantRequest)) }) return _c } -func (_c *RootCoord_SelectGrant_Call) Return(_a0 *milvuspb.SelectGrantResponse, _a1 error) *RootCoord_SelectGrant_Call { +func (_c *MockRootCoord_SelectGrant_Call) Return(_a0 *milvuspb.SelectGrantResponse, _a1 error) *MockRootCoord_SelectGrant_Call { _c.Call.Return(_a0, _a1) return _c } -func (_c *RootCoord_SelectGrant_Call) RunAndReturn(run func(context.Context, *milvuspb.SelectGrantRequest) (*milvuspb.SelectGrantResponse, error)) *RootCoord_SelectGrant_Call { +func (_c *MockRootCoord_SelectGrant_Call) RunAndReturn(run func(context.Context, *milvuspb.SelectGrantRequest) (*milvuspb.SelectGrantResponse, error)) *MockRootCoord_SelectGrant_Call { _c.Call.Return(run) return _c } // SelectRole provides a mock function with given fields: _a0, _a1 -func (_m *RootCoord) SelectRole(_a0 context.Context, _a1 *milvuspb.SelectRoleRequest) (*milvuspb.SelectRoleResponse, error) { +func (_m *MockRootCoord) SelectRole(_a0 context.Context, _a1 *milvuspb.SelectRoleRequest) (*milvuspb.SelectRoleResponse, error) { ret := _m.Called(_a0, _a1) if len(ret) == 0 { @@ -2996,37 +2988,37 @@ func (_m *RootCoord) SelectRole(_a0 context.Context, _a1 *milvuspb.SelectRoleReq return r0, r1 } -// RootCoord_SelectRole_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SelectRole' -type RootCoord_SelectRole_Call struct { +// MockRootCoord_SelectRole_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SelectRole' +type MockRootCoord_SelectRole_Call struct { *mock.Call } // SelectRole is a helper method to define mock.On call // - _a0 context.Context // - _a1 *milvuspb.SelectRoleRequest -func (_e *RootCoord_Expecter) SelectRole(_a0 interface{}, _a1 interface{}) *RootCoord_SelectRole_Call { - return &RootCoord_SelectRole_Call{Call: _e.mock.On("SelectRole", _a0, _a1)} +func (_e *MockRootCoord_Expecter) SelectRole(_a0 interface{}, _a1 interface{}) *MockRootCoord_SelectRole_Call { + return &MockRootCoord_SelectRole_Call{Call: _e.mock.On("SelectRole", _a0, _a1)} } -func (_c *RootCoord_SelectRole_Call) Run(run func(_a0 context.Context, _a1 *milvuspb.SelectRoleRequest)) *RootCoord_SelectRole_Call { +func (_c *MockRootCoord_SelectRole_Call) Run(run func(_a0 context.Context, _a1 *milvuspb.SelectRoleRequest)) *MockRootCoord_SelectRole_Call { _c.Call.Run(func(args mock.Arguments) { run(args[0].(context.Context), args[1].(*milvuspb.SelectRoleRequest)) }) return _c } -func (_c *RootCoord_SelectRole_Call) Return(_a0 *milvuspb.SelectRoleResponse, _a1 error) *RootCoord_SelectRole_Call { +func (_c *MockRootCoord_SelectRole_Call) Return(_a0 *milvuspb.SelectRoleResponse, _a1 error) *MockRootCoord_SelectRole_Call { _c.Call.Return(_a0, _a1) return _c } -func (_c *RootCoord_SelectRole_Call) RunAndReturn(run func(context.Context, *milvuspb.SelectRoleRequest) (*milvuspb.SelectRoleResponse, error)) *RootCoord_SelectRole_Call { +func (_c *MockRootCoord_SelectRole_Call) RunAndReturn(run func(context.Context, *milvuspb.SelectRoleRequest) (*milvuspb.SelectRoleResponse, error)) *MockRootCoord_SelectRole_Call { _c.Call.Return(run) return _c } // SelectUser provides a mock function with given fields: _a0, _a1 -func (_m *RootCoord) SelectUser(_a0 context.Context, _a1 *milvuspb.SelectUserRequest) (*milvuspb.SelectUserResponse, error) { +func (_m *MockRootCoord) SelectUser(_a0 context.Context, _a1 *milvuspb.SelectUserRequest) (*milvuspb.SelectUserResponse, error) { ret := _m.Called(_a0, _a1) if len(ret) == 0 { @@ -3055,191 +3047,112 @@ func (_m *RootCoord) SelectUser(_a0 context.Context, _a1 *milvuspb.SelectUserReq return r0, r1 } -// RootCoord_SelectUser_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SelectUser' -type RootCoord_SelectUser_Call struct { +// MockRootCoord_SelectUser_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SelectUser' +type MockRootCoord_SelectUser_Call struct { *mock.Call } // SelectUser is a helper method to define mock.On call // - _a0 context.Context // - _a1 *milvuspb.SelectUserRequest -func (_e *RootCoord_Expecter) SelectUser(_a0 interface{}, _a1 interface{}) *RootCoord_SelectUser_Call { - return &RootCoord_SelectUser_Call{Call: _e.mock.On("SelectUser", _a0, _a1)} +func (_e *MockRootCoord_Expecter) SelectUser(_a0 interface{}, _a1 interface{}) *MockRootCoord_SelectUser_Call { + return &MockRootCoord_SelectUser_Call{Call: _e.mock.On("SelectUser", _a0, _a1)} } -func (_c *RootCoord_SelectUser_Call) Run(run func(_a0 context.Context, _a1 *milvuspb.SelectUserRequest)) *RootCoord_SelectUser_Call { +func (_c *MockRootCoord_SelectUser_Call) Run(run func(_a0 context.Context, _a1 *milvuspb.SelectUserRequest)) *MockRootCoord_SelectUser_Call { _c.Call.Run(func(args mock.Arguments) { run(args[0].(context.Context), args[1].(*milvuspb.SelectUserRequest)) }) return _c } -func (_c *RootCoord_SelectUser_Call) Return(_a0 *milvuspb.SelectUserResponse, _a1 error) *RootCoord_SelectUser_Call { +func (_c *MockRootCoord_SelectUser_Call) Return(_a0 *milvuspb.SelectUserResponse, _a1 error) *MockRootCoord_SelectUser_Call { _c.Call.Return(_a0, _a1) return _c } -func (_c *RootCoord_SelectUser_Call) RunAndReturn(run func(context.Context, *milvuspb.SelectUserRequest) (*milvuspb.SelectUserResponse, error)) *RootCoord_SelectUser_Call { +func (_c *MockRootCoord_SelectUser_Call) RunAndReturn(run func(context.Context, *milvuspb.SelectUserRequest) (*milvuspb.SelectUserResponse, error)) *MockRootCoord_SelectUser_Call { _c.Call.Return(run) return _c } // SetAddress provides a mock function with given fields: address -func (_m *RootCoord) SetAddress(address string) { +func (_m *MockRootCoord) SetAddress(address string) { _m.Called(address) } -// RootCoord_SetAddress_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetAddress' -type RootCoord_SetAddress_Call struct { +// MockRootCoord_SetAddress_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetAddress' +type MockRootCoord_SetAddress_Call struct { *mock.Call } // SetAddress is a helper method to define mock.On call // - address string -func (_e *RootCoord_Expecter) SetAddress(address interface{}) *RootCoord_SetAddress_Call { - return &RootCoord_SetAddress_Call{Call: _e.mock.On("SetAddress", address)} +func (_e *MockRootCoord_Expecter) SetAddress(address interface{}) *MockRootCoord_SetAddress_Call { + return &MockRootCoord_SetAddress_Call{Call: _e.mock.On("SetAddress", address)} } -func (_c *RootCoord_SetAddress_Call) Run(run func(address string)) *RootCoord_SetAddress_Call { +func (_c *MockRootCoord_SetAddress_Call) Run(run func(address string)) *MockRootCoord_SetAddress_Call { _c.Call.Run(func(args mock.Arguments) { run(args[0].(string)) }) return _c } -func (_c *RootCoord_SetAddress_Call) Return() *RootCoord_SetAddress_Call { +func (_c *MockRootCoord_SetAddress_Call) Return() *MockRootCoord_SetAddress_Call { _c.Call.Return() return _c } -func (_c *RootCoord_SetAddress_Call) RunAndReturn(run func(string)) *RootCoord_SetAddress_Call { - _c.Call.Return(run) - return _c -} - -// SetDataCoordClient provides a mock function with given fields: dataCoord -func (_m *RootCoord) SetDataCoordClient(dataCoord types.DataCoordClient) error { - ret := _m.Called(dataCoord) - - if len(ret) == 0 { - panic("no return value specified for SetDataCoordClient") - } - - var r0 error - if rf, ok := ret.Get(0).(func(types.DataCoordClient) error); ok { - r0 = rf(dataCoord) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// RootCoord_SetDataCoordClient_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetDataCoordClient' -type RootCoord_SetDataCoordClient_Call struct { - *mock.Call -} - -// SetDataCoordClient is a helper method to define mock.On call -// - dataCoord types.DataCoordClient -func (_e *RootCoord_Expecter) SetDataCoordClient(dataCoord interface{}) *RootCoord_SetDataCoordClient_Call { - return &RootCoord_SetDataCoordClient_Call{Call: _e.mock.On("SetDataCoordClient", dataCoord)} -} - -func (_c *RootCoord_SetDataCoordClient_Call) Run(run func(dataCoord types.DataCoordClient)) *RootCoord_SetDataCoordClient_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(types.DataCoordClient)) - }) - return _c -} - -func (_c *RootCoord_SetDataCoordClient_Call) Return(_a0 error) *RootCoord_SetDataCoordClient_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *RootCoord_SetDataCoordClient_Call) RunAndReturn(run func(types.DataCoordClient) error) *RootCoord_SetDataCoordClient_Call { - _c.Call.Return(run) +func (_c *MockRootCoord_SetAddress_Call) RunAndReturn(run func(string)) *MockRootCoord_SetAddress_Call { + _c.Run(run) return _c } // SetEtcdClient provides a mock function with given fields: etcdClient -func (_m *RootCoord) SetEtcdClient(etcdClient *clientv3.Client) { +func (_m *MockRootCoord) SetEtcdClient(etcdClient *clientv3.Client) { _m.Called(etcdClient) } -// RootCoord_SetEtcdClient_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetEtcdClient' -type RootCoord_SetEtcdClient_Call struct { +// MockRootCoord_SetEtcdClient_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetEtcdClient' +type MockRootCoord_SetEtcdClient_Call struct { *mock.Call } // SetEtcdClient is a helper method to define mock.On call // - etcdClient *clientv3.Client -func (_e *RootCoord_Expecter) SetEtcdClient(etcdClient interface{}) *RootCoord_SetEtcdClient_Call { - return &RootCoord_SetEtcdClient_Call{Call: _e.mock.On("SetEtcdClient", etcdClient)} +func (_e *MockRootCoord_Expecter) SetEtcdClient(etcdClient interface{}) *MockRootCoord_SetEtcdClient_Call { + return &MockRootCoord_SetEtcdClient_Call{Call: _e.mock.On("SetEtcdClient", etcdClient)} } -func (_c *RootCoord_SetEtcdClient_Call) Run(run func(etcdClient *clientv3.Client)) *RootCoord_SetEtcdClient_Call { +func (_c *MockRootCoord_SetEtcdClient_Call) Run(run func(etcdClient *clientv3.Client)) *MockRootCoord_SetEtcdClient_Call { _c.Call.Run(func(args mock.Arguments) { run(args[0].(*clientv3.Client)) }) return _c } -func (_c *RootCoord_SetEtcdClient_Call) Return() *RootCoord_SetEtcdClient_Call { +func (_c *MockRootCoord_SetEtcdClient_Call) Return() *MockRootCoord_SetEtcdClient_Call { _c.Call.Return() return _c } -func (_c *RootCoord_SetEtcdClient_Call) RunAndReturn(run func(*clientv3.Client)) *RootCoord_SetEtcdClient_Call { - _c.Call.Return(run) +func (_c *MockRootCoord_SetEtcdClient_Call) RunAndReturn(run func(*clientv3.Client)) *MockRootCoord_SetEtcdClient_Call { + _c.Run(run) return _c } -// SetProxyCreator provides a mock function with given fields: _a0 -func (_m *RootCoord) SetProxyCreator(_a0 func(context.Context, string, int64) (types.ProxyClient, error)) { - _m.Called(_a0) -} - -// RootCoord_SetProxyCreator_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetProxyCreator' -type RootCoord_SetProxyCreator_Call struct { - *mock.Call -} - -// SetProxyCreator is a helper method to define mock.On call -// - _a0 func(context.Context , string , int64)(types.ProxyClient , error) -func (_e *RootCoord_Expecter) SetProxyCreator(_a0 interface{}) *RootCoord_SetProxyCreator_Call { - return &RootCoord_SetProxyCreator_Call{Call: _e.mock.On("SetProxyCreator", _a0)} -} - -func (_c *RootCoord_SetProxyCreator_Call) Run(run func(_a0 func(context.Context, string, int64) (types.ProxyClient, error))) *RootCoord_SetProxyCreator_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(func(context.Context, string, int64) (types.ProxyClient, error))) - }) - return _c -} - -func (_c *RootCoord_SetProxyCreator_Call) Return() *RootCoord_SetProxyCreator_Call { - _c.Call.Return() - return _c -} - -func (_c *RootCoord_SetProxyCreator_Call) RunAndReturn(run func(func(context.Context, string, int64) (types.ProxyClient, error))) *RootCoord_SetProxyCreator_Call { - _c.Call.Return(run) - return _c -} - -// SetQueryCoordClient provides a mock function with given fields: queryCoord -func (_m *RootCoord) SetQueryCoordClient(queryCoord types.QueryCoordClient) error { - ret := _m.Called(queryCoord) +// SetMixCoord provides a mock function with given fields: mixCoord +func (_m *MockRootCoord) SetMixCoord(mixCoord types.MixCoord) error { + ret := _m.Called(mixCoord) if len(ret) == 0 { - panic("no return value specified for SetQueryCoordClient") + panic("no return value specified for SetMixCoord") } var r0 error - if rf, ok := ret.Get(0).(func(types.QueryCoordClient) error); ok { - r0 = rf(queryCoord) + if rf, ok := ret.Get(0).(func(types.MixCoord) error); ok { + r0 = rf(mixCoord) } else { r0 = ret.Error(0) } @@ -3247,69 +3160,102 @@ func (_m *RootCoord) SetQueryCoordClient(queryCoord types.QueryCoordClient) erro return r0 } -// RootCoord_SetQueryCoordClient_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetQueryCoordClient' -type RootCoord_SetQueryCoordClient_Call struct { +// MockRootCoord_SetMixCoord_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetMixCoord' +type MockRootCoord_SetMixCoord_Call struct { *mock.Call } -// SetQueryCoordClient is a helper method to define mock.On call -// - queryCoord types.QueryCoordClient -func (_e *RootCoord_Expecter) SetQueryCoordClient(queryCoord interface{}) *RootCoord_SetQueryCoordClient_Call { - return &RootCoord_SetQueryCoordClient_Call{Call: _e.mock.On("SetQueryCoordClient", queryCoord)} +// SetMixCoord is a helper method to define mock.On call +// - mixCoord types.MixCoord +func (_e *MockRootCoord_Expecter) SetMixCoord(mixCoord interface{}) *MockRootCoord_SetMixCoord_Call { + return &MockRootCoord_SetMixCoord_Call{Call: _e.mock.On("SetMixCoord", mixCoord)} } -func (_c *RootCoord_SetQueryCoordClient_Call) Run(run func(queryCoord types.QueryCoordClient)) *RootCoord_SetQueryCoordClient_Call { +func (_c *MockRootCoord_SetMixCoord_Call) Run(run func(mixCoord types.MixCoord)) *MockRootCoord_SetMixCoord_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(types.QueryCoordClient)) + run(args[0].(types.MixCoord)) }) return _c } -func (_c *RootCoord_SetQueryCoordClient_Call) Return(_a0 error) *RootCoord_SetQueryCoordClient_Call { +func (_c *MockRootCoord_SetMixCoord_Call) Return(_a0 error) *MockRootCoord_SetMixCoord_Call { _c.Call.Return(_a0) return _c } -func (_c *RootCoord_SetQueryCoordClient_Call) RunAndReturn(run func(types.QueryCoordClient) error) *RootCoord_SetQueryCoordClient_Call { +func (_c *MockRootCoord_SetMixCoord_Call) RunAndReturn(run func(types.MixCoord) error) *MockRootCoord_SetMixCoord_Call { _c.Call.Return(run) return _c } +// SetProxyCreator provides a mock function with given fields: _a0 +func (_m *MockRootCoord) SetProxyCreator(_a0 func(context.Context, string, int64) (types.ProxyClient, error)) { + _m.Called(_a0) +} + +// MockRootCoord_SetProxyCreator_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetProxyCreator' +type MockRootCoord_SetProxyCreator_Call struct { + *mock.Call +} + +// SetProxyCreator is a helper method to define mock.On call +// - _a0 func(context.Context , string , int64)(types.ProxyClient , error) +func (_e *MockRootCoord_Expecter) SetProxyCreator(_a0 interface{}) *MockRootCoord_SetProxyCreator_Call { + return &MockRootCoord_SetProxyCreator_Call{Call: _e.mock.On("SetProxyCreator", _a0)} +} + +func (_c *MockRootCoord_SetProxyCreator_Call) Run(run func(_a0 func(context.Context, string, int64) (types.ProxyClient, error))) *MockRootCoord_SetProxyCreator_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(func(context.Context, string, int64) (types.ProxyClient, error))) + }) + return _c +} + +func (_c *MockRootCoord_SetProxyCreator_Call) Return() *MockRootCoord_SetProxyCreator_Call { + _c.Call.Return() + return _c +} + +func (_c *MockRootCoord_SetProxyCreator_Call) RunAndReturn(run func(func(context.Context, string, int64) (types.ProxyClient, error))) *MockRootCoord_SetProxyCreator_Call { + _c.Run(run) + return _c +} + // SetTiKVClient provides a mock function with given fields: client -func (_m *RootCoord) SetTiKVClient(client *txnkv.Client) { +func (_m *MockRootCoord) SetTiKVClient(client *txnkv.Client) { _m.Called(client) } -// RootCoord_SetTiKVClient_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetTiKVClient' -type RootCoord_SetTiKVClient_Call struct { +// MockRootCoord_SetTiKVClient_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetTiKVClient' +type MockRootCoord_SetTiKVClient_Call struct { *mock.Call } // SetTiKVClient is a helper method to define mock.On call // - client *txnkv.Client -func (_e *RootCoord_Expecter) SetTiKVClient(client interface{}) *RootCoord_SetTiKVClient_Call { - return &RootCoord_SetTiKVClient_Call{Call: _e.mock.On("SetTiKVClient", client)} +func (_e *MockRootCoord_Expecter) SetTiKVClient(client interface{}) *MockRootCoord_SetTiKVClient_Call { + return &MockRootCoord_SetTiKVClient_Call{Call: _e.mock.On("SetTiKVClient", client)} } -func (_c *RootCoord_SetTiKVClient_Call) Run(run func(client *txnkv.Client)) *RootCoord_SetTiKVClient_Call { +func (_c *MockRootCoord_SetTiKVClient_Call) Run(run func(client *txnkv.Client)) *MockRootCoord_SetTiKVClient_Call { _c.Call.Run(func(args mock.Arguments) { run(args[0].(*txnkv.Client)) }) return _c } -func (_c *RootCoord_SetTiKVClient_Call) Return() *RootCoord_SetTiKVClient_Call { +func (_c *MockRootCoord_SetTiKVClient_Call) Return() *MockRootCoord_SetTiKVClient_Call { _c.Call.Return() return _c } -func (_c *RootCoord_SetTiKVClient_Call) RunAndReturn(run func(*txnkv.Client)) *RootCoord_SetTiKVClient_Call { - _c.Call.Return(run) +func (_c *MockRootCoord_SetTiKVClient_Call) RunAndReturn(run func(*txnkv.Client)) *MockRootCoord_SetTiKVClient_Call { + _c.Run(run) return _c } // ShowCollectionIDs provides a mock function with given fields: _a0, _a1 -func (_m *RootCoord) ShowCollectionIDs(_a0 context.Context, _a1 *rootcoordpb.ShowCollectionIDsRequest) (*rootcoordpb.ShowCollectionIDsResponse, error) { +func (_m *MockRootCoord) ShowCollectionIDs(_a0 context.Context, _a1 *rootcoordpb.ShowCollectionIDsRequest) (*rootcoordpb.ShowCollectionIDsResponse, error) { ret := _m.Called(_a0, _a1) if len(ret) == 0 { @@ -3338,37 +3284,37 @@ func (_m *RootCoord) ShowCollectionIDs(_a0 context.Context, _a1 *rootcoordpb.Sho return r0, r1 } -// RootCoord_ShowCollectionIDs_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ShowCollectionIDs' -type RootCoord_ShowCollectionIDs_Call struct { +// MockRootCoord_ShowCollectionIDs_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ShowCollectionIDs' +type MockRootCoord_ShowCollectionIDs_Call struct { *mock.Call } // ShowCollectionIDs is a helper method to define mock.On call // - _a0 context.Context // - _a1 *rootcoordpb.ShowCollectionIDsRequest -func (_e *RootCoord_Expecter) ShowCollectionIDs(_a0 interface{}, _a1 interface{}) *RootCoord_ShowCollectionIDs_Call { - return &RootCoord_ShowCollectionIDs_Call{Call: _e.mock.On("ShowCollectionIDs", _a0, _a1)} +func (_e *MockRootCoord_Expecter) ShowCollectionIDs(_a0 interface{}, _a1 interface{}) *MockRootCoord_ShowCollectionIDs_Call { + return &MockRootCoord_ShowCollectionIDs_Call{Call: _e.mock.On("ShowCollectionIDs", _a0, _a1)} } -func (_c *RootCoord_ShowCollectionIDs_Call) Run(run func(_a0 context.Context, _a1 *rootcoordpb.ShowCollectionIDsRequest)) *RootCoord_ShowCollectionIDs_Call { +func (_c *MockRootCoord_ShowCollectionIDs_Call) Run(run func(_a0 context.Context, _a1 *rootcoordpb.ShowCollectionIDsRequest)) *MockRootCoord_ShowCollectionIDs_Call { _c.Call.Run(func(args mock.Arguments) { run(args[0].(context.Context), args[1].(*rootcoordpb.ShowCollectionIDsRequest)) }) return _c } -func (_c *RootCoord_ShowCollectionIDs_Call) Return(_a0 *rootcoordpb.ShowCollectionIDsResponse, _a1 error) *RootCoord_ShowCollectionIDs_Call { +func (_c *MockRootCoord_ShowCollectionIDs_Call) Return(_a0 *rootcoordpb.ShowCollectionIDsResponse, _a1 error) *MockRootCoord_ShowCollectionIDs_Call { _c.Call.Return(_a0, _a1) return _c } -func (_c *RootCoord_ShowCollectionIDs_Call) RunAndReturn(run func(context.Context, *rootcoordpb.ShowCollectionIDsRequest) (*rootcoordpb.ShowCollectionIDsResponse, error)) *RootCoord_ShowCollectionIDs_Call { +func (_c *MockRootCoord_ShowCollectionIDs_Call) RunAndReturn(run func(context.Context, *rootcoordpb.ShowCollectionIDsRequest) (*rootcoordpb.ShowCollectionIDsResponse, error)) *MockRootCoord_ShowCollectionIDs_Call { _c.Call.Return(run) return _c } // ShowCollections provides a mock function with given fields: _a0, _a1 -func (_m *RootCoord) ShowCollections(_a0 context.Context, _a1 *milvuspb.ShowCollectionsRequest) (*milvuspb.ShowCollectionsResponse, error) { +func (_m *MockRootCoord) ShowCollections(_a0 context.Context, _a1 *milvuspb.ShowCollectionsRequest) (*milvuspb.ShowCollectionsResponse, error) { ret := _m.Called(_a0, _a1) if len(ret) == 0 { @@ -3397,37 +3343,37 @@ func (_m *RootCoord) ShowCollections(_a0 context.Context, _a1 *milvuspb.ShowColl return r0, r1 } -// RootCoord_ShowCollections_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ShowCollections' -type RootCoord_ShowCollections_Call struct { +// MockRootCoord_ShowCollections_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ShowCollections' +type MockRootCoord_ShowCollections_Call struct { *mock.Call } // ShowCollections is a helper method to define mock.On call // - _a0 context.Context // - _a1 *milvuspb.ShowCollectionsRequest -func (_e *RootCoord_Expecter) ShowCollections(_a0 interface{}, _a1 interface{}) *RootCoord_ShowCollections_Call { - return &RootCoord_ShowCollections_Call{Call: _e.mock.On("ShowCollections", _a0, _a1)} +func (_e *MockRootCoord_Expecter) ShowCollections(_a0 interface{}, _a1 interface{}) *MockRootCoord_ShowCollections_Call { + return &MockRootCoord_ShowCollections_Call{Call: _e.mock.On("ShowCollections", _a0, _a1)} } -func (_c *RootCoord_ShowCollections_Call) Run(run func(_a0 context.Context, _a1 *milvuspb.ShowCollectionsRequest)) *RootCoord_ShowCollections_Call { +func (_c *MockRootCoord_ShowCollections_Call) Run(run func(_a0 context.Context, _a1 *milvuspb.ShowCollectionsRequest)) *MockRootCoord_ShowCollections_Call { _c.Call.Run(func(args mock.Arguments) { run(args[0].(context.Context), args[1].(*milvuspb.ShowCollectionsRequest)) }) return _c } -func (_c *RootCoord_ShowCollections_Call) Return(_a0 *milvuspb.ShowCollectionsResponse, _a1 error) *RootCoord_ShowCollections_Call { +func (_c *MockRootCoord_ShowCollections_Call) Return(_a0 *milvuspb.ShowCollectionsResponse, _a1 error) *MockRootCoord_ShowCollections_Call { _c.Call.Return(_a0, _a1) return _c } -func (_c *RootCoord_ShowCollections_Call) RunAndReturn(run func(context.Context, *milvuspb.ShowCollectionsRequest) (*milvuspb.ShowCollectionsResponse, error)) *RootCoord_ShowCollections_Call { +func (_c *MockRootCoord_ShowCollections_Call) RunAndReturn(run func(context.Context, *milvuspb.ShowCollectionsRequest) (*milvuspb.ShowCollectionsResponse, error)) *MockRootCoord_ShowCollections_Call { _c.Call.Return(run) return _c } // ShowConfigurations provides a mock function with given fields: _a0, _a1 -func (_m *RootCoord) ShowConfigurations(_a0 context.Context, _a1 *internalpb.ShowConfigurationsRequest) (*internalpb.ShowConfigurationsResponse, error) { +func (_m *MockRootCoord) ShowConfigurations(_a0 context.Context, _a1 *internalpb.ShowConfigurationsRequest) (*internalpb.ShowConfigurationsResponse, error) { ret := _m.Called(_a0, _a1) if len(ret) == 0 { @@ -3456,37 +3402,37 @@ func (_m *RootCoord) ShowConfigurations(_a0 context.Context, _a1 *internalpb.Sho return r0, r1 } -// RootCoord_ShowConfigurations_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ShowConfigurations' -type RootCoord_ShowConfigurations_Call struct { +// MockRootCoord_ShowConfigurations_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ShowConfigurations' +type MockRootCoord_ShowConfigurations_Call struct { *mock.Call } // ShowConfigurations is a helper method to define mock.On call // - _a0 context.Context // - _a1 *internalpb.ShowConfigurationsRequest -func (_e *RootCoord_Expecter) ShowConfigurations(_a0 interface{}, _a1 interface{}) *RootCoord_ShowConfigurations_Call { - return &RootCoord_ShowConfigurations_Call{Call: _e.mock.On("ShowConfigurations", _a0, _a1)} +func (_e *MockRootCoord_Expecter) ShowConfigurations(_a0 interface{}, _a1 interface{}) *MockRootCoord_ShowConfigurations_Call { + return &MockRootCoord_ShowConfigurations_Call{Call: _e.mock.On("ShowConfigurations", _a0, _a1)} } -func (_c *RootCoord_ShowConfigurations_Call) Run(run func(_a0 context.Context, _a1 *internalpb.ShowConfigurationsRequest)) *RootCoord_ShowConfigurations_Call { +func (_c *MockRootCoord_ShowConfigurations_Call) Run(run func(_a0 context.Context, _a1 *internalpb.ShowConfigurationsRequest)) *MockRootCoord_ShowConfigurations_Call { _c.Call.Run(func(args mock.Arguments) { run(args[0].(context.Context), args[1].(*internalpb.ShowConfigurationsRequest)) }) return _c } -func (_c *RootCoord_ShowConfigurations_Call) Return(_a0 *internalpb.ShowConfigurationsResponse, _a1 error) *RootCoord_ShowConfigurations_Call { +func (_c *MockRootCoord_ShowConfigurations_Call) Return(_a0 *internalpb.ShowConfigurationsResponse, _a1 error) *MockRootCoord_ShowConfigurations_Call { _c.Call.Return(_a0, _a1) return _c } -func (_c *RootCoord_ShowConfigurations_Call) RunAndReturn(run func(context.Context, *internalpb.ShowConfigurationsRequest) (*internalpb.ShowConfigurationsResponse, error)) *RootCoord_ShowConfigurations_Call { +func (_c *MockRootCoord_ShowConfigurations_Call) RunAndReturn(run func(context.Context, *internalpb.ShowConfigurationsRequest) (*internalpb.ShowConfigurationsResponse, error)) *MockRootCoord_ShowConfigurations_Call { _c.Call.Return(run) return _c } // ShowPartitions provides a mock function with given fields: _a0, _a1 -func (_m *RootCoord) ShowPartitions(_a0 context.Context, _a1 *milvuspb.ShowPartitionsRequest) (*milvuspb.ShowPartitionsResponse, error) { +func (_m *MockRootCoord) ShowPartitions(_a0 context.Context, _a1 *milvuspb.ShowPartitionsRequest) (*milvuspb.ShowPartitionsResponse, error) { ret := _m.Called(_a0, _a1) if len(ret) == 0 { @@ -3515,37 +3461,37 @@ func (_m *RootCoord) ShowPartitions(_a0 context.Context, _a1 *milvuspb.ShowParti return r0, r1 } -// RootCoord_ShowPartitions_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ShowPartitions' -type RootCoord_ShowPartitions_Call struct { +// MockRootCoord_ShowPartitions_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ShowPartitions' +type MockRootCoord_ShowPartitions_Call struct { *mock.Call } // ShowPartitions is a helper method to define mock.On call // - _a0 context.Context // - _a1 *milvuspb.ShowPartitionsRequest -func (_e *RootCoord_Expecter) ShowPartitions(_a0 interface{}, _a1 interface{}) *RootCoord_ShowPartitions_Call { - return &RootCoord_ShowPartitions_Call{Call: _e.mock.On("ShowPartitions", _a0, _a1)} +func (_e *MockRootCoord_Expecter) ShowPartitions(_a0 interface{}, _a1 interface{}) *MockRootCoord_ShowPartitions_Call { + return &MockRootCoord_ShowPartitions_Call{Call: _e.mock.On("ShowPartitions", _a0, _a1)} } -func (_c *RootCoord_ShowPartitions_Call) Run(run func(_a0 context.Context, _a1 *milvuspb.ShowPartitionsRequest)) *RootCoord_ShowPartitions_Call { +func (_c *MockRootCoord_ShowPartitions_Call) Run(run func(_a0 context.Context, _a1 *milvuspb.ShowPartitionsRequest)) *MockRootCoord_ShowPartitions_Call { _c.Call.Run(func(args mock.Arguments) { run(args[0].(context.Context), args[1].(*milvuspb.ShowPartitionsRequest)) }) return _c } -func (_c *RootCoord_ShowPartitions_Call) Return(_a0 *milvuspb.ShowPartitionsResponse, _a1 error) *RootCoord_ShowPartitions_Call { +func (_c *MockRootCoord_ShowPartitions_Call) Return(_a0 *milvuspb.ShowPartitionsResponse, _a1 error) *MockRootCoord_ShowPartitions_Call { _c.Call.Return(_a0, _a1) return _c } -func (_c *RootCoord_ShowPartitions_Call) RunAndReturn(run func(context.Context, *milvuspb.ShowPartitionsRequest) (*milvuspb.ShowPartitionsResponse, error)) *RootCoord_ShowPartitions_Call { +func (_c *MockRootCoord_ShowPartitions_Call) RunAndReturn(run func(context.Context, *milvuspb.ShowPartitionsRequest) (*milvuspb.ShowPartitionsResponse, error)) *MockRootCoord_ShowPartitions_Call { _c.Call.Return(run) return _c } // ShowPartitionsInternal provides a mock function with given fields: _a0, _a1 -func (_m *RootCoord) ShowPartitionsInternal(_a0 context.Context, _a1 *milvuspb.ShowPartitionsRequest) (*milvuspb.ShowPartitionsResponse, error) { +func (_m *MockRootCoord) ShowPartitionsInternal(_a0 context.Context, _a1 *milvuspb.ShowPartitionsRequest) (*milvuspb.ShowPartitionsResponse, error) { ret := _m.Called(_a0, _a1) if len(ret) == 0 { @@ -3574,37 +3520,37 @@ func (_m *RootCoord) ShowPartitionsInternal(_a0 context.Context, _a1 *milvuspb.S return r0, r1 } -// RootCoord_ShowPartitionsInternal_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ShowPartitionsInternal' -type RootCoord_ShowPartitionsInternal_Call struct { +// MockRootCoord_ShowPartitionsInternal_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ShowPartitionsInternal' +type MockRootCoord_ShowPartitionsInternal_Call struct { *mock.Call } // ShowPartitionsInternal is a helper method to define mock.On call // - _a0 context.Context // - _a1 *milvuspb.ShowPartitionsRequest -func (_e *RootCoord_Expecter) ShowPartitionsInternal(_a0 interface{}, _a1 interface{}) *RootCoord_ShowPartitionsInternal_Call { - return &RootCoord_ShowPartitionsInternal_Call{Call: _e.mock.On("ShowPartitionsInternal", _a0, _a1)} +func (_e *MockRootCoord_Expecter) ShowPartitionsInternal(_a0 interface{}, _a1 interface{}) *MockRootCoord_ShowPartitionsInternal_Call { + return &MockRootCoord_ShowPartitionsInternal_Call{Call: _e.mock.On("ShowPartitionsInternal", _a0, _a1)} } -func (_c *RootCoord_ShowPartitionsInternal_Call) Run(run func(_a0 context.Context, _a1 *milvuspb.ShowPartitionsRequest)) *RootCoord_ShowPartitionsInternal_Call { +func (_c *MockRootCoord_ShowPartitionsInternal_Call) Run(run func(_a0 context.Context, _a1 *milvuspb.ShowPartitionsRequest)) *MockRootCoord_ShowPartitionsInternal_Call { _c.Call.Run(func(args mock.Arguments) { run(args[0].(context.Context), args[1].(*milvuspb.ShowPartitionsRequest)) }) return _c } -func (_c *RootCoord_ShowPartitionsInternal_Call) Return(_a0 *milvuspb.ShowPartitionsResponse, _a1 error) *RootCoord_ShowPartitionsInternal_Call { +func (_c *MockRootCoord_ShowPartitionsInternal_Call) Return(_a0 *milvuspb.ShowPartitionsResponse, _a1 error) *MockRootCoord_ShowPartitionsInternal_Call { _c.Call.Return(_a0, _a1) return _c } -func (_c *RootCoord_ShowPartitionsInternal_Call) RunAndReturn(run func(context.Context, *milvuspb.ShowPartitionsRequest) (*milvuspb.ShowPartitionsResponse, error)) *RootCoord_ShowPartitionsInternal_Call { +func (_c *MockRootCoord_ShowPartitionsInternal_Call) RunAndReturn(run func(context.Context, *milvuspb.ShowPartitionsRequest) (*milvuspb.ShowPartitionsResponse, error)) *MockRootCoord_ShowPartitionsInternal_Call { _c.Call.Return(run) return _c } // ShowSegments provides a mock function with given fields: _a0, _a1 -func (_m *RootCoord) ShowSegments(_a0 context.Context, _a1 *milvuspb.ShowSegmentsRequest) (*milvuspb.ShowSegmentsResponse, error) { +func (_m *MockRootCoord) ShowSegments(_a0 context.Context, _a1 *milvuspb.ShowSegmentsRequest) (*milvuspb.ShowSegmentsResponse, error) { ret := _m.Called(_a0, _a1) if len(ret) == 0 { @@ -3633,37 +3579,37 @@ func (_m *RootCoord) ShowSegments(_a0 context.Context, _a1 *milvuspb.ShowSegment return r0, r1 } -// RootCoord_ShowSegments_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ShowSegments' -type RootCoord_ShowSegments_Call struct { +// MockRootCoord_ShowSegments_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ShowSegments' +type MockRootCoord_ShowSegments_Call struct { *mock.Call } // ShowSegments is a helper method to define mock.On call // - _a0 context.Context // - _a1 *milvuspb.ShowSegmentsRequest -func (_e *RootCoord_Expecter) ShowSegments(_a0 interface{}, _a1 interface{}) *RootCoord_ShowSegments_Call { - return &RootCoord_ShowSegments_Call{Call: _e.mock.On("ShowSegments", _a0, _a1)} +func (_e *MockRootCoord_Expecter) ShowSegments(_a0 interface{}, _a1 interface{}) *MockRootCoord_ShowSegments_Call { + return &MockRootCoord_ShowSegments_Call{Call: _e.mock.On("ShowSegments", _a0, _a1)} } -func (_c *RootCoord_ShowSegments_Call) Run(run func(_a0 context.Context, _a1 *milvuspb.ShowSegmentsRequest)) *RootCoord_ShowSegments_Call { +func (_c *MockRootCoord_ShowSegments_Call) Run(run func(_a0 context.Context, _a1 *milvuspb.ShowSegmentsRequest)) *MockRootCoord_ShowSegments_Call { _c.Call.Run(func(args mock.Arguments) { run(args[0].(context.Context), args[1].(*milvuspb.ShowSegmentsRequest)) }) return _c } -func (_c *RootCoord_ShowSegments_Call) Return(_a0 *milvuspb.ShowSegmentsResponse, _a1 error) *RootCoord_ShowSegments_Call { +func (_c *MockRootCoord_ShowSegments_Call) Return(_a0 *milvuspb.ShowSegmentsResponse, _a1 error) *MockRootCoord_ShowSegments_Call { _c.Call.Return(_a0, _a1) return _c } -func (_c *RootCoord_ShowSegments_Call) RunAndReturn(run func(context.Context, *milvuspb.ShowSegmentsRequest) (*milvuspb.ShowSegmentsResponse, error)) *RootCoord_ShowSegments_Call { +func (_c *MockRootCoord_ShowSegments_Call) RunAndReturn(run func(context.Context, *milvuspb.ShowSegmentsRequest) (*milvuspb.ShowSegmentsResponse, error)) *MockRootCoord_ShowSegments_Call { _c.Call.Return(run) return _c } -// Start provides a mock function with given fields: -func (_m *RootCoord) Start() error { +// Start provides a mock function with no fields +func (_m *MockRootCoord) Start() error { ret := _m.Called() if len(ret) == 0 { @@ -3680,35 +3626,35 @@ func (_m *RootCoord) Start() error { return r0 } -// RootCoord_Start_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Start' -type RootCoord_Start_Call struct { +// MockRootCoord_Start_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Start' +type MockRootCoord_Start_Call struct { *mock.Call } // Start is a helper method to define mock.On call -func (_e *RootCoord_Expecter) Start() *RootCoord_Start_Call { - return &RootCoord_Start_Call{Call: _e.mock.On("Start")} +func (_e *MockRootCoord_Expecter) Start() *MockRootCoord_Start_Call { + return &MockRootCoord_Start_Call{Call: _e.mock.On("Start")} } -func (_c *RootCoord_Start_Call) Run(run func()) *RootCoord_Start_Call { +func (_c *MockRootCoord_Start_Call) Run(run func()) *MockRootCoord_Start_Call { _c.Call.Run(func(args mock.Arguments) { run() }) return _c } -func (_c *RootCoord_Start_Call) Return(_a0 error) *RootCoord_Start_Call { +func (_c *MockRootCoord_Start_Call) Return(_a0 error) *MockRootCoord_Start_Call { _c.Call.Return(_a0) return _c } -func (_c *RootCoord_Start_Call) RunAndReturn(run func() error) *RootCoord_Start_Call { +func (_c *MockRootCoord_Start_Call) RunAndReturn(run func() error) *MockRootCoord_Start_Call { _c.Call.Return(run) return _c } -// Stop provides a mock function with given fields: -func (_m *RootCoord) Stop() error { +// Stop provides a mock function with no fields +func (_m *MockRootCoord) Stop() error { ret := _m.Called() if len(ret) == 0 { @@ -3725,35 +3671,35 @@ func (_m *RootCoord) Stop() error { return r0 } -// RootCoord_Stop_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Stop' -type RootCoord_Stop_Call struct { +// MockRootCoord_Stop_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Stop' +type MockRootCoord_Stop_Call struct { *mock.Call } // Stop is a helper method to define mock.On call -func (_e *RootCoord_Expecter) Stop() *RootCoord_Stop_Call { - return &RootCoord_Stop_Call{Call: _e.mock.On("Stop")} +func (_e *MockRootCoord_Expecter) Stop() *MockRootCoord_Stop_Call { + return &MockRootCoord_Stop_Call{Call: _e.mock.On("Stop")} } -func (_c *RootCoord_Stop_Call) Run(run func()) *RootCoord_Stop_Call { +func (_c *MockRootCoord_Stop_Call) Run(run func()) *MockRootCoord_Stop_Call { _c.Call.Run(func(args mock.Arguments) { run() }) return _c } -func (_c *RootCoord_Stop_Call) Return(_a0 error) *RootCoord_Stop_Call { +func (_c *MockRootCoord_Stop_Call) Return(_a0 error) *MockRootCoord_Stop_Call { _c.Call.Return(_a0) return _c } -func (_c *RootCoord_Stop_Call) RunAndReturn(run func() error) *RootCoord_Stop_Call { +func (_c *MockRootCoord_Stop_Call) RunAndReturn(run func() error) *MockRootCoord_Stop_Call { _c.Call.Return(run) return _c } // UpdateChannelTimeTick provides a mock function with given fields: _a0, _a1 -func (_m *RootCoord) UpdateChannelTimeTick(_a0 context.Context, _a1 *internalpb.ChannelTimeTickMsg) (*commonpb.Status, error) { +func (_m *MockRootCoord) UpdateChannelTimeTick(_a0 context.Context, _a1 *internalpb.ChannelTimeTickMsg) (*commonpb.Status, error) { ret := _m.Called(_a0, _a1) if len(ret) == 0 { @@ -3782,37 +3728,37 @@ func (_m *RootCoord) UpdateChannelTimeTick(_a0 context.Context, _a1 *internalpb. return r0, r1 } -// RootCoord_UpdateChannelTimeTick_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UpdateChannelTimeTick' -type RootCoord_UpdateChannelTimeTick_Call struct { +// MockRootCoord_UpdateChannelTimeTick_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UpdateChannelTimeTick' +type MockRootCoord_UpdateChannelTimeTick_Call struct { *mock.Call } // UpdateChannelTimeTick is a helper method to define mock.On call // - _a0 context.Context // - _a1 *internalpb.ChannelTimeTickMsg -func (_e *RootCoord_Expecter) UpdateChannelTimeTick(_a0 interface{}, _a1 interface{}) *RootCoord_UpdateChannelTimeTick_Call { - return &RootCoord_UpdateChannelTimeTick_Call{Call: _e.mock.On("UpdateChannelTimeTick", _a0, _a1)} +func (_e *MockRootCoord_Expecter) UpdateChannelTimeTick(_a0 interface{}, _a1 interface{}) *MockRootCoord_UpdateChannelTimeTick_Call { + return &MockRootCoord_UpdateChannelTimeTick_Call{Call: _e.mock.On("UpdateChannelTimeTick", _a0, _a1)} } -func (_c *RootCoord_UpdateChannelTimeTick_Call) Run(run func(_a0 context.Context, _a1 *internalpb.ChannelTimeTickMsg)) *RootCoord_UpdateChannelTimeTick_Call { +func (_c *MockRootCoord_UpdateChannelTimeTick_Call) Run(run func(_a0 context.Context, _a1 *internalpb.ChannelTimeTickMsg)) *MockRootCoord_UpdateChannelTimeTick_Call { _c.Call.Run(func(args mock.Arguments) { run(args[0].(context.Context), args[1].(*internalpb.ChannelTimeTickMsg)) }) return _c } -func (_c *RootCoord_UpdateChannelTimeTick_Call) Return(_a0 *commonpb.Status, _a1 error) *RootCoord_UpdateChannelTimeTick_Call { +func (_c *MockRootCoord_UpdateChannelTimeTick_Call) Return(_a0 *commonpb.Status, _a1 error) *MockRootCoord_UpdateChannelTimeTick_Call { _c.Call.Return(_a0, _a1) return _c } -func (_c *RootCoord_UpdateChannelTimeTick_Call) RunAndReturn(run func(context.Context, *internalpb.ChannelTimeTickMsg) (*commonpb.Status, error)) *RootCoord_UpdateChannelTimeTick_Call { +func (_c *MockRootCoord_UpdateChannelTimeTick_Call) RunAndReturn(run func(context.Context, *internalpb.ChannelTimeTickMsg) (*commonpb.Status, error)) *MockRootCoord_UpdateChannelTimeTick_Call { _c.Call.Return(run) return _c } // UpdateCredential provides a mock function with given fields: _a0, _a1 -func (_m *RootCoord) UpdateCredential(_a0 context.Context, _a1 *internalpb.CredentialInfo) (*commonpb.Status, error) { +func (_m *MockRootCoord) UpdateCredential(_a0 context.Context, _a1 *internalpb.CredentialInfo) (*commonpb.Status, error) { ret := _m.Called(_a0, _a1) if len(ret) == 0 { @@ -3841,75 +3787,75 @@ func (_m *RootCoord) UpdateCredential(_a0 context.Context, _a1 *internalpb.Crede return r0, r1 } -// RootCoord_UpdateCredential_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UpdateCredential' -type RootCoord_UpdateCredential_Call struct { +// MockRootCoord_UpdateCredential_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UpdateCredential' +type MockRootCoord_UpdateCredential_Call struct { *mock.Call } // UpdateCredential is a helper method to define mock.On call // - _a0 context.Context // - _a1 *internalpb.CredentialInfo -func (_e *RootCoord_Expecter) UpdateCredential(_a0 interface{}, _a1 interface{}) *RootCoord_UpdateCredential_Call { - return &RootCoord_UpdateCredential_Call{Call: _e.mock.On("UpdateCredential", _a0, _a1)} +func (_e *MockRootCoord_Expecter) UpdateCredential(_a0 interface{}, _a1 interface{}) *MockRootCoord_UpdateCredential_Call { + return &MockRootCoord_UpdateCredential_Call{Call: _e.mock.On("UpdateCredential", _a0, _a1)} } -func (_c *RootCoord_UpdateCredential_Call) Run(run func(_a0 context.Context, _a1 *internalpb.CredentialInfo)) *RootCoord_UpdateCredential_Call { +func (_c *MockRootCoord_UpdateCredential_Call) Run(run func(_a0 context.Context, _a1 *internalpb.CredentialInfo)) *MockRootCoord_UpdateCredential_Call { _c.Call.Run(func(args mock.Arguments) { run(args[0].(context.Context), args[1].(*internalpb.CredentialInfo)) }) return _c } -func (_c *RootCoord_UpdateCredential_Call) Return(_a0 *commonpb.Status, _a1 error) *RootCoord_UpdateCredential_Call { +func (_c *MockRootCoord_UpdateCredential_Call) Return(_a0 *commonpb.Status, _a1 error) *MockRootCoord_UpdateCredential_Call { _c.Call.Return(_a0, _a1) return _c } -func (_c *RootCoord_UpdateCredential_Call) RunAndReturn(run func(context.Context, *internalpb.CredentialInfo) (*commonpb.Status, error)) *RootCoord_UpdateCredential_Call { +func (_c *MockRootCoord_UpdateCredential_Call) RunAndReturn(run func(context.Context, *internalpb.CredentialInfo) (*commonpb.Status, error)) *MockRootCoord_UpdateCredential_Call { _c.Call.Return(run) return _c } // UpdateStateCode provides a mock function with given fields: _a0 -func (_m *RootCoord) UpdateStateCode(_a0 commonpb.StateCode) { +func (_m *MockRootCoord) UpdateStateCode(_a0 commonpb.StateCode) { _m.Called(_a0) } -// RootCoord_UpdateStateCode_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UpdateStateCode' -type RootCoord_UpdateStateCode_Call struct { +// MockRootCoord_UpdateStateCode_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UpdateStateCode' +type MockRootCoord_UpdateStateCode_Call struct { *mock.Call } // UpdateStateCode is a helper method to define mock.On call // - _a0 commonpb.StateCode -func (_e *RootCoord_Expecter) UpdateStateCode(_a0 interface{}) *RootCoord_UpdateStateCode_Call { - return &RootCoord_UpdateStateCode_Call{Call: _e.mock.On("UpdateStateCode", _a0)} +func (_e *MockRootCoord_Expecter) UpdateStateCode(_a0 interface{}) *MockRootCoord_UpdateStateCode_Call { + return &MockRootCoord_UpdateStateCode_Call{Call: _e.mock.On("UpdateStateCode", _a0)} } -func (_c *RootCoord_UpdateStateCode_Call) Run(run func(_a0 commonpb.StateCode)) *RootCoord_UpdateStateCode_Call { +func (_c *MockRootCoord_UpdateStateCode_Call) Run(run func(_a0 commonpb.StateCode)) *MockRootCoord_UpdateStateCode_Call { _c.Call.Run(func(args mock.Arguments) { run(args[0].(commonpb.StateCode)) }) return _c } -func (_c *RootCoord_UpdateStateCode_Call) Return() *RootCoord_UpdateStateCode_Call { +func (_c *MockRootCoord_UpdateStateCode_Call) Return() *MockRootCoord_UpdateStateCode_Call { _c.Call.Return() return _c } -func (_c *RootCoord_UpdateStateCode_Call) RunAndReturn(run func(commonpb.StateCode)) *RootCoord_UpdateStateCode_Call { - _c.Call.Return(run) +func (_c *MockRootCoord_UpdateStateCode_Call) RunAndReturn(run func(commonpb.StateCode)) *MockRootCoord_UpdateStateCode_Call { + _c.Run(run) return _c } -// NewRootCoord creates a new instance of RootCoord. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +// NewMockRootCoord creates a new instance of MockRootCoord. 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 NewRootCoord(t interface { +func NewMockRootCoord(t interface { mock.TestingT Cleanup(func()) -}) *RootCoord { - mock := &RootCoord{} +}) *MockRootCoord { + mock := &MockRootCoord{} mock.Mock.Test(t) t.Cleanup(func() { mock.AssertExpectations(t) }) diff --git a/internal/mocks/mock_rootcoord_client.go b/internal/mocks/mock_rootcoord_client.go index 5866e5b979..d277fedbeb 100644 --- a/internal/mocks/mock_rootcoord_client.go +++ b/internal/mocks/mock_rootcoord_client.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.46.0. DO NOT EDIT. +// Code generated by mockery v2.53.3. DO NOT EDIT. package mocks @@ -699,7 +699,7 @@ func (_c *MockRootCoordClient_CheckHealth_Call) RunAndReturn(run func(context.Co return _c } -// Close provides a mock function with given fields: +// Close provides a mock function with no fields func (_m *MockRootCoordClient) Close() error { ret := _m.Called() @@ -2372,6 +2372,80 @@ func (_c *MockRootCoordClient_GetPChannelInfo_Call) RunAndReturn(run func(contex return _c } +// GetQuotaMetrics provides a mock function with given fields: ctx, in, opts +func (_m *MockRootCoordClient) GetQuotaMetrics(ctx context.Context, in *internalpb.GetQuotaMetricsRequest, opts ...grpc.CallOption) (*internalpb.GetQuotaMetricsResponse, 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 GetQuotaMetrics") + } + + var r0 *internalpb.GetQuotaMetricsResponse + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, *internalpb.GetQuotaMetricsRequest, ...grpc.CallOption) (*internalpb.GetQuotaMetricsResponse, error)); ok { + return rf(ctx, in, opts...) + } + if rf, ok := ret.Get(0).(func(context.Context, *internalpb.GetQuotaMetricsRequest, ...grpc.CallOption) *internalpb.GetQuotaMetricsResponse); ok { + r0 = rf(ctx, in, opts...) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*internalpb.GetQuotaMetricsResponse) + } + } + + if rf, ok := ret.Get(1).(func(context.Context, *internalpb.GetQuotaMetricsRequest, ...grpc.CallOption) error); ok { + r1 = rf(ctx, in, opts...) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// MockRootCoordClient_GetQuotaMetrics_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetQuotaMetrics' +type MockRootCoordClient_GetQuotaMetrics_Call struct { + *mock.Call +} + +// GetQuotaMetrics is a helper method to define mock.On call +// - ctx context.Context +// - in *internalpb.GetQuotaMetricsRequest +// - opts ...grpc.CallOption +func (_e *MockRootCoordClient_Expecter) GetQuotaMetrics(ctx interface{}, in interface{}, opts ...interface{}) *MockRootCoordClient_GetQuotaMetrics_Call { + return &MockRootCoordClient_GetQuotaMetrics_Call{Call: _e.mock.On("GetQuotaMetrics", + append([]interface{}{ctx, in}, opts...)...)} +} + +func (_c *MockRootCoordClient_GetQuotaMetrics_Call) Run(run func(ctx context.Context, in *internalpb.GetQuotaMetricsRequest, opts ...grpc.CallOption)) *MockRootCoordClient_GetQuotaMetrics_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.GetQuotaMetricsRequest), variadicArgs...) + }) + return _c +} + +func (_c *MockRootCoordClient_GetQuotaMetrics_Call) Return(_a0 *internalpb.GetQuotaMetricsResponse, _a1 error) *MockRootCoordClient_GetQuotaMetrics_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *MockRootCoordClient_GetQuotaMetrics_Call) RunAndReturn(run func(context.Context, *internalpb.GetQuotaMetricsRequest, ...grpc.CallOption) (*internalpb.GetQuotaMetricsResponse, error)) *MockRootCoordClient_GetQuotaMetrics_Call { + _c.Call.Return(run) + return _c +} + // GetStatisticsChannel provides a mock function with given fields: ctx, in, opts func (_m *MockRootCoordClient) GetStatisticsChannel(ctx context.Context, in *internalpb.GetStatisticsChannelRequest, opts ...grpc.CallOption) (*milvuspb.StringResponse, error) { _va := make([]interface{}, len(opts)) diff --git a/internal/proxy/impl.go b/internal/proxy/impl.go index 2184228803..3e37099421 100644 --- a/internal/proxy/impl.go +++ b/internal/proxy/impl.go @@ -4428,7 +4428,7 @@ func (node *Proxy) GetSegmentsInfo(ctx context.Context, req *internalpb.GetSegme defer func() { metrics.ProxyFunctionCall.WithLabelValues(nodeID, method, metrics.TotalLabel, req.GetDbName(), collection).Inc() if resp.GetStatus().GetCode() != 0 { - log.Warn("import failed", zap.String("err", resp.GetStatus().GetReason())) + log.Warn("GetSegmentsInfo failed", zap.String("err", resp.GetStatus().GetReason())) metrics.ProxyFunctionCall.WithLabelValues(nodeID, method, metrics.FailLabel, req.GetDbName(), collection).Inc() } else { metrics.ProxyFunctionCall.WithLabelValues(nodeID, method, metrics.SuccessLabel, req.GetDbName(), collection).Inc() @@ -7112,3 +7112,35 @@ func (node *Proxy) RunAnalyzer(ctx context.Context, req *milvuspb.RunAnalyzerReq } return task.result, nil } + +func (node *Proxy) GetQuotaMetrics(ctx context.Context, req *internalpb.GetQuotaMetricsRequest) (*internalpb.GetQuotaMetricsResponse, error) { + ctx, sp := otel.Tracer(typeutil.ProxyRole).Start(ctx, "Proxy-GetQuotaMetrics") + defer sp.End() + + log := log.Ctx(ctx) + + if err := merr.CheckHealthy(node.GetStateCode()); err != nil { + return &internalpb.GetQuotaMetricsResponse{ + Status: merr.Status(err), + }, nil + } + + log.Info("receive GetQuotaMetrics request") + + metricsResp, err := node.mixCoord.GetQuotaMetrics(ctx, req) + if err != nil { + log.Warn("GetQuotaMetrics fail", + zap.Error(err)) + metricsResp.Status = merr.Status(err) + return metricsResp, nil + } + err = merr.Error(metricsResp.GetStatus()) + if err != nil { + metricsResp.Status = merr.Status(err) + return metricsResp, nil + } + + log.Info("GetQuotaMetrics success", zap.String("metrics", metricsResp.GetMetricsInfo())) + + return metricsResp, nil +} diff --git a/internal/proxy/metrics_info.go b/internal/proxy/metrics_info.go index bb7deb6abf..7a2a6685df 100644 --- a/internal/proxy/metrics_info.go +++ b/internal/proxy/metrics_info.go @@ -38,7 +38,7 @@ type ( ) // getQuotaMetrics returns ProxyQuotaMetrics. -func getQuotaMetrics() (*metricsinfo.ProxyQuotaMetrics, error) { +func getQuotaMetrics(node *Proxy) (*metricsinfo.ProxyQuotaMetrics, error) { var err error rms := make([]metricsinfo.RateMetric, 0) getRateMetric := func(label string) { @@ -77,14 +77,15 @@ func getQuotaMetrics() (*metricsinfo.ProxyQuotaMetrics, error) { return nil, err } return &metricsinfo.ProxyQuotaMetrics{ - Hms: metricsinfo.HardwareMetrics{}, - Rms: rms, + Hms: metricsinfo.HardwareMetrics{}, + Rms: rms, + QueueMetrics: node.sched.getMetrics(), }, nil } // getProxyMetrics get metrics of Proxy, not including the topological metrics of Query cluster and Data cluster. func getProxyMetrics(ctx context.Context, request *milvuspb.GetMetricsRequest, node *Proxy) (*milvuspb.GetMetricsResponse, error) { - quotaMetrics, err := getQuotaMetrics() + quotaMetrics, err := getQuotaMetrics(node) if err != nil { return nil, err } diff --git a/internal/proxy/metrics_info_test.go b/internal/proxy/metrics_info_test.go index b2619deee1..bfba5bf444 100644 --- a/internal/proxy/metrics_info_test.go +++ b/internal/proxy/metrics_info_test.go @@ -19,6 +19,7 @@ package proxy import ( "context" "testing" + "time" "github.com/stretchr/testify/assert" @@ -41,6 +42,94 @@ func TestProxy_metrics(t *testing.T) { assert.NotNil(t, resp) } +func createMockDDQueue() *ddTaskQueue { + q := &ddTaskQueue{ + baseTaskQueue: newBaseTaskQueue(nil), + } + q.unissuedTasks.PushBack(&createCollectionTask{ + baseTask: baseTask{ + onEnqueueTime: time.Now(), + }, + }) + q.unissuedTasks.PushBack(&createPartitionTask{ + baseTask: baseTask{ + onEnqueueTime: time.Now(), + }, + }) + q.activeTasks[1] = &loadCollectionTask{ + baseTask: baseTask{ + onEnqueueTime: time.Now(), + }, + } + return q +} + +func createMockDMQueue() *dmTaskQueue { + q := &dmTaskQueue{ + baseTaskQueue: newBaseTaskQueue(nil), + } + q.unissuedTasks.PushBack(&insertTask{ + baseTask: baseTask{ + onEnqueueTime: time.Now(), + }, + }) + q.unissuedTasks.PushBack(&upsertTask{ + baseTask: baseTask{ + onEnqueueTime: time.Now(), + }, + }) + q.activeTasks[1] = &deleteTask{ + baseTask: baseTask{ + onEnqueueTime: time.Now(), + }, + } + return q +} + +func createMockDQQueue() *dqTaskQueue { + q := &dqTaskQueue{ + baseTaskQueue: newBaseTaskQueue(nil), + } + q.unissuedTasks.PushBack(&queryTask{ + baseTask: baseTask{ + onEnqueueTime: time.Now(), + }, + }) + q.unissuedTasks.PushBack(&searchTask{ + baseTask: baseTask{ + onEnqueueTime: time.Now(), + }, + }) + q.activeTasks[1] = &queryTask{ + baseTask: baseTask{ + onEnqueueTime: time.Now(), + }, + } + return q +} + +func createMockDCQueue() *ddTaskQueue { + q := &ddTaskQueue{ + baseTaskQueue: newBaseTaskQueue(nil), + } + q.unissuedTasks.PushBack(&flushTask{ + baseTask: baseTask{ + onEnqueueTime: time.Now(), + }, + }) + q.unissuedTasks.PushBack(&flushTask{ + baseTask: baseTask{ + onEnqueueTime: time.Now(), + }, + }) + q.activeTasks[1] = &flushTask{ + baseTask: baseTask{ + onEnqueueTime: time.Now(), + }, + } + return q +} + func getMockProxyRequestMetrics() *Proxy { mixc := NewMixCoordMock() defer mixc.Close() @@ -48,6 +137,12 @@ func getMockProxyRequestMetrics() *Proxy { proxy := &Proxy{ mixCoord: mixc, session: &sessionutil.Session{SessionRaw: sessionutil.SessionRaw{Address: funcutil.GenRandomStr()}}, + sched: &taskScheduler{ + ddQueue: createMockDDQueue(), + dmQueue: createMockDMQueue(), + dqQueue: createMockDQQueue(), + dcQueue: createMockDCQueue(), + }, } mixc.getMetricsFunc = func(ctx context.Context, request *milvuspb.GetMetricsRequest) (*milvuspb.GetMetricsResponse, error) { diff --git a/internal/proxy/rootcoord_mock_test.go b/internal/proxy/rootcoord_mock_test.go index 931e50f9e1..f58161d6ae 100644 --- a/internal/proxy/rootcoord_mock_test.go +++ b/internal/proxy/rootcoord_mock_test.go @@ -1615,6 +1615,10 @@ func (coord *MixCoordMock) GetRecoveryInfoV2(ctx context.Context, in *datapb.Get func (coord *MixCoordMock) Search() { } +func (coord *MixCoordMock) GetQuotaMetrics(ctx context.Context, in *internalpb.GetQuotaMetricsRequest, opts ...grpc.CallOption) (*internalpb.GetQuotaMetricsResponse, error) { + return &internalpb.GetQuotaMetricsResponse{}, nil +} + type DescribeCollectionFunc func(ctx context.Context, request *milvuspb.DescribeCollectionRequest, opts ...grpc.CallOption) (*milvuspb.DescribeCollectionResponse, error) type ShowPartitionsFunc func(ctx context.Context, request *milvuspb.ShowPartitionsRequest, opts ...grpc.CallOption) (*milvuspb.ShowPartitionsResponse, error) diff --git a/internal/proxy/task.go b/internal/proxy/task.go index 13cebc8e76..0d5948d0b1 100644 --- a/internal/proxy/task.go +++ b/internal/proxy/task.go @@ -144,10 +144,13 @@ type task interface { SetOnEnqueueTime() GetDurationInQueue() time.Duration IsSubTask() bool + SetExecutingTime() + GetDurationInExecuting() time.Duration } type baseTask struct { onEnqueueTime time.Time + executingTime time.Time } func (bt *baseTask) CanSkipAllocTimestamp() bool { @@ -166,6 +169,14 @@ func (bt *baseTask) IsSubTask() bool { return false } +func (bt *baseTask) SetExecutingTime() { + bt.executingTime = time.Now() +} + +func (bt *baseTask) GetDurationInExecuting() time.Duration { + return time.Since(bt.executingTime) +} + type dmlTask interface { task setChannels() error diff --git a/internal/proxy/task_scheduler.go b/internal/proxy/task_scheduler.go index 5dc8d92a27..410780e92f 100644 --- a/internal/proxy/task_scheduler.go +++ b/internal/proxy/task_scheduler.go @@ -19,6 +19,7 @@ package proxy import ( "container/list" "context" + "math" "strconv" "sync" "time" @@ -31,6 +32,7 @@ import ( "github.com/milvus-io/milvus/pkg/v2/mq/msgstream" "github.com/milvus-io/milvus/pkg/v2/util/conc" "github.com/milvus-io/milvus/pkg/v2/util/merr" + "github.com/milvus-io/milvus/pkg/v2/util/metricsinfo" "github.com/milvus-io/milvus/pkg/v2/util/paramtable" "github.com/milvus-io/milvus/pkg/v2/util/tsoutil" "github.com/milvus-io/milvus/pkg/v2/util/typeutil" @@ -131,6 +133,7 @@ func (queue *baseTaskQueue) AddActiveTask(t task) { } queue.activeTasks[tID] = t + t.SetExecutingTime() } func (queue *baseTaskQueue) PopActiveTask(taskID UniqueID) task { @@ -650,3 +653,114 @@ func (sched *taskScheduler) Close() { func (sched *taskScheduler) getPChanStatistics() (map[pChan]*pChanStatistics, error) { return sched.dmQueue.getPChanStatsInfo() } + +func (sched *taskScheduler) getTaskQueueMetrics(queue *baseTaskQueue, queueType string) metricsinfo.TaskQueueMetrics { + pendingTaskStats := make(map[string]*TaskStatsTracker, 0) + executingTaskStats := make(map[string]*TaskStatsTracker, 0) + queue.atLock.RLock() + atNum := len(queue.activeTasks) + for _, task := range queue.activeTasks { + taskType := task.Name() + executingTime := task.GetDurationInExecuting().Milliseconds() + + tracker, ok := executingTaskStats[taskType] + if !ok { + tracker = NewTaskStatsTracker(taskType) + executingTaskStats[taskType] = tracker + } + tracker.AddSample(executingTime) + } + executingTaskMetrics := make([]metricsinfo.TaskMetrics, 0, len(executingTaskStats)) + for _, tracker := range executingTaskStats { + executingTaskMetrics = append(executingTaskMetrics, metricsinfo.TaskMetrics{ + Type: tracker.TaskType, + MaxQueueTime: tracker.MaxQueueTime, + MinQueueTime: tracker.MinQueueTime, + AvgQueueTime: tracker.AvgQueueTime(), + Count: tracker.Count, + }) + } + queue.atLock.RUnlock() + + queue.utLock.RLock() + defer queue.utLock.RUnlock() + utNum := queue.unissuedTasks.Len() + + for e := queue.unissuedTasks.Front(); e != nil; e = e.Next() { + task := e.Value.(task) + taskType := task.Name() + queueTimeMs := task.GetDurationInQueue().Milliseconds() + + tracker, ok := pendingTaskStats[taskType] + if !ok { + tracker = NewTaskStatsTracker(taskType) + pendingTaskStats[taskType] = tracker + } + + tracker.AddSample(queueTimeMs) + } + + pendingTaskMetrics := make([]metricsinfo.TaskMetrics, 0, len(pendingTaskStats)) + for _, tracker := range pendingTaskStats { + pendingTaskMetrics = append(pendingTaskMetrics, metricsinfo.TaskMetrics{ + Type: tracker.TaskType, + MaxQueueTime: tracker.MaxQueueTime, + MinQueueTime: tracker.MinQueueTime, + AvgQueueTime: tracker.AvgQueueTime(), + Count: tracker.Count, + }) + } + + return metricsinfo.TaskQueueMetrics{ + Type: queueType, + PendingCount: int64(utNum), + ExecutingCount: int64(atNum), + PendingTasks: pendingTaskMetrics, + ExecutingTasks: executingTaskMetrics, + } +} + +type TaskStatsTracker struct { + TaskType string + MaxQueueTime int64 + MinQueueTime int64 + TotalQueueTime int64 + Count int64 +} + +func NewTaskStatsTracker(taskType string) *TaskStatsTracker { + return &TaskStatsTracker{ + TaskType: taskType, + MaxQueueTime: 0, + MinQueueTime: math.MaxInt64, + TotalQueueTime: 0, + Count: 0, + } +} + +func (t *TaskStatsTracker) AddSample(queueTimeMs int64) { + t.MaxQueueTime = max(t.MaxQueueTime, queueTimeMs) + t.MinQueueTime = min(t.MinQueueTime, queueTimeMs) + t.TotalQueueTime += queueTimeMs + t.Count++ +} + +func (t *TaskStatsTracker) AvgQueueTime() int64 { + if t.Count == 0 { + return 0 + } + return t.TotalQueueTime / t.Count +} + +func (sched *taskScheduler) getMetrics() []metricsinfo.TaskQueueMetrics { + dmlQueueMetrics := sched.getTaskQueueMetrics(sched.dmQueue.baseTaskQueue, "dml") + ddlQueueMetrics := sched.getTaskQueueMetrics(sched.ddQueue.baseTaskQueue, "ddl") + dqlQueueMetrics := sched.getTaskQueueMetrics(sched.dqQueue.baseTaskQueue, "dql") + dcQueueMetrics := sched.getTaskQueueMetrics(sched.dcQueue.baseTaskQueue, "dc") + return []metricsinfo.TaskQueueMetrics{ + dmlQueueMetrics, + ddlQueueMetrics, + dqlQueueMetrics, + dcQueueMetrics, + } +} diff --git a/internal/querycoordv2/server_test.go b/internal/querycoordv2/server_test.go index bc2772aa09..68c81620d2 100644 --- a/internal/querycoordv2/server_test.go +++ b/internal/querycoordv2/server_test.go @@ -628,13 +628,6 @@ func (suite *ServerSuite) hackBroker(server *Server) { }, Status: merr.Success(), }, nil).Maybe() - mockDataCoord := coordMocks.NewMockDataCoordClient(suite.T()) - mockDataCoord.EXPECT().GetComponentStates(mock.Anything, mock.Anything).Return(&milvuspb.ComponentStates{ - State: &milvuspb.ComponentInfo{ - StateCode: commonpb.StateCode_Healthy, - }, - Status: merr.Success(), - }, nil).Maybe() for _, collection := range suite.collections { mockRootCoord.EXPECT().DescribeCollection(mock.Anything, mock.Anything).Return(&milvuspb.DescribeCollectionResponse{ diff --git a/internal/querynodev2/delegator/mock_delegator.go b/internal/querynodev2/delegator/mock_delegator.go index 6a3327fc2d..2a9118d3ed 100644 --- a/internal/querynodev2/delegator/mock_delegator.go +++ b/internal/querynodev2/delegator/mock_delegator.go @@ -140,6 +140,53 @@ func (_c *MockShardDelegator_Collection_Call) RunAndReturn(run func() int64) *Mo return _c } +// GetChannelQueryView provides a mock function with no fields +func (_m *MockShardDelegator) GetChannelQueryView() *channelQueryView { + ret := _m.Called() + + if len(ret) == 0 { + panic("no return value specified for GetChannelQueryView") + } + + var r0 *channelQueryView + if rf, ok := ret.Get(0).(func() *channelQueryView); ok { + r0 = rf() + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*channelQueryView) + } + } + + return r0 +} + +// MockShardDelegator_GetChannelQueryView_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetChannelQueryView' +type MockShardDelegator_GetChannelQueryView_Call struct { + *mock.Call +} + +// GetChannelQueryView is a helper method to define mock.On call +func (_e *MockShardDelegator_Expecter) GetChannelQueryView() *MockShardDelegator_GetChannelQueryView_Call { + return &MockShardDelegator_GetChannelQueryView_Call{Call: _e.mock.On("GetChannelQueryView")} +} + +func (_c *MockShardDelegator_GetChannelQueryView_Call) Run(run func()) *MockShardDelegator_GetChannelQueryView_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *MockShardDelegator_GetChannelQueryView_Call) Return(_a0 *channelQueryView) *MockShardDelegator_GetChannelQueryView_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *MockShardDelegator_GetChannelQueryView_Call) RunAndReturn(run func() *channelQueryView) *MockShardDelegator_GetChannelQueryView_Call { + _c.Call.Return(run) + return _c +} + // GetDeleteBufferSize provides a mock function with no fields func (_m *MockShardDelegator) GetDeleteBufferSize() (int64, int64) { ret := _m.Called() @@ -243,53 +290,6 @@ func (_c *MockShardDelegator_GetPartitionStatsVersions_Call) RunAndReturn(run fu return _c } -// GetChannelQueryView provides a mock function with no fields -func (_m *MockShardDelegator) GetChannelQueryView() *channelQueryView { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for GetChannelQueryView") - } - - var r0 *channelQueryView - if rf, ok := ret.Get(0).(func() *channelQueryView); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*channelQueryView) - } - } - - return r0 -} - -// MockShardDelegator_GetChannelQueryView_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetChannelQueryView' -type MockShardDelegator_GetChannelQueryView_Call struct { - *mock.Call -} - -// GetChannelQueryView is a helper method to define mock.On call -func (_e *MockShardDelegator_Expecter) GetChannelQueryView() *MockShardDelegator_GetChannelQueryView_Call { - return &MockShardDelegator_GetChannelQueryView_Call{Call: _e.mock.On("GetChannelQueryView")} -} - -func (_c *MockShardDelegator_GetChannelQueryView_Call) Run(run func()) *MockShardDelegator_GetChannelQueryView_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockShardDelegator_GetChannelQueryView_Call) Return(_a0 *channelQueryView) *MockShardDelegator_GetChannelQueryView_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockShardDelegator_GetChannelQueryView_Call) RunAndReturn(run func() *channelQueryView) *MockShardDelegator_GetChannelQueryView_Call { - _c.Call.Return(run) - return _c -} - // GetSegmentInfo provides a mock function with given fields: readable func (_m *MockShardDelegator) GetSegmentInfo(readable bool) ([]SnapshotItem, []SegmentEntry) { ret := _m.Called(readable) diff --git a/internal/rootcoord/quota_center.go b/internal/rootcoord/quota_center.go index a95b7f7d68..0fea8e35d1 100644 --- a/internal/rootcoord/quota_center.go +++ b/internal/rootcoord/quota_center.go @@ -45,6 +45,7 @@ import ( "github.com/milvus-io/milvus/pkg/v2/proto/internalpb" "github.com/milvus-io/milvus/pkg/v2/proto/proxypb" "github.com/milvus-io/milvus/pkg/v2/util/commonpbutil" + "github.com/milvus-io/milvus/pkg/v2/util/merr" "github.com/milvus-io/milvus/pkg/v2/util/metricsinfo" "github.com/milvus-io/milvus/pkg/v2/util/paramtable" "github.com/milvus-io/milvus/pkg/v2/util/ratelimitutil" @@ -143,12 +144,14 @@ type QuotaCenter struct { mixCoord types.MixCoord meta IMetaTable + lock sync.RWMutex + // metrics queryNodeMetrics map[UniqueID]*metricsinfo.QueryNodeQuotaMetrics dataNodeMetrics map[UniqueID]*metricsinfo.DataNodeQuotaMetrics proxyMetrics map[UniqueID]*metricsinfo.ProxyQuotaMetrics - diskMu sync.Mutex // guards dataCoordMetrics and totalBinlogSize dataCoordMetrics *metricsinfo.DataCoordQuotaMetrics + diskMu sync.Mutex // guards dataCoordMetrics and totalBinlogSize totalBinlogSize int64 readableCollections map[int64]map[int64][]int64 // db id -> collection id -> partition id @@ -180,6 +183,7 @@ func NewQuotaCenter(proxies proxyutil.ProxyClientManagerInterface, mixCoord type ctx: ctx, cancel: cancel, proxies: proxies, + lock: sync.RWMutex{}, mixCoord: mixCoord, tsoAllocator: tsoAllocator, meta: meta, @@ -388,6 +392,9 @@ func SplitCollectionKey(key string) (dbID int64, collectionName string) { // collectMetrics sends GetMetrics requests to DataCoord and QueryCoord to sync the metrics in DataNodes and QueryNodes. func (q *QuotaCenter) collectMetrics() error { + q.lock.Lock() + defer q.lock.Unlock() + oldDataNodes := typeutil.NewSet(lo.Keys(q.dataNodeMetrics)...) oldQueryNodes := typeutil.NewSet(lo.Keys(q.queryNodeMetrics)...) q.clearMetrics() @@ -1594,3 +1601,27 @@ func (q *QuotaCenter) diskAllowance(collection UniqueID) float64 { allowance = math.Min(allowance, totalDiskQuota-float64(q.totalBinlogSize)) return allowance } + +func (q *QuotaCenter) getQuotaMetrics() *internalpb.GetQuotaMetricsResponse { + q.lock.RLock() + defer q.lock.RUnlock() + + quotaCenterMetrics := &metricsinfo.QuotaCenterMetrics{ + QueryNodeMetrics: q.queryNodeMetrics, + DataNodeMetrics: q.dataNodeMetrics, + ProxyMetrics: q.proxyMetrics, + DataCoordMetrics: q.dataCoordMetrics, + } + + responseString, err := metricsinfo.MarshalComponentInfos(quotaCenterMetrics) + if err != nil { + log.Warn("failed to marshal quota center metrics", zap.Error(err)) + return &internalpb.GetQuotaMetricsResponse{ + Status: merr.Status(err), + } + } + return &internalpb.GetQuotaMetricsResponse{ + Status: merr.Status(nil), + MetricsInfo: responseString, + } +} diff --git a/internal/rootcoord/quota_center_test.go b/internal/rootcoord/quota_center_test.go index d3aa3629a6..379d63aa75 100644 --- a/internal/rootcoord/quota_center_test.go +++ b/internal/rootcoord/quota_center_test.go @@ -1734,6 +1734,14 @@ func TestCheckDiskQuota(t *testing.T) { checkRate(quotaCenter.rateLimiter.GetPartitionLimiters(4, 40, 400), configQuotaValue) } }) + + t.Run("get quota center metrics", func(t *testing.T) { + meta := mockrootcoord.NewIMetaTable(t) + quotaCenter := newQuotaCenterForTesting(t, ctx, meta) + metrics := quotaCenter.getQuotaMetrics() + assert.Equal(t, commonpb.ErrorCode_Success, metrics.Status.ErrorCode) + assert.NotEqual(t, "", metrics.MetricsInfo) + }) } func TestTORequestLimiter(t *testing.T) { diff --git a/internal/rootcoord/root_coord.go b/internal/rootcoord/root_coord.go index cde1a9c98f..a86273ed8c 100644 --- a/internal/rootcoord/root_coord.go +++ b/internal/rootcoord/root_coord.go @@ -3364,3 +3364,7 @@ func isVisibleCollectionForCurUser(collectionName string, visibleCollections typ } return visibleCollections.Contain(collectionName) } + +func (c *Core) GetQuotaMetrics(ctx context.Context, req *internalpb.GetQuotaMetricsRequest) (*internalpb.GetQuotaMetricsResponse, error) { + return c.quotaCenter.getQuotaMetrics(), nil +} diff --git a/internal/util/mock/grpc_rootcoord_client.go b/internal/util/mock/grpc_rootcoord_client.go index b3fbca2bd3..bf2f2314cc 100644 --- a/internal/util/mock/grpc_rootcoord_client.go +++ b/internal/util/mock/grpc_rootcoord_client.go @@ -305,3 +305,7 @@ func (m *GrpcRootCoordClient) OperatePrivilegeGroup(ctx context.Context, in *mil func (m *GrpcRootCoordClient) Close() error { return nil } + +func (m *GrpcRootCoordClient) GetQuotaMetrics(ctx context.Context, in *internalpb.GetQuotaMetricsRequest, opts ...grpc.CallOption) (*internalpb.GetQuotaMetricsResponse, error) { + return &internalpb.GetQuotaMetricsResponse{}, m.Err +} diff --git a/pkg/proto/internal.proto b/pkg/proto/internal.proto index 99b1e22d25..fb669f5b78 100644 --- a/pkg/proto/internal.proto +++ b/pkg/proto/internal.proto @@ -434,3 +434,12 @@ message GetSegmentsInfoResponse { common.Status status = 1; repeated SegmentInfo segmentInfos = 2; } + +message GetQuotaMetricsRequest { + common.MsgBase base = 1; +} + +message GetQuotaMetricsResponse { + common.Status status = 1; + string metrics_info = 2; +} diff --git a/pkg/proto/internalpb/internal.pb.go b/pkg/proto/internalpb/internal.pb.go index da4c2631f7..48b94b9823 100644 --- a/pkg/proto/internalpb/internal.pb.go +++ b/pkg/proto/internalpb/internal.pb.go @@ -3884,6 +3884,108 @@ func (x *GetSegmentsInfoResponse) GetSegmentInfos() []*SegmentInfo { return nil } +type GetQuotaMetricsRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Base *commonpb.MsgBase `protobuf:"bytes,1,opt,name=base,proto3" json:"base,omitempty"` +} + +func (x *GetQuotaMetricsRequest) Reset() { + *x = GetQuotaMetricsRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_internal_proto_msgTypes[44] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetQuotaMetricsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetQuotaMetricsRequest) ProtoMessage() {} + +func (x *GetQuotaMetricsRequest) ProtoReflect() protoreflect.Message { + mi := &file_internal_proto_msgTypes[44] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetQuotaMetricsRequest.ProtoReflect.Descriptor instead. +func (*GetQuotaMetricsRequest) Descriptor() ([]byte, []int) { + return file_internal_proto_rawDescGZIP(), []int{44} +} + +func (x *GetQuotaMetricsRequest) GetBase() *commonpb.MsgBase { + if x != nil { + return x.Base + } + return nil +} + +type GetQuotaMetricsResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Status *commonpb.Status `protobuf:"bytes,1,opt,name=status,proto3" json:"status,omitempty"` + MetricsInfo string `protobuf:"bytes,2,opt,name=metrics_info,json=metricsInfo,proto3" json:"metrics_info,omitempty"` +} + +func (x *GetQuotaMetricsResponse) Reset() { + *x = GetQuotaMetricsResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_internal_proto_msgTypes[45] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetQuotaMetricsResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetQuotaMetricsResponse) ProtoMessage() {} + +func (x *GetQuotaMetricsResponse) ProtoReflect() protoreflect.Message { + mi := &file_internal_proto_msgTypes[45] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetQuotaMetricsResponse.ProtoReflect.Descriptor instead. +func (*GetQuotaMetricsResponse) Descriptor() ([]byte, []int) { + return file_internal_proto_rawDescGZIP(), []int{45} +} + +func (x *GetQuotaMetricsResponse) GetStatus() *commonpb.Status { + if x != nil { + return x.Status + } + return nil +} + +func (x *GetQuotaMetricsResponse) GetMetricsInfo() string { + if x != nil { + return x.MetricsInfo + } + return "" +} + var File_internal_proto protoreflect.FileDescriptor var file_internal_proto_rawDesc = []byte{ @@ -4564,36 +4666,48 @@ var file_internal_proto_rawDesc = []byte{ 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x6d, 0x69, 0x6c, 0x76, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2e, 0x53, 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x0c, 0x73, 0x65, 0x67, 0x6d, 0x65, - 0x6e, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x73, 0x2a, 0x45, 0x0a, 0x09, 0x52, 0x61, 0x74, 0x65, 0x53, - 0x63, 0x6f, 0x70, 0x65, 0x12, 0x0b, 0x0a, 0x07, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x10, - 0x00, 0x12, 0x0c, 0x0a, 0x08, 0x44, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x10, 0x01, 0x12, - 0x0e, 0x0a, 0x0a, 0x43, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x10, 0x02, 0x12, - 0x0d, 0x0a, 0x09, 0x50, 0x61, 0x72, 0x74, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x10, 0x03, 0x2a, 0xc4, - 0x01, 0x0a, 0x08, 0x52, 0x61, 0x74, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x11, 0x0a, 0x0d, 0x44, - 0x44, 0x4c, 0x43, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x10, 0x00, 0x12, 0x10, - 0x0a, 0x0c, 0x44, 0x44, 0x4c, 0x50, 0x61, 0x72, 0x74, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x10, 0x01, - 0x12, 0x0c, 0x0a, 0x08, 0x44, 0x44, 0x4c, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x10, 0x02, 0x12, 0x0c, - 0x0a, 0x08, 0x44, 0x44, 0x4c, 0x46, 0x6c, 0x75, 0x73, 0x68, 0x10, 0x03, 0x12, 0x11, 0x0a, 0x0d, - 0x44, 0x44, 0x4c, 0x43, 0x6f, 0x6d, 0x70, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x10, 0x04, 0x12, - 0x0d, 0x0a, 0x09, 0x44, 0x4d, 0x4c, 0x49, 0x6e, 0x73, 0x65, 0x72, 0x74, 0x10, 0x05, 0x12, 0x0d, - 0x0a, 0x09, 0x44, 0x4d, 0x4c, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x10, 0x06, 0x12, 0x0f, 0x0a, - 0x0b, 0x44, 0x4d, 0x4c, 0x42, 0x75, 0x6c, 0x6b, 0x4c, 0x6f, 0x61, 0x64, 0x10, 0x07, 0x12, 0x0d, - 0x0a, 0x09, 0x44, 0x51, 0x4c, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x10, 0x08, 0x12, 0x0c, 0x0a, - 0x08, 0x44, 0x51, 0x4c, 0x51, 0x75, 0x65, 0x72, 0x79, 0x10, 0x09, 0x12, 0x0d, 0x0a, 0x09, 0x44, - 0x4d, 0x4c, 0x55, 0x70, 0x73, 0x65, 0x72, 0x74, 0x10, 0x0a, 0x12, 0x09, 0x0a, 0x05, 0x44, 0x44, - 0x4c, 0x44, 0x42, 0x10, 0x0b, 0x2a, 0x81, 0x01, 0x0a, 0x0e, 0x49, 0x6d, 0x70, 0x6f, 0x72, 0x74, - 0x4a, 0x6f, 0x62, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x08, 0x0a, 0x04, 0x4e, 0x6f, 0x6e, 0x65, - 0x10, 0x00, 0x12, 0x0b, 0x0a, 0x07, 0x50, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x10, 0x01, 0x12, - 0x10, 0x0a, 0x0c, 0x50, 0x72, 0x65, 0x49, 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x69, 0x6e, 0x67, 0x10, - 0x02, 0x12, 0x0d, 0x0a, 0x09, 0x49, 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x69, 0x6e, 0x67, 0x10, 0x03, - 0x12, 0x0a, 0x0a, 0x06, 0x46, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x10, 0x04, 0x12, 0x0d, 0x0a, 0x09, - 0x43, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, 0x64, 0x10, 0x05, 0x12, 0x11, 0x0a, 0x0d, 0x49, - 0x6e, 0x64, 0x65, 0x78, 0x42, 0x75, 0x69, 0x6c, 0x64, 0x69, 0x6e, 0x67, 0x10, 0x06, 0x12, 0x09, - 0x0a, 0x05, 0x53, 0x74, 0x61, 0x74, 0x73, 0x10, 0x07, 0x42, 0x35, 0x5a, 0x33, 0x67, 0x69, 0x74, - 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6d, 0x69, 0x6c, 0x76, 0x75, 0x73, 0x2d, 0x69, - 0x6f, 0x2f, 0x6d, 0x69, 0x6c, 0x76, 0x75, 0x73, 0x2f, 0x70, 0x6b, 0x67, 0x2f, 0x76, 0x32, 0x2f, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x70, 0x62, - 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x6e, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x73, 0x22, 0x4a, 0x0a, 0x16, 0x47, 0x65, 0x74, 0x51, 0x75, + 0x6f, 0x74, 0x61, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x12, 0x30, 0x0a, 0x04, 0x62, 0x61, 0x73, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x1c, 0x2e, 0x6d, 0x69, 0x6c, 0x76, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x63, + 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x4d, 0x73, 0x67, 0x42, 0x61, 0x73, 0x65, 0x52, 0x04, 0x62, + 0x61, 0x73, 0x65, 0x22, 0x71, 0x0a, 0x17, 0x47, 0x65, 0x74, 0x51, 0x75, 0x6f, 0x74, 0x61, 0x4d, + 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x33, + 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, + 0x2e, 0x6d, 0x69, 0x6c, 0x76, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x63, 0x6f, + 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x06, 0x73, 0x74, 0x61, + 0x74, 0x75, 0x73, 0x12, 0x21, 0x0a, 0x0c, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x5f, 0x69, + 0x6e, 0x66, 0x6f, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x6d, 0x65, 0x74, 0x72, 0x69, + 0x63, 0x73, 0x49, 0x6e, 0x66, 0x6f, 0x2a, 0x45, 0x0a, 0x09, 0x52, 0x61, 0x74, 0x65, 0x53, 0x63, + 0x6f, 0x70, 0x65, 0x12, 0x0b, 0x0a, 0x07, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x10, 0x00, + 0x12, 0x0c, 0x0a, 0x08, 0x44, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x10, 0x01, 0x12, 0x0e, + 0x0a, 0x0a, 0x43, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x10, 0x02, 0x12, 0x0d, + 0x0a, 0x09, 0x50, 0x61, 0x72, 0x74, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x10, 0x03, 0x2a, 0xc4, 0x01, + 0x0a, 0x08, 0x52, 0x61, 0x74, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x11, 0x0a, 0x0d, 0x44, 0x44, + 0x4c, 0x43, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x10, 0x00, 0x12, 0x10, 0x0a, + 0x0c, 0x44, 0x44, 0x4c, 0x50, 0x61, 0x72, 0x74, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x10, 0x01, 0x12, + 0x0c, 0x0a, 0x08, 0x44, 0x44, 0x4c, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x10, 0x02, 0x12, 0x0c, 0x0a, + 0x08, 0x44, 0x44, 0x4c, 0x46, 0x6c, 0x75, 0x73, 0x68, 0x10, 0x03, 0x12, 0x11, 0x0a, 0x0d, 0x44, + 0x44, 0x4c, 0x43, 0x6f, 0x6d, 0x70, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x10, 0x04, 0x12, 0x0d, + 0x0a, 0x09, 0x44, 0x4d, 0x4c, 0x49, 0x6e, 0x73, 0x65, 0x72, 0x74, 0x10, 0x05, 0x12, 0x0d, 0x0a, + 0x09, 0x44, 0x4d, 0x4c, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x10, 0x06, 0x12, 0x0f, 0x0a, 0x0b, + 0x44, 0x4d, 0x4c, 0x42, 0x75, 0x6c, 0x6b, 0x4c, 0x6f, 0x61, 0x64, 0x10, 0x07, 0x12, 0x0d, 0x0a, + 0x09, 0x44, 0x51, 0x4c, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x10, 0x08, 0x12, 0x0c, 0x0a, 0x08, + 0x44, 0x51, 0x4c, 0x51, 0x75, 0x65, 0x72, 0x79, 0x10, 0x09, 0x12, 0x0d, 0x0a, 0x09, 0x44, 0x4d, + 0x4c, 0x55, 0x70, 0x73, 0x65, 0x72, 0x74, 0x10, 0x0a, 0x12, 0x09, 0x0a, 0x05, 0x44, 0x44, 0x4c, + 0x44, 0x42, 0x10, 0x0b, 0x2a, 0x81, 0x01, 0x0a, 0x0e, 0x49, 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x4a, + 0x6f, 0x62, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x08, 0x0a, 0x04, 0x4e, 0x6f, 0x6e, 0x65, 0x10, + 0x00, 0x12, 0x0b, 0x0a, 0x07, 0x50, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x10, 0x01, 0x12, 0x10, + 0x0a, 0x0c, 0x50, 0x72, 0x65, 0x49, 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x69, 0x6e, 0x67, 0x10, 0x02, + 0x12, 0x0d, 0x0a, 0x09, 0x49, 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x69, 0x6e, 0x67, 0x10, 0x03, 0x12, + 0x0a, 0x0a, 0x06, 0x46, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x10, 0x04, 0x12, 0x0d, 0x0a, 0x09, 0x43, + 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, 0x64, 0x10, 0x05, 0x12, 0x11, 0x0a, 0x0d, 0x49, 0x6e, + 0x64, 0x65, 0x78, 0x42, 0x75, 0x69, 0x6c, 0x64, 0x69, 0x6e, 0x67, 0x10, 0x06, 0x12, 0x09, 0x0a, + 0x05, 0x53, 0x74, 0x61, 0x74, 0x73, 0x10, 0x07, 0x42, 0x35, 0x5a, 0x33, 0x67, 0x69, 0x74, 0x68, + 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6d, 0x69, 0x6c, 0x76, 0x75, 0x73, 0x2d, 0x69, 0x6f, + 0x2f, 0x6d, 0x69, 0x6c, 0x76, 0x75, 0x73, 0x2f, 0x70, 0x6b, 0x67, 0x2f, 0x76, 0x32, 0x2f, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x70, 0x62, 0x62, + 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -4609,7 +4723,7 @@ func file_internal_proto_rawDescGZIP() []byte { } var file_internal_proto_enumTypes = make([]protoimpl.EnumInfo, 3) -var file_internal_proto_msgTypes = make([]protoimpl.MessageInfo, 45) +var file_internal_proto_msgTypes = make([]protoimpl.MessageInfo, 47) var file_internal_proto_goTypes = []interface{}{ (RateScope)(0), // 0: milvus.proto.internal.RateScope (RateType)(0), // 1: milvus.proto.internal.RateType @@ -4658,85 +4772,89 @@ var file_internal_proto_goTypes = []interface{}{ (*FieldBinlog)(nil), // 44: milvus.proto.internal.FieldBinlog (*SegmentInfo)(nil), // 45: milvus.proto.internal.SegmentInfo (*GetSegmentsInfoResponse)(nil), // 46: milvus.proto.internal.GetSegmentsInfoResponse - nil, // 47: milvus.proto.internal.SearchResults.ChannelsMvccEntry - (*commonpb.Address)(nil), // 48: milvus.proto.common.Address - (*commonpb.KeyValuePair)(nil), // 49: milvus.proto.common.KeyValuePair - (*commonpb.Status)(nil), // 50: milvus.proto.common.Status - (*commonpb.MsgBase)(nil), // 51: milvus.proto.common.MsgBase - (commonpb.DslType)(0), // 52: milvus.proto.common.DslType - (commonpb.ConsistencyLevel)(0), // 53: milvus.proto.common.ConsistencyLevel - (*schemapb.IDs)(nil), // 54: milvus.proto.schema.IDs - (*schemapb.FieldData)(nil), // 55: milvus.proto.schema.FieldData - (*milvuspb.PrivilegeGroupInfo)(nil), // 56: milvus.proto.milvus.PrivilegeGroupInfo - (*schemapb.CollectionSchema)(nil), // 57: milvus.proto.schema.CollectionSchema - (commonpb.SegmentState)(0), // 58: milvus.proto.common.SegmentState - (commonpb.SegmentLevel)(0), // 59: milvus.proto.common.SegmentLevel + (*GetQuotaMetricsRequest)(nil), // 47: milvus.proto.internal.GetQuotaMetricsRequest + (*GetQuotaMetricsResponse)(nil), // 48: milvus.proto.internal.GetQuotaMetricsResponse + nil, // 49: milvus.proto.internal.SearchResults.ChannelsMvccEntry + (*commonpb.Address)(nil), // 50: milvus.proto.common.Address + (*commonpb.KeyValuePair)(nil), // 51: milvus.proto.common.KeyValuePair + (*commonpb.Status)(nil), // 52: milvus.proto.common.Status + (*commonpb.MsgBase)(nil), // 53: milvus.proto.common.MsgBase + (commonpb.DslType)(0), // 54: milvus.proto.common.DslType + (commonpb.ConsistencyLevel)(0), // 55: milvus.proto.common.ConsistencyLevel + (*schemapb.IDs)(nil), // 56: milvus.proto.schema.IDs + (*schemapb.FieldData)(nil), // 57: milvus.proto.schema.FieldData + (*milvuspb.PrivilegeGroupInfo)(nil), // 58: milvus.proto.milvus.PrivilegeGroupInfo + (*schemapb.CollectionSchema)(nil), // 59: milvus.proto.schema.CollectionSchema + (commonpb.SegmentState)(0), // 60: milvus.proto.common.SegmentState + (commonpb.SegmentLevel)(0), // 61: milvus.proto.common.SegmentLevel } var file_internal_proto_depIdxs = []int32{ - 48, // 0: milvus.proto.internal.NodeInfo.address:type_name -> milvus.proto.common.Address - 49, // 1: milvus.proto.internal.InitParams.start_params:type_name -> milvus.proto.common.KeyValuePair - 50, // 2: milvus.proto.internal.StringList.status:type_name -> milvus.proto.common.Status - 51, // 3: milvus.proto.internal.GetStatisticsRequest.base:type_name -> milvus.proto.common.MsgBase - 51, // 4: milvus.proto.internal.GetStatisticsResponse.base:type_name -> milvus.proto.common.MsgBase - 50, // 5: milvus.proto.internal.GetStatisticsResponse.status:type_name -> milvus.proto.common.Status - 49, // 6: milvus.proto.internal.GetStatisticsResponse.stats:type_name -> milvus.proto.common.KeyValuePair - 51, // 7: milvus.proto.internal.CreateAliasRequest.base:type_name -> milvus.proto.common.MsgBase - 51, // 8: milvus.proto.internal.DropAliasRequest.base:type_name -> milvus.proto.common.MsgBase - 51, // 9: milvus.proto.internal.AlterAliasRequest.base:type_name -> milvus.proto.common.MsgBase - 51, // 10: milvus.proto.internal.CreateIndexRequest.base:type_name -> milvus.proto.common.MsgBase - 49, // 11: milvus.proto.internal.CreateIndexRequest.extra_params:type_name -> milvus.proto.common.KeyValuePair - 52, // 12: milvus.proto.internal.SubSearchRequest.dsl_type:type_name -> milvus.proto.common.DslType - 51, // 13: milvus.proto.internal.SearchRequest.base:type_name -> milvus.proto.common.MsgBase - 52, // 14: milvus.proto.internal.SearchRequest.dsl_type:type_name -> milvus.proto.common.DslType + 50, // 0: milvus.proto.internal.NodeInfo.address:type_name -> milvus.proto.common.Address + 51, // 1: milvus.proto.internal.InitParams.start_params:type_name -> milvus.proto.common.KeyValuePair + 52, // 2: milvus.proto.internal.StringList.status:type_name -> milvus.proto.common.Status + 53, // 3: milvus.proto.internal.GetStatisticsRequest.base:type_name -> milvus.proto.common.MsgBase + 53, // 4: milvus.proto.internal.GetStatisticsResponse.base:type_name -> milvus.proto.common.MsgBase + 52, // 5: milvus.proto.internal.GetStatisticsResponse.status:type_name -> milvus.proto.common.Status + 51, // 6: milvus.proto.internal.GetStatisticsResponse.stats:type_name -> milvus.proto.common.KeyValuePair + 53, // 7: milvus.proto.internal.CreateAliasRequest.base:type_name -> milvus.proto.common.MsgBase + 53, // 8: milvus.proto.internal.DropAliasRequest.base:type_name -> milvus.proto.common.MsgBase + 53, // 9: milvus.proto.internal.AlterAliasRequest.base:type_name -> milvus.proto.common.MsgBase + 53, // 10: milvus.proto.internal.CreateIndexRequest.base:type_name -> milvus.proto.common.MsgBase + 51, // 11: milvus.proto.internal.CreateIndexRequest.extra_params:type_name -> milvus.proto.common.KeyValuePair + 54, // 12: milvus.proto.internal.SubSearchRequest.dsl_type:type_name -> milvus.proto.common.DslType + 53, // 13: milvus.proto.internal.SearchRequest.base:type_name -> milvus.proto.common.MsgBase + 54, // 14: milvus.proto.internal.SearchRequest.dsl_type:type_name -> milvus.proto.common.DslType 15, // 15: milvus.proto.internal.SearchRequest.sub_reqs:type_name -> milvus.proto.internal.SubSearchRequest - 53, // 16: milvus.proto.internal.SearchRequest.consistency_level:type_name -> milvus.proto.common.ConsistencyLevel - 51, // 17: milvus.proto.internal.SearchResults.base:type_name -> milvus.proto.common.MsgBase - 50, // 18: milvus.proto.internal.SearchResults.status:type_name -> milvus.proto.common.Status + 55, // 16: milvus.proto.internal.SearchRequest.consistency_level:type_name -> milvus.proto.common.ConsistencyLevel + 53, // 17: milvus.proto.internal.SearchResults.base:type_name -> milvus.proto.common.MsgBase + 52, // 18: milvus.proto.internal.SearchResults.status:type_name -> milvus.proto.common.Status 19, // 19: milvus.proto.internal.SearchResults.costAggregation:type_name -> milvus.proto.internal.CostAggregation - 47, // 20: milvus.proto.internal.SearchResults.channels_mvcc:type_name -> milvus.proto.internal.SearchResults.ChannelsMvccEntry + 49, // 20: milvus.proto.internal.SearchResults.channels_mvcc:type_name -> milvus.proto.internal.SearchResults.ChannelsMvccEntry 17, // 21: milvus.proto.internal.SearchResults.sub_results:type_name -> milvus.proto.internal.SubSearchResults - 51, // 22: milvus.proto.internal.RetrieveRequest.base:type_name -> milvus.proto.common.MsgBase - 53, // 23: milvus.proto.internal.RetrieveRequest.consistency_level:type_name -> milvus.proto.common.ConsistencyLevel - 51, // 24: milvus.proto.internal.RetrieveResults.base:type_name -> milvus.proto.common.MsgBase - 50, // 25: milvus.proto.internal.RetrieveResults.status:type_name -> milvus.proto.common.Status - 54, // 26: milvus.proto.internal.RetrieveResults.ids:type_name -> milvus.proto.schema.IDs - 55, // 27: milvus.proto.internal.RetrieveResults.fields_data:type_name -> milvus.proto.schema.FieldData + 53, // 22: milvus.proto.internal.RetrieveRequest.base:type_name -> milvus.proto.common.MsgBase + 55, // 23: milvus.proto.internal.RetrieveRequest.consistency_level:type_name -> milvus.proto.common.ConsistencyLevel + 53, // 24: milvus.proto.internal.RetrieveResults.base:type_name -> milvus.proto.common.MsgBase + 52, // 25: milvus.proto.internal.RetrieveResults.status:type_name -> milvus.proto.common.Status + 56, // 26: milvus.proto.internal.RetrieveResults.ids:type_name -> milvus.proto.schema.IDs + 57, // 27: milvus.proto.internal.RetrieveResults.fields_data:type_name -> milvus.proto.schema.FieldData 19, // 28: milvus.proto.internal.RetrieveResults.costAggregation:type_name -> milvus.proto.internal.CostAggregation - 51, // 29: milvus.proto.internal.LoadIndex.base:type_name -> milvus.proto.common.MsgBase - 49, // 30: milvus.proto.internal.LoadIndex.index_params:type_name -> milvus.proto.common.KeyValuePair - 49, // 31: milvus.proto.internal.IndexStats.index_params:type_name -> milvus.proto.common.KeyValuePair + 53, // 29: milvus.proto.internal.LoadIndex.base:type_name -> milvus.proto.common.MsgBase + 51, // 30: milvus.proto.internal.LoadIndex.index_params:type_name -> milvus.proto.common.KeyValuePair + 51, // 31: milvus.proto.internal.IndexStats.index_params:type_name -> milvus.proto.common.KeyValuePair 23, // 32: milvus.proto.internal.FieldStats.index_stats:type_name -> milvus.proto.internal.IndexStats - 51, // 33: milvus.proto.internal.ChannelTimeTickMsg.base:type_name -> milvus.proto.common.MsgBase - 51, // 34: milvus.proto.internal.ListPolicyRequest.base:type_name -> milvus.proto.common.MsgBase - 50, // 35: milvus.proto.internal.ListPolicyResponse.status:type_name -> milvus.proto.common.Status - 56, // 36: milvus.proto.internal.ListPolicyResponse.privilege_groups:type_name -> milvus.proto.milvus.PrivilegeGroupInfo - 51, // 37: milvus.proto.internal.ShowConfigurationsRequest.base:type_name -> milvus.proto.common.MsgBase - 50, // 38: milvus.proto.internal.ShowConfigurationsResponse.status:type_name -> milvus.proto.common.Status - 49, // 39: milvus.proto.internal.ShowConfigurationsResponse.configuations:type_name -> milvus.proto.common.KeyValuePair + 53, // 33: milvus.proto.internal.ChannelTimeTickMsg.base:type_name -> milvus.proto.common.MsgBase + 53, // 34: milvus.proto.internal.ListPolicyRequest.base:type_name -> milvus.proto.common.MsgBase + 52, // 35: milvus.proto.internal.ListPolicyResponse.status:type_name -> milvus.proto.common.Status + 58, // 36: milvus.proto.internal.ListPolicyResponse.privilege_groups:type_name -> milvus.proto.milvus.PrivilegeGroupInfo + 53, // 37: milvus.proto.internal.ShowConfigurationsRequest.base:type_name -> milvus.proto.common.MsgBase + 52, // 38: milvus.proto.internal.ShowConfigurationsResponse.status:type_name -> milvus.proto.common.Status + 51, // 39: milvus.proto.internal.ShowConfigurationsResponse.configuations:type_name -> milvus.proto.common.KeyValuePair 1, // 40: milvus.proto.internal.Rate.rt:type_name -> milvus.proto.internal.RateType - 57, // 41: milvus.proto.internal.ImportRequestInternal.schema:type_name -> milvus.proto.schema.CollectionSchema + 59, // 41: milvus.proto.internal.ImportRequestInternal.schema:type_name -> milvus.proto.schema.CollectionSchema 33, // 42: milvus.proto.internal.ImportRequestInternal.files:type_name -> milvus.proto.internal.ImportFile - 49, // 43: milvus.proto.internal.ImportRequestInternal.options:type_name -> milvus.proto.common.KeyValuePair + 51, // 43: milvus.proto.internal.ImportRequestInternal.options:type_name -> milvus.proto.common.KeyValuePair 33, // 44: milvus.proto.internal.ImportRequest.files:type_name -> milvus.proto.internal.ImportFile - 49, // 45: milvus.proto.internal.ImportRequest.options:type_name -> milvus.proto.common.KeyValuePair - 50, // 46: milvus.proto.internal.ImportResponse.status:type_name -> milvus.proto.common.Status - 50, // 47: milvus.proto.internal.GetImportProgressResponse.status:type_name -> milvus.proto.common.Status + 51, // 45: milvus.proto.internal.ImportRequest.options:type_name -> milvus.proto.common.KeyValuePair + 52, // 46: milvus.proto.internal.ImportResponse.status:type_name -> milvus.proto.common.Status + 52, // 47: milvus.proto.internal.GetImportProgressResponse.status:type_name -> milvus.proto.common.Status 2, // 48: milvus.proto.internal.GetImportProgressResponse.state:type_name -> milvus.proto.internal.ImportJobState 38, // 49: milvus.proto.internal.GetImportProgressResponse.task_progresses:type_name -> milvus.proto.internal.ImportTaskProgress - 50, // 50: milvus.proto.internal.ListImportsResponse.status:type_name -> milvus.proto.common.Status + 52, // 50: milvus.proto.internal.ListImportsResponse.status:type_name -> milvus.proto.common.Status 2, // 51: milvus.proto.internal.ListImportsResponse.states:type_name -> milvus.proto.internal.ImportJobState - 58, // 52: milvus.proto.internal.SegmentInfo.state:type_name -> milvus.proto.common.SegmentState - 59, // 53: milvus.proto.internal.SegmentInfo.level:type_name -> milvus.proto.common.SegmentLevel + 60, // 52: milvus.proto.internal.SegmentInfo.state:type_name -> milvus.proto.common.SegmentState + 61, // 53: milvus.proto.internal.SegmentInfo.level:type_name -> milvus.proto.common.SegmentLevel 44, // 54: milvus.proto.internal.SegmentInfo.insert_logs:type_name -> milvus.proto.internal.FieldBinlog 44, // 55: milvus.proto.internal.SegmentInfo.delta_logs:type_name -> milvus.proto.internal.FieldBinlog 44, // 56: milvus.proto.internal.SegmentInfo.stats_logs:type_name -> milvus.proto.internal.FieldBinlog - 50, // 57: milvus.proto.internal.GetSegmentsInfoResponse.status:type_name -> milvus.proto.common.Status + 52, // 57: milvus.proto.internal.GetSegmentsInfoResponse.status:type_name -> milvus.proto.common.Status 45, // 58: milvus.proto.internal.GetSegmentsInfoResponse.segmentInfos:type_name -> milvus.proto.internal.SegmentInfo - 59, // [59:59] is the sub-list for method output_type - 59, // [59:59] is the sub-list for method input_type - 59, // [59:59] is the sub-list for extension type_name - 59, // [59:59] is the sub-list for extension extendee - 0, // [0:59] is the sub-list for field type_name + 53, // 59: milvus.proto.internal.GetQuotaMetricsRequest.base:type_name -> milvus.proto.common.MsgBase + 52, // 60: milvus.proto.internal.GetQuotaMetricsResponse.status:type_name -> milvus.proto.common.Status + 61, // [61:61] is the sub-list for method output_type + 61, // [61:61] is the sub-list for method input_type + 61, // [61:61] is the sub-list for extension type_name + 61, // [61:61] is the sub-list for extension extendee + 0, // [0:61] is the sub-list for field type_name } func init() { file_internal_proto_init() } @@ -5273,6 +5391,30 @@ func file_internal_proto_init() { return nil } } + file_internal_proto_msgTypes[44].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetQuotaMetricsRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_internal_proto_msgTypes[45].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetQuotaMetricsResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } } type x struct{} out := protoimpl.TypeBuilder{ @@ -5280,7 +5422,7 @@ func file_internal_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_internal_proto_rawDesc, NumEnums: 3, - NumMessages: 45, + NumMessages: 47, NumExtensions: 0, NumServices: 0, }, diff --git a/pkg/proto/proxy.proto b/pkg/proto/proxy.proto index 136d674758..3370b5068e 100644 --- a/pkg/proto/proxy.proto +++ b/pkg/proto/proxy.proto @@ -31,6 +31,7 @@ service Proxy { rpc InvalidateShardLeaderCache(InvalidateShardLeaderCacheRequest) returns (common.Status) {} rpc GetSegmentsInfo(internal.GetSegmentsInfoRequest) returns (internal.GetSegmentsInfoResponse) {} + rpc GetQuotaMetrics(internal.GetQuotaMetricsRequest) returns (internal.GetQuotaMetricsResponse) {} } message InvalidateCollMetaCacheRequest { diff --git a/pkg/proto/proxypb/proxy.pb.go b/pkg/proto/proxypb/proxy.pb.go index 41eb513fc5..daac64e1b9 100644 --- a/pkg/proto/proxypb/proxy.pb.go +++ b/pkg/proto/proxypb/proxy.pb.go @@ -822,7 +822,7 @@ var file_proxy_proto_rawDesc = []byte{ 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x6d, 0x69, 0x6c, 0x76, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x0b, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, - 0x49, 0x6e, 0x66, 0x6f, 0x73, 0x32, 0xc4, 0x0c, 0x0a, 0x05, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x12, + 0x49, 0x6e, 0x66, 0x6f, 0x73, 0x32, 0xb8, 0x0d, 0x0a, 0x05, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x12, 0x6c, 0x0a, 0x12, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x53, 0x74, 0x61, 0x74, 0x65, 0x73, 0x12, 0x2e, 0x2e, 0x6d, 0x69, 0x6c, 0x76, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x6d, 0x69, 0x6c, 0x76, 0x75, 0x73, 0x2e, 0x47, 0x65, 0x74, 0x43, @@ -922,11 +922,18 @@ var file_proxy_proto_rawDesc = []byte{ 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2e, 0x2e, 0x6d, 0x69, 0x6c, 0x76, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2e, 0x47, 0x65, 0x74, 0x53, 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x49, 0x6e, - 0x66, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x42, 0x32, 0x5a, 0x30, - 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6d, 0x69, 0x6c, 0x76, 0x75, - 0x73, 0x2d, 0x69, 0x6f, 0x2f, 0x6d, 0x69, 0x6c, 0x76, 0x75, 0x73, 0x2f, 0x70, 0x6b, 0x67, 0x2f, - 0x76, 0x32, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x70, 0x62, - 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x66, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x72, 0x0a, 0x0f, + 0x47, 0x65, 0x74, 0x51, 0x75, 0x6f, 0x74, 0x61, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x12, + 0x2d, 0x2e, 0x6d, 0x69, 0x6c, 0x76, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x69, + 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2e, 0x47, 0x65, 0x74, 0x51, 0x75, 0x6f, 0x74, 0x61, + 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2e, + 0x2e, 0x6d, 0x69, 0x6c, 0x76, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x69, 0x6e, + 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2e, 0x47, 0x65, 0x74, 0x51, 0x75, 0x6f, 0x74, 0x61, 0x4d, + 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, + 0x42, 0x32, 0x5a, 0x30, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6d, + 0x69, 0x6c, 0x76, 0x75, 0x73, 0x2d, 0x69, 0x6f, 0x2f, 0x6d, 0x69, 0x6c, 0x76, 0x75, 0x73, 0x2f, + 0x70, 0x6b, 0x67, 0x2f, 0x76, 0x32, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x70, 0x72, 0x6f, + 0x78, 0x79, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -969,13 +976,15 @@ var file_proxy_proto_goTypes = []interface{}{ (*internalpb.GetImportProgressRequest)(nil), // 23: milvus.proto.internal.GetImportProgressRequest (*internalpb.ListImportsRequest)(nil), // 24: milvus.proto.internal.ListImportsRequest (*internalpb.GetSegmentsInfoRequest)(nil), // 25: milvus.proto.internal.GetSegmentsInfoRequest - (*milvuspb.ComponentStates)(nil), // 26: milvus.proto.milvus.ComponentStates - (*milvuspb.StringResponse)(nil), // 27: milvus.proto.milvus.StringResponse - (*milvuspb.GetMetricsResponse)(nil), // 28: milvus.proto.milvus.GetMetricsResponse - (*internalpb.ImportResponse)(nil), // 29: milvus.proto.internal.ImportResponse - (*internalpb.GetImportProgressResponse)(nil), // 30: milvus.proto.internal.GetImportProgressResponse - (*internalpb.ListImportsResponse)(nil), // 31: milvus.proto.internal.ListImportsResponse - (*internalpb.GetSegmentsInfoResponse)(nil), // 32: milvus.proto.internal.GetSegmentsInfoResponse + (*internalpb.GetQuotaMetricsRequest)(nil), // 26: milvus.proto.internal.GetQuotaMetricsRequest + (*milvuspb.ComponentStates)(nil), // 27: milvus.proto.milvus.ComponentStates + (*milvuspb.StringResponse)(nil), // 28: milvus.proto.milvus.StringResponse + (*milvuspb.GetMetricsResponse)(nil), // 29: milvus.proto.milvus.GetMetricsResponse + (*internalpb.ImportResponse)(nil), // 30: milvus.proto.internal.ImportResponse + (*internalpb.GetImportProgressResponse)(nil), // 31: milvus.proto.internal.GetImportProgressResponse + (*internalpb.ListImportsResponse)(nil), // 32: milvus.proto.internal.ListImportsResponse + (*internalpb.GetSegmentsInfoResponse)(nil), // 33: milvus.proto.internal.GetSegmentsInfoResponse + (*internalpb.GetQuotaMetricsResponse)(nil), // 34: milvus.proto.internal.GetQuotaMetricsResponse } var file_proxy_proto_depIdxs = []int32{ 12, // 0: milvus.proto.proxy.InvalidateCollMetaCacheRequest.base:type_name -> milvus.proto.common.MsgBase @@ -1013,23 +1022,25 @@ var file_proxy_proto_depIdxs = []int32{ 24, // 32: milvus.proto.proxy.Proxy.ListImports:input_type -> milvus.proto.internal.ListImportsRequest 1, // 33: milvus.proto.proxy.Proxy.InvalidateShardLeaderCache:input_type -> milvus.proto.proxy.InvalidateShardLeaderCacheRequest 25, // 34: milvus.proto.proxy.Proxy.GetSegmentsInfo:input_type -> milvus.proto.internal.GetSegmentsInfoRequest - 26, // 35: milvus.proto.proxy.Proxy.GetComponentStates:output_type -> milvus.proto.milvus.ComponentStates - 27, // 36: milvus.proto.proxy.Proxy.GetStatisticsChannel:output_type -> milvus.proto.milvus.StringResponse - 16, // 37: milvus.proto.proxy.Proxy.InvalidateCollectionMetaCache:output_type -> milvus.proto.common.Status - 27, // 38: milvus.proto.proxy.Proxy.GetDdChannel:output_type -> milvus.proto.milvus.StringResponse - 16, // 39: milvus.proto.proxy.Proxy.InvalidateCredentialCache:output_type -> milvus.proto.common.Status - 16, // 40: milvus.proto.proxy.Proxy.UpdateCredentialCache:output_type -> milvus.proto.common.Status - 16, // 41: milvus.proto.proxy.Proxy.RefreshPolicyInfoCache:output_type -> milvus.proto.common.Status - 28, // 42: milvus.proto.proxy.Proxy.GetProxyMetrics:output_type -> milvus.proto.milvus.GetMetricsResponse - 16, // 43: milvus.proto.proxy.Proxy.SetRates:output_type -> milvus.proto.common.Status - 10, // 44: milvus.proto.proxy.Proxy.ListClientInfos:output_type -> milvus.proto.proxy.ListClientInfosResponse - 29, // 45: milvus.proto.proxy.Proxy.ImportV2:output_type -> milvus.proto.internal.ImportResponse - 30, // 46: milvus.proto.proxy.Proxy.GetImportProgress:output_type -> milvus.proto.internal.GetImportProgressResponse - 31, // 47: milvus.proto.proxy.Proxy.ListImports:output_type -> milvus.proto.internal.ListImportsResponse - 16, // 48: milvus.proto.proxy.Proxy.InvalidateShardLeaderCache:output_type -> milvus.proto.common.Status - 32, // 49: milvus.proto.proxy.Proxy.GetSegmentsInfo:output_type -> milvus.proto.internal.GetSegmentsInfoResponse - 35, // [35:50] is the sub-list for method output_type - 20, // [20:35] is the sub-list for method input_type + 26, // 35: milvus.proto.proxy.Proxy.GetQuotaMetrics:input_type -> milvus.proto.internal.GetQuotaMetricsRequest + 27, // 36: milvus.proto.proxy.Proxy.GetComponentStates:output_type -> milvus.proto.milvus.ComponentStates + 28, // 37: milvus.proto.proxy.Proxy.GetStatisticsChannel:output_type -> milvus.proto.milvus.StringResponse + 16, // 38: milvus.proto.proxy.Proxy.InvalidateCollectionMetaCache:output_type -> milvus.proto.common.Status + 28, // 39: milvus.proto.proxy.Proxy.GetDdChannel:output_type -> milvus.proto.milvus.StringResponse + 16, // 40: milvus.proto.proxy.Proxy.InvalidateCredentialCache:output_type -> milvus.proto.common.Status + 16, // 41: milvus.proto.proxy.Proxy.UpdateCredentialCache:output_type -> milvus.proto.common.Status + 16, // 42: milvus.proto.proxy.Proxy.RefreshPolicyInfoCache:output_type -> milvus.proto.common.Status + 29, // 43: milvus.proto.proxy.Proxy.GetProxyMetrics:output_type -> milvus.proto.milvus.GetMetricsResponse + 16, // 44: milvus.proto.proxy.Proxy.SetRates:output_type -> milvus.proto.common.Status + 10, // 45: milvus.proto.proxy.Proxy.ListClientInfos:output_type -> milvus.proto.proxy.ListClientInfosResponse + 30, // 46: milvus.proto.proxy.Proxy.ImportV2:output_type -> milvus.proto.internal.ImportResponse + 31, // 47: milvus.proto.proxy.Proxy.GetImportProgress:output_type -> milvus.proto.internal.GetImportProgressResponse + 32, // 48: milvus.proto.proxy.Proxy.ListImports:output_type -> milvus.proto.internal.ListImportsResponse + 16, // 49: milvus.proto.proxy.Proxy.InvalidateShardLeaderCache:output_type -> milvus.proto.common.Status + 33, // 50: milvus.proto.proxy.Proxy.GetSegmentsInfo:output_type -> milvus.proto.internal.GetSegmentsInfoResponse + 34, // 51: milvus.proto.proxy.Proxy.GetQuotaMetrics:output_type -> milvus.proto.internal.GetQuotaMetricsResponse + 36, // [36:52] is the sub-list for method output_type + 20, // [20:36] is the sub-list for method input_type 20, // [20:20] is the sub-list for extension type_name 20, // [20:20] is the sub-list for extension extendee 0, // [0:20] is the sub-list for field type_name diff --git a/pkg/proto/proxypb/proxy_grpc.pb.go b/pkg/proto/proxypb/proxy_grpc.pb.go index 14d8f085a1..3ba6adf440 100644 --- a/pkg/proto/proxypb/proxy_grpc.pb.go +++ b/pkg/proto/proxypb/proxy_grpc.pb.go @@ -37,6 +37,7 @@ const ( Proxy_ListImports_FullMethodName = "/milvus.proto.proxy.Proxy/ListImports" Proxy_InvalidateShardLeaderCache_FullMethodName = "/milvus.proto.proxy.Proxy/InvalidateShardLeaderCache" Proxy_GetSegmentsInfo_FullMethodName = "/milvus.proto.proxy.Proxy/GetSegmentsInfo" + Proxy_GetQuotaMetrics_FullMethodName = "/milvus.proto.proxy.Proxy/GetQuotaMetrics" ) // ProxyClient is the client API for Proxy service. @@ -59,6 +60,7 @@ type ProxyClient interface { ListImports(ctx context.Context, in *internalpb.ListImportsRequest, opts ...grpc.CallOption) (*internalpb.ListImportsResponse, error) InvalidateShardLeaderCache(ctx context.Context, in *InvalidateShardLeaderCacheRequest, opts ...grpc.CallOption) (*commonpb.Status, error) GetSegmentsInfo(ctx context.Context, in *internalpb.GetSegmentsInfoRequest, opts ...grpc.CallOption) (*internalpb.GetSegmentsInfoResponse, error) + GetQuotaMetrics(ctx context.Context, in *internalpb.GetQuotaMetricsRequest, opts ...grpc.CallOption) (*internalpb.GetQuotaMetricsResponse, error) } type proxyClient struct { @@ -204,6 +206,15 @@ func (c *proxyClient) GetSegmentsInfo(ctx context.Context, in *internalpb.GetSeg return out, nil } +func (c *proxyClient) GetQuotaMetrics(ctx context.Context, in *internalpb.GetQuotaMetricsRequest, opts ...grpc.CallOption) (*internalpb.GetQuotaMetricsResponse, error) { + out := new(internalpb.GetQuotaMetricsResponse) + err := c.cc.Invoke(ctx, Proxy_GetQuotaMetrics_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + // ProxyServer is the server API for Proxy service. // All implementations should embed UnimplementedProxyServer // for forward compatibility @@ -224,6 +235,7 @@ type ProxyServer interface { ListImports(context.Context, *internalpb.ListImportsRequest) (*internalpb.ListImportsResponse, error) InvalidateShardLeaderCache(context.Context, *InvalidateShardLeaderCacheRequest) (*commonpb.Status, error) GetSegmentsInfo(context.Context, *internalpb.GetSegmentsInfoRequest) (*internalpb.GetSegmentsInfoResponse, error) + GetQuotaMetrics(context.Context, *internalpb.GetQuotaMetricsRequest) (*internalpb.GetQuotaMetricsResponse, error) } // UnimplementedProxyServer should be embedded to have forward compatible implementations. @@ -275,6 +287,9 @@ func (UnimplementedProxyServer) InvalidateShardLeaderCache(context.Context, *Inv func (UnimplementedProxyServer) GetSegmentsInfo(context.Context, *internalpb.GetSegmentsInfoRequest) (*internalpb.GetSegmentsInfoResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method GetSegmentsInfo not implemented") } +func (UnimplementedProxyServer) GetQuotaMetrics(context.Context, *internalpb.GetQuotaMetricsRequest) (*internalpb.GetQuotaMetricsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetQuotaMetrics not implemented") +} // UnsafeProxyServer may be embedded to opt out of forward compatibility for this service. // Use of this interface is not recommended, as added methods to ProxyServer will @@ -557,6 +572,24 @@ func _Proxy_GetSegmentsInfo_Handler(srv interface{}, ctx context.Context, dec fu return interceptor(ctx, in, info, handler) } +func _Proxy_GetQuotaMetrics_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(internalpb.GetQuotaMetricsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ProxyServer).GetQuotaMetrics(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Proxy_GetQuotaMetrics_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ProxyServer).GetQuotaMetrics(ctx, req.(*internalpb.GetQuotaMetricsRequest)) + } + return interceptor(ctx, in, info, handler) +} + // Proxy_ServiceDesc is the grpc.ServiceDesc for Proxy service. // It's only intended for direct use with grpc.RegisterService, // and not to be introspected or modified (even as a copy) @@ -624,6 +657,10 @@ var Proxy_ServiceDesc = grpc.ServiceDesc{ MethodName: "GetSegmentsInfo", Handler: _Proxy_GetSegmentsInfo_Handler, }, + { + MethodName: "GetQuotaMetrics", + Handler: _Proxy_GetQuotaMetrics_Handler, + }, }, Streams: []grpc.StreamDesc{}, Metadata: "proxy.proto", diff --git a/pkg/proto/root_coord.proto b/pkg/proto/root_coord.proto index b2a637d0fd..898800a122 100644 --- a/pkg/proto/root_coord.proto +++ b/pkg/proto/root_coord.proto @@ -152,6 +152,8 @@ service RootCoord { rpc ListDatabases(milvus.ListDatabasesRequest) returns (milvus.ListDatabasesResponse) {} rpc DescribeDatabase(DescribeDatabaseRequest) returns(DescribeDatabaseResponse){} rpc AlterDatabase(AlterDatabaseRequest) returns(common.Status){} + + rpc GetQuotaMetrics(internal.GetQuotaMetricsRequest) returns (internal.GetQuotaMetricsResponse) {} } message AllocTimestampRequest { diff --git a/pkg/proto/rootcoordpb/root_coord.pb.go b/pkg/proto/rootcoordpb/root_coord.pb.go index 0222ccf6e8..74713cd370 100644 --- a/pkg/proto/rootcoordpb/root_coord.pb.go +++ b/pkg/proto/rootcoordpb/root_coord.pb.go @@ -1455,7 +1455,7 @@ var file_root_coord_proto_rawDesc = []byte{ 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x72, 0x6f, 0x6f, 0x74, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x2e, 0x44, 0x42, 0x43, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x0d, 0x64, 0x62, 0x43, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x32, - 0xcd, 0x2d, 0x0a, 0x09, 0x52, 0x6f, 0x6f, 0x74, 0x43, 0x6f, 0x6f, 0x72, 0x64, 0x12, 0x6c, 0x0a, + 0xc1, 0x2e, 0x0a, 0x09, 0x52, 0x6f, 0x6f, 0x74, 0x43, 0x6f, 0x6f, 0x72, 0x64, 0x12, 0x6c, 0x0a, 0x12, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x53, 0x74, 0x61, 0x74, 0x65, 0x73, 0x12, 0x2e, 0x2e, 0x6d, 0x69, 0x6c, 0x76, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x6d, 0x69, 0x6c, 0x76, 0x75, 0x73, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6d, @@ -1819,11 +1819,19 @@ var file_root_coord_proto_rawDesc = []byte{ 0x6f, 0x2e, 0x72, 0x6f, 0x6f, 0x74, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x2e, 0x41, 0x6c, 0x74, 0x65, 0x72, 0x44, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x6d, 0x69, 0x6c, 0x76, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, - 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x22, 0x00, 0x42, - 0x36, 0x5a, 0x34, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6d, 0x69, - 0x6c, 0x76, 0x75, 0x73, 0x2d, 0x69, 0x6f, 0x2f, 0x6d, 0x69, 0x6c, 0x76, 0x75, 0x73, 0x2f, 0x70, - 0x6b, 0x67, 0x2f, 0x76, 0x32, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x72, 0x6f, 0x6f, 0x74, - 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x22, 0x00, 0x12, + 0x72, 0x0a, 0x0f, 0x47, 0x65, 0x74, 0x51, 0x75, 0x6f, 0x74, 0x61, 0x4d, 0x65, 0x74, 0x72, 0x69, + 0x63, 0x73, 0x12, 0x2d, 0x2e, 0x6d, 0x69, 0x6c, 0x76, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2e, 0x47, 0x65, 0x74, 0x51, 0x75, + 0x6f, 0x74, 0x61, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x2e, 0x2e, 0x6d, 0x69, 0x6c, 0x76, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2e, 0x47, 0x65, 0x74, 0x51, 0x75, 0x6f, + 0x74, 0x61, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x22, 0x00, 0x42, 0x36, 0x5a, 0x34, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, + 0x6d, 0x2f, 0x6d, 0x69, 0x6c, 0x76, 0x75, 0x73, 0x2d, 0x69, 0x6f, 0x2f, 0x6d, 0x69, 0x6c, 0x76, + 0x75, 0x73, 0x2f, 0x70, 0x6b, 0x67, 0x2f, 0x76, 0x32, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, + 0x72, 0x6f, 0x6f, 0x74, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x33, } var ( @@ -1914,26 +1922,28 @@ var file_root_coord_proto_goTypes = []interface{}{ (*milvuspb.CreateDatabaseRequest)(nil), // 71: milvus.proto.milvus.CreateDatabaseRequest (*milvuspb.DropDatabaseRequest)(nil), // 72: milvus.proto.milvus.DropDatabaseRequest (*milvuspb.ListDatabasesRequest)(nil), // 73: milvus.proto.milvus.ListDatabasesRequest - (*milvuspb.ComponentStates)(nil), // 74: milvus.proto.milvus.ComponentStates - (*milvuspb.StringResponse)(nil), // 75: milvus.proto.milvus.StringResponse - (*milvuspb.BoolResponse)(nil), // 76: milvus.proto.milvus.BoolResponse - (*milvuspb.DescribeCollectionResponse)(nil), // 77: milvus.proto.milvus.DescribeCollectionResponse - (*milvuspb.DescribeAliasResponse)(nil), // 78: milvus.proto.milvus.DescribeAliasResponse - (*milvuspb.ListAliasesResponse)(nil), // 79: milvus.proto.milvus.ListAliasesResponse - (*milvuspb.ShowCollectionsResponse)(nil), // 80: milvus.proto.milvus.ShowCollectionsResponse - (*milvuspb.ShowPartitionsResponse)(nil), // 81: milvus.proto.milvus.ShowPartitionsResponse - (*milvuspb.ShowSegmentsResponse)(nil), // 82: milvus.proto.milvus.ShowSegmentsResponse - (*internalpb.ShowConfigurationsResponse)(nil), // 83: milvus.proto.internal.ShowConfigurationsResponse - (*milvuspb.GetMetricsResponse)(nil), // 84: milvus.proto.milvus.GetMetricsResponse - (*milvuspb.ListCredUsersResponse)(nil), // 85: milvus.proto.milvus.ListCredUsersResponse - (*milvuspb.SelectRoleResponse)(nil), // 86: milvus.proto.milvus.SelectRoleResponse - (*milvuspb.SelectUserResponse)(nil), // 87: milvus.proto.milvus.SelectUserResponse - (*milvuspb.SelectGrantResponse)(nil), // 88: milvus.proto.milvus.SelectGrantResponse - (*internalpb.ListPolicyResponse)(nil), // 89: milvus.proto.internal.ListPolicyResponse - (*milvuspb.BackupRBACMetaResponse)(nil), // 90: milvus.proto.milvus.BackupRBACMetaResponse - (*milvuspb.ListPrivilegeGroupsResponse)(nil), // 91: milvus.proto.milvus.ListPrivilegeGroupsResponse - (*milvuspb.CheckHealthResponse)(nil), // 92: milvus.proto.milvus.CheckHealthResponse - (*milvuspb.ListDatabasesResponse)(nil), // 93: milvus.proto.milvus.ListDatabasesResponse + (*internalpb.GetQuotaMetricsRequest)(nil), // 74: milvus.proto.internal.GetQuotaMetricsRequest + (*milvuspb.ComponentStates)(nil), // 75: milvus.proto.milvus.ComponentStates + (*milvuspb.StringResponse)(nil), // 76: milvus.proto.milvus.StringResponse + (*milvuspb.BoolResponse)(nil), // 77: milvus.proto.milvus.BoolResponse + (*milvuspb.DescribeCollectionResponse)(nil), // 78: milvus.proto.milvus.DescribeCollectionResponse + (*milvuspb.DescribeAliasResponse)(nil), // 79: milvus.proto.milvus.DescribeAliasResponse + (*milvuspb.ListAliasesResponse)(nil), // 80: milvus.proto.milvus.ListAliasesResponse + (*milvuspb.ShowCollectionsResponse)(nil), // 81: milvus.proto.milvus.ShowCollectionsResponse + (*milvuspb.ShowPartitionsResponse)(nil), // 82: milvus.proto.milvus.ShowPartitionsResponse + (*milvuspb.ShowSegmentsResponse)(nil), // 83: milvus.proto.milvus.ShowSegmentsResponse + (*internalpb.ShowConfigurationsResponse)(nil), // 84: milvus.proto.internal.ShowConfigurationsResponse + (*milvuspb.GetMetricsResponse)(nil), // 85: milvus.proto.milvus.GetMetricsResponse + (*milvuspb.ListCredUsersResponse)(nil), // 86: milvus.proto.milvus.ListCredUsersResponse + (*milvuspb.SelectRoleResponse)(nil), // 87: milvus.proto.milvus.SelectRoleResponse + (*milvuspb.SelectUserResponse)(nil), // 88: milvus.proto.milvus.SelectUserResponse + (*milvuspb.SelectGrantResponse)(nil), // 89: milvus.proto.milvus.SelectGrantResponse + (*internalpb.ListPolicyResponse)(nil), // 90: milvus.proto.internal.ListPolicyResponse + (*milvuspb.BackupRBACMetaResponse)(nil), // 91: milvus.proto.milvus.BackupRBACMetaResponse + (*milvuspb.ListPrivilegeGroupsResponse)(nil), // 92: milvus.proto.milvus.ListPrivilegeGroupsResponse + (*milvuspb.CheckHealthResponse)(nil), // 93: milvus.proto.milvus.CheckHealthResponse + (*milvuspb.ListDatabasesResponse)(nil), // 94: milvus.proto.milvus.ListDatabasesResponse + (*internalpb.GetQuotaMetricsResponse)(nil), // 95: milvus.proto.internal.GetQuotaMetricsResponse } var file_root_coord_proto_depIdxs = []int32{ 22, // 0: milvus.proto.rootcoord.AllocTimestampRequest.base:type_name -> milvus.proto.common.MsgBase @@ -2019,65 +2029,67 @@ var file_root_coord_proto_depIdxs = []int32{ 73, // 80: milvus.proto.rootcoord.RootCoord.ListDatabases:input_type -> milvus.proto.milvus.ListDatabasesRequest 10, // 81: milvus.proto.rootcoord.RootCoord.DescribeDatabase:input_type -> milvus.proto.rootcoord.DescribeDatabaseRequest 12, // 82: milvus.proto.rootcoord.RootCoord.AlterDatabase:input_type -> milvus.proto.rootcoord.AlterDatabaseRequest - 74, // 83: milvus.proto.rootcoord.RootCoord.GetComponentStates:output_type -> milvus.proto.milvus.ComponentStates - 75, // 84: milvus.proto.rootcoord.RootCoord.GetTimeTickChannel:output_type -> milvus.proto.milvus.StringResponse - 75, // 85: milvus.proto.rootcoord.RootCoord.GetStatisticsChannel:output_type -> milvus.proto.milvus.StringResponse - 23, // 86: milvus.proto.rootcoord.RootCoord.CreateCollection:output_type -> milvus.proto.common.Status - 23, // 87: milvus.proto.rootcoord.RootCoord.DropCollection:output_type -> milvus.proto.common.Status - 23, // 88: milvus.proto.rootcoord.RootCoord.AddCollectionField:output_type -> milvus.proto.common.Status - 76, // 89: milvus.proto.rootcoord.RootCoord.HasCollection:output_type -> milvus.proto.milvus.BoolResponse - 77, // 90: milvus.proto.rootcoord.RootCoord.DescribeCollection:output_type -> milvus.proto.milvus.DescribeCollectionResponse - 77, // 91: milvus.proto.rootcoord.RootCoord.DescribeCollectionInternal:output_type -> milvus.proto.milvus.DescribeCollectionResponse - 23, // 92: milvus.proto.rootcoord.RootCoord.CreateAlias:output_type -> milvus.proto.common.Status - 23, // 93: milvus.proto.rootcoord.RootCoord.DropAlias:output_type -> milvus.proto.common.Status - 23, // 94: milvus.proto.rootcoord.RootCoord.AlterAlias:output_type -> milvus.proto.common.Status - 78, // 95: milvus.proto.rootcoord.RootCoord.DescribeAlias:output_type -> milvus.proto.milvus.DescribeAliasResponse - 79, // 96: milvus.proto.rootcoord.RootCoord.ListAliases:output_type -> milvus.proto.milvus.ListAliasesResponse - 80, // 97: milvus.proto.rootcoord.RootCoord.ShowCollections:output_type -> milvus.proto.milvus.ShowCollectionsResponse - 19, // 98: milvus.proto.rootcoord.RootCoord.ShowCollectionIDs:output_type -> milvus.proto.rootcoord.ShowCollectionIDsResponse - 23, // 99: milvus.proto.rootcoord.RootCoord.AlterCollection:output_type -> milvus.proto.common.Status - 23, // 100: milvus.proto.rootcoord.RootCoord.AlterCollectionField:output_type -> milvus.proto.common.Status - 23, // 101: milvus.proto.rootcoord.RootCoord.CreatePartition:output_type -> milvus.proto.common.Status - 23, // 102: milvus.proto.rootcoord.RootCoord.DropPartition:output_type -> milvus.proto.common.Status - 76, // 103: milvus.proto.rootcoord.RootCoord.HasPartition:output_type -> milvus.proto.milvus.BoolResponse - 81, // 104: milvus.proto.rootcoord.RootCoord.ShowPartitions:output_type -> milvus.proto.milvus.ShowPartitionsResponse - 81, // 105: milvus.proto.rootcoord.RootCoord.ShowPartitionsInternal:output_type -> milvus.proto.milvus.ShowPartitionsResponse - 82, // 106: milvus.proto.rootcoord.RootCoord.ShowSegments:output_type -> milvus.proto.milvus.ShowSegmentsResponse - 14, // 107: milvus.proto.rootcoord.RootCoord.GetPChannelInfo:output_type -> milvus.proto.rootcoord.GetPChannelInfoResponse - 1, // 108: milvus.proto.rootcoord.RootCoord.AllocTimestamp:output_type -> milvus.proto.rootcoord.AllocTimestampResponse - 3, // 109: milvus.proto.rootcoord.RootCoord.AllocID:output_type -> milvus.proto.rootcoord.AllocIDResponse - 23, // 110: milvus.proto.rootcoord.RootCoord.UpdateChannelTimeTick:output_type -> milvus.proto.common.Status - 23, // 111: milvus.proto.rootcoord.RootCoord.InvalidateCollectionMetaCache:output_type -> milvus.proto.common.Status - 83, // 112: milvus.proto.rootcoord.RootCoord.ShowConfigurations:output_type -> milvus.proto.internal.ShowConfigurationsResponse - 84, // 113: milvus.proto.rootcoord.RootCoord.GetMetrics:output_type -> milvus.proto.milvus.GetMetricsResponse - 23, // 114: milvus.proto.rootcoord.RootCoord.CreateCredential:output_type -> milvus.proto.common.Status - 23, // 115: milvus.proto.rootcoord.RootCoord.UpdateCredential:output_type -> milvus.proto.common.Status - 23, // 116: milvus.proto.rootcoord.RootCoord.DeleteCredential:output_type -> milvus.proto.common.Status - 85, // 117: milvus.proto.rootcoord.RootCoord.ListCredUsers:output_type -> milvus.proto.milvus.ListCredUsersResponse - 9, // 118: milvus.proto.rootcoord.RootCoord.GetCredential:output_type -> milvus.proto.rootcoord.GetCredentialResponse - 23, // 119: milvus.proto.rootcoord.RootCoord.CreateRole:output_type -> milvus.proto.common.Status - 23, // 120: milvus.proto.rootcoord.RootCoord.DropRole:output_type -> milvus.proto.common.Status - 23, // 121: milvus.proto.rootcoord.RootCoord.OperateUserRole:output_type -> milvus.proto.common.Status - 86, // 122: milvus.proto.rootcoord.RootCoord.SelectRole:output_type -> milvus.proto.milvus.SelectRoleResponse - 87, // 123: milvus.proto.rootcoord.RootCoord.SelectUser:output_type -> milvus.proto.milvus.SelectUserResponse - 23, // 124: milvus.proto.rootcoord.RootCoord.OperatePrivilege:output_type -> milvus.proto.common.Status - 88, // 125: milvus.proto.rootcoord.RootCoord.SelectGrant:output_type -> milvus.proto.milvus.SelectGrantResponse - 89, // 126: milvus.proto.rootcoord.RootCoord.ListPolicy:output_type -> milvus.proto.internal.ListPolicyResponse - 90, // 127: milvus.proto.rootcoord.RootCoord.BackupRBAC:output_type -> milvus.proto.milvus.BackupRBACMetaResponse - 23, // 128: milvus.proto.rootcoord.RootCoord.RestoreRBAC:output_type -> milvus.proto.common.Status - 23, // 129: milvus.proto.rootcoord.RootCoord.CreatePrivilegeGroup:output_type -> milvus.proto.common.Status - 23, // 130: milvus.proto.rootcoord.RootCoord.DropPrivilegeGroup:output_type -> milvus.proto.common.Status - 91, // 131: milvus.proto.rootcoord.RootCoord.ListPrivilegeGroups:output_type -> milvus.proto.milvus.ListPrivilegeGroupsResponse - 23, // 132: milvus.proto.rootcoord.RootCoord.OperatePrivilegeGroup:output_type -> milvus.proto.common.Status - 92, // 133: milvus.proto.rootcoord.RootCoord.CheckHealth:output_type -> milvus.proto.milvus.CheckHealthResponse - 23, // 134: milvus.proto.rootcoord.RootCoord.RenameCollection:output_type -> milvus.proto.common.Status - 23, // 135: milvus.proto.rootcoord.RootCoord.CreateDatabase:output_type -> milvus.proto.common.Status - 23, // 136: milvus.proto.rootcoord.RootCoord.DropDatabase:output_type -> milvus.proto.common.Status - 93, // 137: milvus.proto.rootcoord.RootCoord.ListDatabases:output_type -> milvus.proto.milvus.ListDatabasesResponse - 11, // 138: milvus.proto.rootcoord.RootCoord.DescribeDatabase:output_type -> milvus.proto.rootcoord.DescribeDatabaseResponse - 23, // 139: milvus.proto.rootcoord.RootCoord.AlterDatabase:output_type -> milvus.proto.common.Status - 83, // [83:140] is the sub-list for method output_type - 26, // [26:83] is the sub-list for method input_type + 74, // 83: milvus.proto.rootcoord.RootCoord.GetQuotaMetrics:input_type -> milvus.proto.internal.GetQuotaMetricsRequest + 75, // 84: milvus.proto.rootcoord.RootCoord.GetComponentStates:output_type -> milvus.proto.milvus.ComponentStates + 76, // 85: milvus.proto.rootcoord.RootCoord.GetTimeTickChannel:output_type -> milvus.proto.milvus.StringResponse + 76, // 86: milvus.proto.rootcoord.RootCoord.GetStatisticsChannel:output_type -> milvus.proto.milvus.StringResponse + 23, // 87: milvus.proto.rootcoord.RootCoord.CreateCollection:output_type -> milvus.proto.common.Status + 23, // 88: milvus.proto.rootcoord.RootCoord.DropCollection:output_type -> milvus.proto.common.Status + 23, // 89: milvus.proto.rootcoord.RootCoord.AddCollectionField:output_type -> milvus.proto.common.Status + 77, // 90: milvus.proto.rootcoord.RootCoord.HasCollection:output_type -> milvus.proto.milvus.BoolResponse + 78, // 91: milvus.proto.rootcoord.RootCoord.DescribeCollection:output_type -> milvus.proto.milvus.DescribeCollectionResponse + 78, // 92: milvus.proto.rootcoord.RootCoord.DescribeCollectionInternal:output_type -> milvus.proto.milvus.DescribeCollectionResponse + 23, // 93: milvus.proto.rootcoord.RootCoord.CreateAlias:output_type -> milvus.proto.common.Status + 23, // 94: milvus.proto.rootcoord.RootCoord.DropAlias:output_type -> milvus.proto.common.Status + 23, // 95: milvus.proto.rootcoord.RootCoord.AlterAlias:output_type -> milvus.proto.common.Status + 79, // 96: milvus.proto.rootcoord.RootCoord.DescribeAlias:output_type -> milvus.proto.milvus.DescribeAliasResponse + 80, // 97: milvus.proto.rootcoord.RootCoord.ListAliases:output_type -> milvus.proto.milvus.ListAliasesResponse + 81, // 98: milvus.proto.rootcoord.RootCoord.ShowCollections:output_type -> milvus.proto.milvus.ShowCollectionsResponse + 19, // 99: milvus.proto.rootcoord.RootCoord.ShowCollectionIDs:output_type -> milvus.proto.rootcoord.ShowCollectionIDsResponse + 23, // 100: milvus.proto.rootcoord.RootCoord.AlterCollection:output_type -> milvus.proto.common.Status + 23, // 101: milvus.proto.rootcoord.RootCoord.AlterCollectionField:output_type -> milvus.proto.common.Status + 23, // 102: milvus.proto.rootcoord.RootCoord.CreatePartition:output_type -> milvus.proto.common.Status + 23, // 103: milvus.proto.rootcoord.RootCoord.DropPartition:output_type -> milvus.proto.common.Status + 77, // 104: milvus.proto.rootcoord.RootCoord.HasPartition:output_type -> milvus.proto.milvus.BoolResponse + 82, // 105: milvus.proto.rootcoord.RootCoord.ShowPartitions:output_type -> milvus.proto.milvus.ShowPartitionsResponse + 82, // 106: milvus.proto.rootcoord.RootCoord.ShowPartitionsInternal:output_type -> milvus.proto.milvus.ShowPartitionsResponse + 83, // 107: milvus.proto.rootcoord.RootCoord.ShowSegments:output_type -> milvus.proto.milvus.ShowSegmentsResponse + 14, // 108: milvus.proto.rootcoord.RootCoord.GetPChannelInfo:output_type -> milvus.proto.rootcoord.GetPChannelInfoResponse + 1, // 109: milvus.proto.rootcoord.RootCoord.AllocTimestamp:output_type -> milvus.proto.rootcoord.AllocTimestampResponse + 3, // 110: milvus.proto.rootcoord.RootCoord.AllocID:output_type -> milvus.proto.rootcoord.AllocIDResponse + 23, // 111: milvus.proto.rootcoord.RootCoord.UpdateChannelTimeTick:output_type -> milvus.proto.common.Status + 23, // 112: milvus.proto.rootcoord.RootCoord.InvalidateCollectionMetaCache:output_type -> milvus.proto.common.Status + 84, // 113: milvus.proto.rootcoord.RootCoord.ShowConfigurations:output_type -> milvus.proto.internal.ShowConfigurationsResponse + 85, // 114: milvus.proto.rootcoord.RootCoord.GetMetrics:output_type -> milvus.proto.milvus.GetMetricsResponse + 23, // 115: milvus.proto.rootcoord.RootCoord.CreateCredential:output_type -> milvus.proto.common.Status + 23, // 116: milvus.proto.rootcoord.RootCoord.UpdateCredential:output_type -> milvus.proto.common.Status + 23, // 117: milvus.proto.rootcoord.RootCoord.DeleteCredential:output_type -> milvus.proto.common.Status + 86, // 118: milvus.proto.rootcoord.RootCoord.ListCredUsers:output_type -> milvus.proto.milvus.ListCredUsersResponse + 9, // 119: milvus.proto.rootcoord.RootCoord.GetCredential:output_type -> milvus.proto.rootcoord.GetCredentialResponse + 23, // 120: milvus.proto.rootcoord.RootCoord.CreateRole:output_type -> milvus.proto.common.Status + 23, // 121: milvus.proto.rootcoord.RootCoord.DropRole:output_type -> milvus.proto.common.Status + 23, // 122: milvus.proto.rootcoord.RootCoord.OperateUserRole:output_type -> milvus.proto.common.Status + 87, // 123: milvus.proto.rootcoord.RootCoord.SelectRole:output_type -> milvus.proto.milvus.SelectRoleResponse + 88, // 124: milvus.proto.rootcoord.RootCoord.SelectUser:output_type -> milvus.proto.milvus.SelectUserResponse + 23, // 125: milvus.proto.rootcoord.RootCoord.OperatePrivilege:output_type -> milvus.proto.common.Status + 89, // 126: milvus.proto.rootcoord.RootCoord.SelectGrant:output_type -> milvus.proto.milvus.SelectGrantResponse + 90, // 127: milvus.proto.rootcoord.RootCoord.ListPolicy:output_type -> milvus.proto.internal.ListPolicyResponse + 91, // 128: milvus.proto.rootcoord.RootCoord.BackupRBAC:output_type -> milvus.proto.milvus.BackupRBACMetaResponse + 23, // 129: milvus.proto.rootcoord.RootCoord.RestoreRBAC:output_type -> milvus.proto.common.Status + 23, // 130: milvus.proto.rootcoord.RootCoord.CreatePrivilegeGroup:output_type -> milvus.proto.common.Status + 23, // 131: milvus.proto.rootcoord.RootCoord.DropPrivilegeGroup:output_type -> milvus.proto.common.Status + 92, // 132: milvus.proto.rootcoord.RootCoord.ListPrivilegeGroups:output_type -> milvus.proto.milvus.ListPrivilegeGroupsResponse + 23, // 133: milvus.proto.rootcoord.RootCoord.OperatePrivilegeGroup:output_type -> milvus.proto.common.Status + 93, // 134: milvus.proto.rootcoord.RootCoord.CheckHealth:output_type -> milvus.proto.milvus.CheckHealthResponse + 23, // 135: milvus.proto.rootcoord.RootCoord.RenameCollection:output_type -> milvus.proto.common.Status + 23, // 136: milvus.proto.rootcoord.RootCoord.CreateDatabase:output_type -> milvus.proto.common.Status + 23, // 137: milvus.proto.rootcoord.RootCoord.DropDatabase:output_type -> milvus.proto.common.Status + 94, // 138: milvus.proto.rootcoord.RootCoord.ListDatabases:output_type -> milvus.proto.milvus.ListDatabasesResponse + 11, // 139: milvus.proto.rootcoord.RootCoord.DescribeDatabase:output_type -> milvus.proto.rootcoord.DescribeDatabaseResponse + 23, // 140: milvus.proto.rootcoord.RootCoord.AlterDatabase:output_type -> milvus.proto.common.Status + 95, // 141: milvus.proto.rootcoord.RootCoord.GetQuotaMetrics:output_type -> milvus.proto.internal.GetQuotaMetricsResponse + 84, // [84:142] is the sub-list for method output_type + 26, // [26:84] is the sub-list for method input_type 26, // [26:26] is the sub-list for extension type_name 26, // [26:26] is the sub-list for extension extendee 0, // [0:26] is the sub-list for field type_name diff --git a/pkg/proto/rootcoordpb/root_coord_grpc.pb.go b/pkg/proto/rootcoordpb/root_coord_grpc.pb.go index ba61aa9183..1142bcd381 100644 --- a/pkg/proto/rootcoordpb/root_coord_grpc.pb.go +++ b/pkg/proto/rootcoordpb/root_coord_grpc.pb.go @@ -80,6 +80,7 @@ const ( RootCoord_ListDatabases_FullMethodName = "/milvus.proto.rootcoord.RootCoord/ListDatabases" RootCoord_DescribeDatabase_FullMethodName = "/milvus.proto.rootcoord.RootCoord/DescribeDatabase" RootCoord_AlterDatabase_FullMethodName = "/milvus.proto.rootcoord.RootCoord/AlterDatabase" + RootCoord_GetQuotaMetrics_FullMethodName = "/milvus.proto.rootcoord.RootCoord/GetQuotaMetrics" ) // RootCoordClient is the client API for RootCoord service. @@ -199,6 +200,7 @@ type RootCoordClient interface { ListDatabases(ctx context.Context, in *milvuspb.ListDatabasesRequest, opts ...grpc.CallOption) (*milvuspb.ListDatabasesResponse, error) DescribeDatabase(ctx context.Context, in *DescribeDatabaseRequest, opts ...grpc.CallOption) (*DescribeDatabaseResponse, error) AlterDatabase(ctx context.Context, in *AlterDatabaseRequest, opts ...grpc.CallOption) (*commonpb.Status, error) + GetQuotaMetrics(ctx context.Context, in *internalpb.GetQuotaMetricsRequest, opts ...grpc.CallOption) (*internalpb.GetQuotaMetricsResponse, error) } type rootCoordClient struct { @@ -722,6 +724,15 @@ func (c *rootCoordClient) AlterDatabase(ctx context.Context, in *AlterDatabaseRe return out, nil } +func (c *rootCoordClient) GetQuotaMetrics(ctx context.Context, in *internalpb.GetQuotaMetricsRequest, opts ...grpc.CallOption) (*internalpb.GetQuotaMetricsResponse, error) { + out := new(internalpb.GetQuotaMetricsResponse) + err := c.cc.Invoke(ctx, RootCoord_GetQuotaMetrics_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + // RootCoordServer is the server API for RootCoord service. // All implementations should embed UnimplementedRootCoordServer // for forward compatibility @@ -839,6 +850,7 @@ type RootCoordServer interface { ListDatabases(context.Context, *milvuspb.ListDatabasesRequest) (*milvuspb.ListDatabasesResponse, error) DescribeDatabase(context.Context, *DescribeDatabaseRequest) (*DescribeDatabaseResponse, error) AlterDatabase(context.Context, *AlterDatabaseRequest) (*commonpb.Status, error) + GetQuotaMetrics(context.Context, *internalpb.GetQuotaMetricsRequest) (*internalpb.GetQuotaMetricsResponse, error) } // UnimplementedRootCoordServer should be embedded to have forward compatible implementations. @@ -1016,6 +1028,9 @@ func (UnimplementedRootCoordServer) DescribeDatabase(context.Context, *DescribeD func (UnimplementedRootCoordServer) AlterDatabase(context.Context, *AlterDatabaseRequest) (*commonpb.Status, error) { return nil, status.Errorf(codes.Unimplemented, "method AlterDatabase not implemented") } +func (UnimplementedRootCoordServer) GetQuotaMetrics(context.Context, *internalpb.GetQuotaMetricsRequest) (*internalpb.GetQuotaMetricsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetQuotaMetrics not implemented") +} // UnsafeRootCoordServer may be embedded to opt out of forward compatibility for this service. // Use of this interface is not recommended, as added methods to RootCoordServer will @@ -2054,6 +2069,24 @@ func _RootCoord_AlterDatabase_Handler(srv interface{}, ctx context.Context, dec return interceptor(ctx, in, info, handler) } +func _RootCoord_GetQuotaMetrics_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(internalpb.GetQuotaMetricsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(RootCoordServer).GetQuotaMetrics(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: RootCoord_GetQuotaMetrics_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(RootCoordServer).GetQuotaMetrics(ctx, req.(*internalpb.GetQuotaMetricsRequest)) + } + return interceptor(ctx, in, info, handler) +} + // RootCoord_ServiceDesc is the grpc.ServiceDesc for RootCoord service. // It's only intended for direct use with grpc.RegisterService, // and not to be introspected or modified (even as a copy) @@ -2289,6 +2322,10 @@ var RootCoord_ServiceDesc = grpc.ServiceDesc{ MethodName: "AlterDatabase", Handler: _RootCoord_AlterDatabase_Handler, }, + { + MethodName: "GetQuotaMetrics", + Handler: _RootCoord_GetQuotaMetrics_Handler, + }, }, Streams: []grpc.StreamDesc{}, Metadata: "root_coord.proto", diff --git a/pkg/util/metricsinfo/metrics_info.go b/pkg/util/metricsinfo/metrics_info.go index 76619cdcdd..a4400aaf82 100644 --- a/pkg/util/metricsinfo/metrics_info.go +++ b/pkg/util/metricsinfo/metrics_info.go @@ -46,6 +46,22 @@ type HardwareMetrics struct { IOWaitPercentage float64 `json:"io_wait_percentage"` // IO Wait in % } +type TaskQueueMetrics struct { + Type string `json:"type"` + PendingCount int64 `json:"pending_count"` + ExecutingCount int64 `json:"executing_count"` + PendingTasks []TaskMetrics `json:"pending_tasks"` + ExecutingTasks []TaskMetrics `json:"executing_tasks"` +} + +type TaskMetrics struct { + Type string `json:"type"` + MaxQueueTime int64 `json:"max_queue_ms"` + MinQueueTime int64 `json:"min_queue_ms"` + AvgQueueTime int64 `json:"avg_queue_ms"` + Count int64 `json:"count"` +} + const ( // GitCommitEnvKey defines the key to retrieve the commit corresponding to the current milvus version // from the metrics information diff --git a/pkg/util/metricsinfo/quota_metric.go b/pkg/util/metricsinfo/quota_metric.go index 325c0e1cfb..85883d93ff 100644 --- a/pkg/util/metricsinfo/quota_metric.go +++ b/pkg/util/metricsinfo/quota_metric.go @@ -88,6 +88,14 @@ type DataNodeQuotaMetrics struct { // ProxyQuotaMetrics are metrics of Proxy. type ProxyQuotaMetrics struct { - Hms HardwareMetrics - Rms []RateMetric + Hms HardwareMetrics + Rms []RateMetric + QueueMetrics []TaskQueueMetrics +} + +type QuotaCenterMetrics struct { + QueryNodeMetrics map[int64]*QueryNodeQuotaMetrics + DataNodeMetrics map[int64]*DataNodeQuotaMetrics + ProxyMetrics map[int64]*ProxyQuotaMetrics + DataCoordMetrics *DataCoordQuotaMetrics }