enhance: use latest milvus proto, add unimplemented server (#30889)

issue: #30647

Signed-off-by: chyezh <chyezh@outlook.com>
pull/30372/head
chyezh 2024-02-29 10:13:00 +08:00 committed by GitHub
parent 50a78b682e
commit e59bc1e526
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
8 changed files with 334 additions and 235 deletions

2
go.mod
View File

@ -24,7 +24,7 @@ require (
github.com/grpc-ecosystem/go-grpc-middleware v1.3.0
github.com/klauspost/compress v1.16.7
github.com/mgutz/ansi v0.0.0-20200706080929-d51e80ef957d
github.com/milvus-io/milvus-proto/go-api/v2 v2.3.4-0.20240131042256-9e75d6135cbe
github.com/milvus-io/milvus-proto/go-api/v2 v2.3.4-0.20240228061649-a922b16f2a46
github.com/minio/minio-go/v7 v7.0.61
github.com/prometheus/client_golang v1.14.0
github.com/prometheus/client_model v0.3.0

4
go.sum
View File

@ -586,8 +586,8 @@ github.com/microcosm-cc/bluemonday v1.0.2/go.mod h1:iVP4YcDBq+n/5fb23BhYFvIMq/le
github.com/miekg/dns v1.0.14/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg=
github.com/milvus-io/gorocksdb v0.0.0-20220624081344-8c5f4212846b h1:TfeY0NxYxZzUfIfYe5qYDBzt4ZYRqzUjTR6CvUzjat8=
github.com/milvus-io/gorocksdb v0.0.0-20220624081344-8c5f4212846b/go.mod h1:iwW+9cWfIzzDseEBCCeDSN5SD16Tidvy8cwQ7ZY8Qj4=
github.com/milvus-io/milvus-proto/go-api/v2 v2.3.4-0.20240131042256-9e75d6135cbe h1:wGnRmOB9mbY2Scly7WC/2btQ88nrG+b6kaP5nmlLfkQ=
github.com/milvus-io/milvus-proto/go-api/v2 v2.3.4-0.20240131042256-9e75d6135cbe/go.mod h1:1OIl0v5PQeNxIJhCvY+K55CBUOYDZevw9g9380u1Wek=
github.com/milvus-io/milvus-proto/go-api/v2 v2.3.4-0.20240228061649-a922b16f2a46 h1:IgoGNTbsRPa2kdNI+IWuZrrortFEjTB42/gYDklZHVU=
github.com/milvus-io/milvus-proto/go-api/v2 v2.3.4-0.20240228061649-a922b16f2a46/go.mod h1:1OIl0v5PQeNxIJhCvY+K55CBUOYDZevw9g9380u1Wek=
github.com/milvus-io/milvus-storage/go v0.0.0-20231227072638-ebd0b8e56d70 h1:Z+sp64fmAOxAG7mU0dfVOXvAXlwRB0c8a96rIM5HevI=
github.com/milvus-io/milvus-storage/go v0.0.0-20231227072638-ebd0b8e56d70/go.mod h1:GPETMcTZq1gLY1WA6Na5kiNAKnq8SEMMiVKUZrM3sho=
github.com/milvus-io/pulsar-client-go v0.6.10 h1:eqpJjU+/QX0iIhEo3nhOqMNXL+TyInAs1IAHZCrCM/A=

View File

@ -92,6 +92,8 @@ const apiPathPrefix = "/api/v1"
// Server is the Proxy Server
type Server struct {
milvuspb.UnimplementedMilvusServiceServer
ctx context.Context
wg sync.WaitGroup
proxy types.ProxyComponent

View File

@ -5495,6 +5495,61 @@ func (_c *MockProxy_UpdateCredentialCache_Call) RunAndReturn(run func(context.Co
return _c
}
// UpdateResourceGroups provides a mock function with given fields: _a0, _a1
func (_m *MockProxy) UpdateResourceGroups(_a0 context.Context, _a1 *milvuspb.UpdateResourceGroupsRequest) (*commonpb.Status, error) {
ret := _m.Called(_a0, _a1)
var r0 *commonpb.Status
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.UpdateResourceGroupsRequest) (*commonpb.Status, error)); ok {
return rf(_a0, _a1)
}
if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.UpdateResourceGroupsRequest) *commonpb.Status); ok {
r0 = rf(_a0, _a1)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(*commonpb.Status)
}
}
if rf, ok := ret.Get(1).(func(context.Context, *milvuspb.UpdateResourceGroupsRequest) error); ok {
r1 = rf(_a0, _a1)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// MockProxy_UpdateResourceGroups_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UpdateResourceGroups'
type MockProxy_UpdateResourceGroups_Call struct {
*mock.Call
}
// UpdateResourceGroups is a helper method to define mock.On call
// - _a0 context.Context
// - _a1 *milvuspb.UpdateResourceGroupsRequest
func (_e *MockProxy_Expecter) UpdateResourceGroups(_a0 interface{}, _a1 interface{}) *MockProxy_UpdateResourceGroups_Call {
return &MockProxy_UpdateResourceGroups_Call{Call: _e.mock.On("UpdateResourceGroups", _a0, _a1)}
}
func (_c *MockProxy_UpdateResourceGroups_Call) Run(run func(_a0 context.Context, _a1 *milvuspb.UpdateResourceGroupsRequest)) *MockProxy_UpdateResourceGroups_Call {
_c.Call.Run(func(args mock.Arguments) {
run(args[0].(context.Context), args[1].(*milvuspb.UpdateResourceGroupsRequest))
})
return _c
}
func (_c *MockProxy_UpdateResourceGroups_Call) Return(_a0 *commonpb.Status, _a1 error) *MockProxy_UpdateResourceGroups_Call {
_c.Call.Return(_a0, _a1)
return _c
}
func (_c *MockProxy_UpdateResourceGroups_Call) RunAndReturn(run func(context.Context, *milvuspb.UpdateResourceGroupsRequest) (*commonpb.Status, error)) *MockProxy_UpdateResourceGroups_Call {
_c.Call.Return(run)
return _c
}
// UpdateStateCode provides a mock function with given fields: stateCode
func (_m *MockProxy) UpdateStateCode(stateCode commonpb.StateCode) {
_m.Called(stateCode)

View File

@ -1,4 +1,4 @@
// Code generated by mockery v2.38.0. DO NOT EDIT.
// Code generated by mockery v2.32.4. DO NOT EDIT.
package mocks
@ -6,6 +6,7 @@ import (
context "context"
commonpb "github.com/milvus-io/milvus-proto/go-api/v2/commonpb"
clientv3 "go.etcd.io/etcd/client/v3"
internalpb "github.com/milvus-io/milvus/internal/proto/internalpb"
@ -16,9 +17,13 @@ import (
proxypb "github.com/milvus-io/milvus/internal/proto/proxypb"
rootcoordpb "github.com/milvus-io/milvus/internal/proto/rootcoordpb"
txnkv "github.com/tikv/client-go/v2/txnkv"
types "github.com/milvus-io/milvus/internal/types"
)
// RootCoord is an autogenerated mock type for the RootCoord type
// RootCoord is an autogenerated mock type for the RootCoordComponent type
type RootCoord struct {
mock.Mock
}
@ -35,10 +40,6 @@ func (_m *RootCoord) EXPECT() *RootCoord_Expecter {
func (_m *RootCoord) AllocID(_a0 context.Context, _a1 *rootcoordpb.AllocIDRequest) (*rootcoordpb.AllocIDResponse, error) {
ret := _m.Called(_a0, _a1)
if len(ret) == 0 {
panic("no return value specified for AllocID")
}
var r0 *rootcoordpb.AllocIDResponse
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, *rootcoordpb.AllocIDRequest) (*rootcoordpb.AllocIDResponse, error)); ok {
@ -94,10 +95,6 @@ func (_c *RootCoord_AllocID_Call) RunAndReturn(run func(context.Context, *rootco
func (_m *RootCoord) AllocTimestamp(_a0 context.Context, _a1 *rootcoordpb.AllocTimestampRequest) (*rootcoordpb.AllocTimestampResponse, error) {
ret := _m.Called(_a0, _a1)
if len(ret) == 0 {
panic("no return value specified for AllocTimestamp")
}
var r0 *rootcoordpb.AllocTimestampResponse
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, *rootcoordpb.AllocTimestampRequest) (*rootcoordpb.AllocTimestampResponse, error)); ok {
@ -153,10 +150,6 @@ func (_c *RootCoord_AllocTimestamp_Call) RunAndReturn(run func(context.Context,
func (_m *RootCoord) AlterAlias(_a0 context.Context, _a1 *milvuspb.AlterAliasRequest) (*commonpb.Status, error) {
ret := _m.Called(_a0, _a1)
if len(ret) == 0 {
panic("no return value specified for AlterAlias")
}
var r0 *commonpb.Status
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.AlterAliasRequest) (*commonpb.Status, error)); ok {
@ -212,10 +205,6 @@ func (_c *RootCoord_AlterAlias_Call) RunAndReturn(run func(context.Context, *mil
func (_m *RootCoord) AlterCollection(_a0 context.Context, _a1 *milvuspb.AlterCollectionRequest) (*commonpb.Status, error) {
ret := _m.Called(_a0, _a1)
if len(ret) == 0 {
panic("no return value specified for AlterCollection")
}
var r0 *commonpb.Status
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.AlterCollectionRequest) (*commonpb.Status, error)); ok {
@ -271,10 +260,6 @@ func (_c *RootCoord_AlterCollection_Call) RunAndReturn(run func(context.Context,
func (_m *RootCoord) CheckHealth(_a0 context.Context, _a1 *milvuspb.CheckHealthRequest) (*milvuspb.CheckHealthResponse, error) {
ret := _m.Called(_a0, _a1)
if len(ret) == 0 {
panic("no return value specified for CheckHealth")
}
var r0 *milvuspb.CheckHealthResponse
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.CheckHealthRequest) (*milvuspb.CheckHealthResponse, error)); ok {
@ -330,10 +315,6 @@ func (_c *RootCoord_CheckHealth_Call) RunAndReturn(run func(context.Context, *mi
func (_m *RootCoord) CreateAlias(_a0 context.Context, _a1 *milvuspb.CreateAliasRequest) (*commonpb.Status, error) {
ret := _m.Called(_a0, _a1)
if len(ret) == 0 {
panic("no return value specified for CreateAlias")
}
var r0 *commonpb.Status
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.CreateAliasRequest) (*commonpb.Status, error)); ok {
@ -389,10 +370,6 @@ func (_c *RootCoord_CreateAlias_Call) RunAndReturn(run func(context.Context, *mi
func (_m *RootCoord) CreateCollection(_a0 context.Context, _a1 *milvuspb.CreateCollectionRequest) (*commonpb.Status, error) {
ret := _m.Called(_a0, _a1)
if len(ret) == 0 {
panic("no return value specified for CreateCollection")
}
var r0 *commonpb.Status
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.CreateCollectionRequest) (*commonpb.Status, error)); ok {
@ -448,10 +425,6 @@ func (_c *RootCoord_CreateCollection_Call) RunAndReturn(run func(context.Context
func (_m *RootCoord) CreateCredential(_a0 context.Context, _a1 *internalpb.CredentialInfo) (*commonpb.Status, error) {
ret := _m.Called(_a0, _a1)
if len(ret) == 0 {
panic("no return value specified for CreateCredential")
}
var r0 *commonpb.Status
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, *internalpb.CredentialInfo) (*commonpb.Status, error)); ok {
@ -507,10 +480,6 @@ func (_c *RootCoord_CreateCredential_Call) RunAndReturn(run func(context.Context
func (_m *RootCoord) CreateDatabase(_a0 context.Context, _a1 *milvuspb.CreateDatabaseRequest) (*commonpb.Status, error) {
ret := _m.Called(_a0, _a1)
if len(ret) == 0 {
panic("no return value specified for CreateDatabase")
}
var r0 *commonpb.Status
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.CreateDatabaseRequest) (*commonpb.Status, error)); ok {
@ -566,10 +535,6 @@ func (_c *RootCoord_CreateDatabase_Call) RunAndReturn(run func(context.Context,
func (_m *RootCoord) CreatePartition(_a0 context.Context, _a1 *milvuspb.CreatePartitionRequest) (*commonpb.Status, error) {
ret := _m.Called(_a0, _a1)
if len(ret) == 0 {
panic("no return value specified for CreatePartition")
}
var r0 *commonpb.Status
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.CreatePartitionRequest) (*commonpb.Status, error)); ok {
@ -625,10 +590,6 @@ func (_c *RootCoord_CreatePartition_Call) RunAndReturn(run func(context.Context,
func (_m *RootCoord) CreateRole(_a0 context.Context, _a1 *milvuspb.CreateRoleRequest) (*commonpb.Status, error) {
ret := _m.Called(_a0, _a1)
if len(ret) == 0 {
panic("no return value specified for CreateRole")
}
var r0 *commonpb.Status
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.CreateRoleRequest) (*commonpb.Status, error)); ok {
@ -684,10 +645,6 @@ func (_c *RootCoord_CreateRole_Call) RunAndReturn(run func(context.Context, *mil
func (_m *RootCoord) DeleteCredential(_a0 context.Context, _a1 *milvuspb.DeleteCredentialRequest) (*commonpb.Status, error) {
ret := _m.Called(_a0, _a1)
if len(ret) == 0 {
panic("no return value specified for DeleteCredential")
}
var r0 *commonpb.Status
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.DeleteCredentialRequest) (*commonpb.Status, error)); ok {
@ -743,10 +700,6 @@ func (_c *RootCoord_DeleteCredential_Call) RunAndReturn(run func(context.Context
func (_m *RootCoord) DescribeAlias(_a0 context.Context, _a1 *milvuspb.DescribeAliasRequest) (*milvuspb.DescribeAliasResponse, error) {
ret := _m.Called(_a0, _a1)
if len(ret) == 0 {
panic("no return value specified for DescribeAlias")
}
var r0 *milvuspb.DescribeAliasResponse
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.DescribeAliasRequest) (*milvuspb.DescribeAliasResponse, error)); ok {
@ -802,10 +755,6 @@ func (_c *RootCoord_DescribeAlias_Call) RunAndReturn(run func(context.Context, *
func (_m *RootCoord) DescribeCollection(_a0 context.Context, _a1 *milvuspb.DescribeCollectionRequest) (*milvuspb.DescribeCollectionResponse, error) {
ret := _m.Called(_a0, _a1)
if len(ret) == 0 {
panic("no return value specified for DescribeCollection")
}
var r0 *milvuspb.DescribeCollectionResponse
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.DescribeCollectionRequest) (*milvuspb.DescribeCollectionResponse, error)); ok {
@ -861,10 +810,6 @@ func (_c *RootCoord_DescribeCollection_Call) RunAndReturn(run func(context.Conte
func (_m *RootCoord) DescribeCollectionInternal(_a0 context.Context, _a1 *milvuspb.DescribeCollectionRequest) (*milvuspb.DescribeCollectionResponse, error) {
ret := _m.Called(_a0, _a1)
if len(ret) == 0 {
panic("no return value specified for DescribeCollectionInternal")
}
var r0 *milvuspb.DescribeCollectionResponse
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.DescribeCollectionRequest) (*milvuspb.DescribeCollectionResponse, error)); ok {
@ -920,10 +865,6 @@ func (_c *RootCoord_DescribeCollectionInternal_Call) RunAndReturn(run func(conte
func (_m *RootCoord) DropAlias(_a0 context.Context, _a1 *milvuspb.DropAliasRequest) (*commonpb.Status, error) {
ret := _m.Called(_a0, _a1)
if len(ret) == 0 {
panic("no return value specified for DropAlias")
}
var r0 *commonpb.Status
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.DropAliasRequest) (*commonpb.Status, error)); ok {
@ -979,10 +920,6 @@ func (_c *RootCoord_DropAlias_Call) RunAndReturn(run func(context.Context, *milv
func (_m *RootCoord) DropCollection(_a0 context.Context, _a1 *milvuspb.DropCollectionRequest) (*commonpb.Status, error) {
ret := _m.Called(_a0, _a1)
if len(ret) == 0 {
panic("no return value specified for DropCollection")
}
var r0 *commonpb.Status
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.DropCollectionRequest) (*commonpb.Status, error)); ok {
@ -1038,10 +975,6 @@ func (_c *RootCoord_DropCollection_Call) RunAndReturn(run func(context.Context,
func (_m *RootCoord) DropDatabase(_a0 context.Context, _a1 *milvuspb.DropDatabaseRequest) (*commonpb.Status, error) {
ret := _m.Called(_a0, _a1)
if len(ret) == 0 {
panic("no return value specified for DropDatabase")
}
var r0 *commonpb.Status
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.DropDatabaseRequest) (*commonpb.Status, error)); ok {
@ -1097,10 +1030,6 @@ func (_c *RootCoord_DropDatabase_Call) RunAndReturn(run func(context.Context, *m
func (_m *RootCoord) DropPartition(_a0 context.Context, _a1 *milvuspb.DropPartitionRequest) (*commonpb.Status, error) {
ret := _m.Called(_a0, _a1)
if len(ret) == 0 {
panic("no return value specified for DropPartition")
}
var r0 *commonpb.Status
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.DropPartitionRequest) (*commonpb.Status, error)); ok {
@ -1156,10 +1085,6 @@ func (_c *RootCoord_DropPartition_Call) RunAndReturn(run func(context.Context, *
func (_m *RootCoord) DropRole(_a0 context.Context, _a1 *milvuspb.DropRoleRequest) (*commonpb.Status, error) {
ret := _m.Called(_a0, _a1)
if len(ret) == 0 {
panic("no return value specified for DropRole")
}
var r0 *commonpb.Status
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.DropRoleRequest) (*commonpb.Status, error)); ok {
@ -1215,10 +1140,6 @@ func (_c *RootCoord_DropRole_Call) RunAndReturn(run func(context.Context, *milvu
func (_m *RootCoord) 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 {
@ -1274,10 +1195,6 @@ func (_c *RootCoord_GetComponentStates_Call) RunAndReturn(run func(context.Conte
func (_m *RootCoord) GetCredential(_a0 context.Context, _a1 *rootcoordpb.GetCredentialRequest) (*rootcoordpb.GetCredentialResponse, error) {
ret := _m.Called(_a0, _a1)
if len(ret) == 0 {
panic("no return value specified for GetCredential")
}
var r0 *rootcoordpb.GetCredentialResponse
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, *rootcoordpb.GetCredentialRequest) (*rootcoordpb.GetCredentialResponse, error)); ok {
@ -1333,10 +1250,6 @@ func (_c *RootCoord_GetCredential_Call) RunAndReturn(run func(context.Context, *
func (_m *RootCoord) GetImportState(_a0 context.Context, _a1 *milvuspb.GetImportStateRequest) (*milvuspb.GetImportStateResponse, error) {
ret := _m.Called(_a0, _a1)
if len(ret) == 0 {
panic("no return value specified for GetImportState")
}
var r0 *milvuspb.GetImportStateResponse
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.GetImportStateRequest) (*milvuspb.GetImportStateResponse, error)); ok {
@ -1388,21 +1301,17 @@ func (_c *RootCoord_GetImportState_Call) RunAndReturn(run func(context.Context,
return _c
}
// GetMetrics provides a mock function with given fields: _a0, _a1
func (_m *RootCoord) GetMetrics(_a0 context.Context, _a1 *milvuspb.GetMetricsRequest) (*milvuspb.GetMetricsResponse, error) {
ret := _m.Called(_a0, _a1)
if len(ret) == 0 {
panic("no return value specified for GetMetrics")
}
// GetMetrics provides a mock function with given fields: ctx, req
func (_m *RootCoord) GetMetrics(ctx context.Context, req *milvuspb.GetMetricsRequest) (*milvuspb.GetMetricsResponse, error) {
ret := _m.Called(ctx, req)
var r0 *milvuspb.GetMetricsResponse
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.GetMetricsRequest) (*milvuspb.GetMetricsResponse, error)); ok {
return rf(_a0, _a1)
return rf(ctx, req)
}
if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.GetMetricsRequest) *milvuspb.GetMetricsResponse); ok {
r0 = rf(_a0, _a1)
r0 = rf(ctx, req)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(*milvuspb.GetMetricsResponse)
@ -1410,7 +1319,7 @@ func (_m *RootCoord) GetMetrics(_a0 context.Context, _a1 *milvuspb.GetMetricsReq
}
if rf, ok := ret.Get(1).(func(context.Context, *milvuspb.GetMetricsRequest) error); ok {
r1 = rf(_a0, _a1)
r1 = rf(ctx, req)
} else {
r1 = ret.Error(1)
}
@ -1424,13 +1333,13 @@ type RootCoord_GetMetrics_Call struct {
}
// GetMetrics is a helper method to define mock.On call
// - _a0 context.Context
// - _a1 *milvuspb.GetMetricsRequest
func (_e *RootCoord_Expecter) GetMetrics(_a0 interface{}, _a1 interface{}) *RootCoord_GetMetrics_Call {
return &RootCoord_GetMetrics_Call{Call: _e.mock.On("GetMetrics", _a0, _a1)}
// - 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 (_c *RootCoord_GetMetrics_Call) Run(run func(_a0 context.Context, _a1 *milvuspb.GetMetricsRequest)) *RootCoord_GetMetrics_Call {
func (_c *RootCoord_GetMetrics_Call) Run(run func(ctx context.Context, req *milvuspb.GetMetricsRequest)) *RootCoord_GetMetrics_Call {
_c.Call.Run(func(args mock.Arguments) {
run(args[0].(context.Context), args[1].(*milvuspb.GetMetricsRequest))
})
@ -1451,10 +1360,6 @@ func (_c *RootCoord_GetMetrics_Call) RunAndReturn(run func(context.Context, *mil
func (_m *RootCoord) 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 {
@ -1510,10 +1415,6 @@ func (_c *RootCoord_GetStatisticsChannel_Call) RunAndReturn(run func(context.Con
func (_m *RootCoord) 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 {
@ -1569,10 +1470,6 @@ func (_c *RootCoord_GetTimeTickChannel_Call) RunAndReturn(run func(context.Conte
func (_m *RootCoord) HasCollection(_a0 context.Context, _a1 *milvuspb.HasCollectionRequest) (*milvuspb.BoolResponse, error) {
ret := _m.Called(_a0, _a1)
if len(ret) == 0 {
panic("no return value specified for HasCollection")
}
var r0 *milvuspb.BoolResponse
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.HasCollectionRequest) (*milvuspb.BoolResponse, error)); ok {
@ -1628,10 +1525,6 @@ func (_c *RootCoord_HasCollection_Call) RunAndReturn(run func(context.Context, *
func (_m *RootCoord) HasPartition(_a0 context.Context, _a1 *milvuspb.HasPartitionRequest) (*milvuspb.BoolResponse, error) {
ret := _m.Called(_a0, _a1)
if len(ret) == 0 {
panic("no return value specified for HasPartition")
}
var r0 *milvuspb.BoolResponse
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.HasPartitionRequest) (*milvuspb.BoolResponse, error)); ok {
@ -1687,10 +1580,6 @@ func (_c *RootCoord_HasPartition_Call) RunAndReturn(run func(context.Context, *m
func (_m *RootCoord) Import(_a0 context.Context, _a1 *milvuspb.ImportRequest) (*milvuspb.ImportResponse, error) {
ret := _m.Called(_a0, _a1)
if len(ret) == 0 {
panic("no return value specified for Import")
}
var r0 *milvuspb.ImportResponse
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.ImportRequest) (*milvuspb.ImportResponse, error)); ok {
@ -1746,10 +1635,6 @@ func (_c *RootCoord_Import_Call) RunAndReturn(run func(context.Context, *milvusp
func (_m *RootCoord) Init() error {
ret := _m.Called()
if len(ret) == 0 {
panic("no return value specified for Init")
}
var r0 error
if rf, ok := ret.Get(0).(func() error); ok {
r0 = rf()
@ -1791,10 +1676,6 @@ func (_c *RootCoord_Init_Call) RunAndReturn(run func() error) *RootCoord_Init_Ca
func (_m *RootCoord) InvalidateCollectionMetaCache(_a0 context.Context, _a1 *proxypb.InvalidateCollMetaCacheRequest) (*commonpb.Status, error) {
ret := _m.Called(_a0, _a1)
if len(ret) == 0 {
panic("no return value specified for InvalidateCollectionMetaCache")
}
var r0 *commonpb.Status
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, *proxypb.InvalidateCollMetaCacheRequest) (*commonpb.Status, error)); ok {
@ -1850,10 +1731,6 @@ func (_c *RootCoord_InvalidateCollectionMetaCache_Call) RunAndReturn(run func(co
func (_m *RootCoord) ListAliases(_a0 context.Context, _a1 *milvuspb.ListAliasesRequest) (*milvuspb.ListAliasesResponse, error) {
ret := _m.Called(_a0, _a1)
if len(ret) == 0 {
panic("no return value specified for ListAliases")
}
var r0 *milvuspb.ListAliasesResponse
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.ListAliasesRequest) (*milvuspb.ListAliasesResponse, error)); ok {
@ -1909,10 +1786,6 @@ func (_c *RootCoord_ListAliases_Call) RunAndReturn(run func(context.Context, *mi
func (_m *RootCoord) ListCredUsers(_a0 context.Context, _a1 *milvuspb.ListCredUsersRequest) (*milvuspb.ListCredUsersResponse, error) {
ret := _m.Called(_a0, _a1)
if len(ret) == 0 {
panic("no return value specified for ListCredUsers")
}
var r0 *milvuspb.ListCredUsersResponse
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.ListCredUsersRequest) (*milvuspb.ListCredUsersResponse, error)); ok {
@ -1968,10 +1841,6 @@ func (_c *RootCoord_ListCredUsers_Call) RunAndReturn(run func(context.Context, *
func (_m *RootCoord) ListDatabases(_a0 context.Context, _a1 *milvuspb.ListDatabasesRequest) (*milvuspb.ListDatabasesResponse, error) {
ret := _m.Called(_a0, _a1)
if len(ret) == 0 {
panic("no return value specified for ListDatabases")
}
var r0 *milvuspb.ListDatabasesResponse
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.ListDatabasesRequest) (*milvuspb.ListDatabasesResponse, error)); ok {
@ -2027,10 +1896,6 @@ func (_c *RootCoord_ListDatabases_Call) RunAndReturn(run func(context.Context, *
func (_m *RootCoord) ListImportTasks(_a0 context.Context, _a1 *milvuspb.ListImportTasksRequest) (*milvuspb.ListImportTasksResponse, error) {
ret := _m.Called(_a0, _a1)
if len(ret) == 0 {
panic("no return value specified for ListImportTasks")
}
var r0 *milvuspb.ListImportTasksResponse
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.ListImportTasksRequest) (*milvuspb.ListImportTasksResponse, error)); ok {
@ -2086,10 +1951,6 @@ func (_c *RootCoord_ListImportTasks_Call) RunAndReturn(run func(context.Context,
func (_m *RootCoord) ListPolicy(_a0 context.Context, _a1 *internalpb.ListPolicyRequest) (*internalpb.ListPolicyResponse, error) {
ret := _m.Called(_a0, _a1)
if len(ret) == 0 {
panic("no return value specified for ListPolicy")
}
var r0 *internalpb.ListPolicyResponse
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, *internalpb.ListPolicyRequest) (*internalpb.ListPolicyResponse, error)); ok {
@ -2145,10 +2006,6 @@ func (_c *RootCoord_ListPolicy_Call) RunAndReturn(run func(context.Context, *int
func (_m *RootCoord) OperatePrivilege(_a0 context.Context, _a1 *milvuspb.OperatePrivilegeRequest) (*commonpb.Status, error) {
ret := _m.Called(_a0, _a1)
if len(ret) == 0 {
panic("no return value specified for OperatePrivilege")
}
var r0 *commonpb.Status
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.OperatePrivilegeRequest) (*commonpb.Status, error)); ok {
@ -2204,10 +2061,6 @@ func (_c *RootCoord_OperatePrivilege_Call) RunAndReturn(run func(context.Context
func (_m *RootCoord) OperateUserRole(_a0 context.Context, _a1 *milvuspb.OperateUserRoleRequest) (*commonpb.Status, error) {
ret := _m.Called(_a0, _a1)
if len(ret) == 0 {
panic("no return value specified for OperateUserRole")
}
var r0 *commonpb.Status
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.OperateUserRoleRequest) (*commonpb.Status, error)); ok {
@ -2263,10 +2116,6 @@ func (_c *RootCoord_OperateUserRole_Call) RunAndReturn(run func(context.Context,
func (_m *RootCoord) Register() error {
ret := _m.Called()
if len(ret) == 0 {
panic("no return value specified for Register")
}
var r0 error
if rf, ok := ret.Get(0).(func() error); ok {
r0 = rf()
@ -2308,10 +2157,6 @@ func (_c *RootCoord_Register_Call) RunAndReturn(run func() error) *RootCoord_Reg
func (_m *RootCoord) RenameCollection(_a0 context.Context, _a1 *milvuspb.RenameCollectionRequest) (*commonpb.Status, error) {
ret := _m.Called(_a0, _a1)
if len(ret) == 0 {
panic("no return value specified for RenameCollection")
}
var r0 *commonpb.Status
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.RenameCollectionRequest) (*commonpb.Status, error)); ok {
@ -2367,10 +2212,6 @@ func (_c *RootCoord_RenameCollection_Call) RunAndReturn(run func(context.Context
func (_m *RootCoord) ReportImport(_a0 context.Context, _a1 *rootcoordpb.ImportResult) (*commonpb.Status, error) {
ret := _m.Called(_a0, _a1)
if len(ret) == 0 {
panic("no return value specified for ReportImport")
}
var r0 *commonpb.Status
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, *rootcoordpb.ImportResult) (*commonpb.Status, error)); ok {
@ -2426,10 +2267,6 @@ func (_c *RootCoord_ReportImport_Call) RunAndReturn(run func(context.Context, *r
func (_m *RootCoord) SelectGrant(_a0 context.Context, _a1 *milvuspb.SelectGrantRequest) (*milvuspb.SelectGrantResponse, error) {
ret := _m.Called(_a0, _a1)
if len(ret) == 0 {
panic("no return value specified for SelectGrant")
}
var r0 *milvuspb.SelectGrantResponse
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.SelectGrantRequest) (*milvuspb.SelectGrantResponse, error)); ok {
@ -2485,10 +2322,6 @@ func (_c *RootCoord_SelectGrant_Call) RunAndReturn(run func(context.Context, *mi
func (_m *RootCoord) SelectRole(_a0 context.Context, _a1 *milvuspb.SelectRoleRequest) (*milvuspb.SelectRoleResponse, error) {
ret := _m.Called(_a0, _a1)
if len(ret) == 0 {
panic("no return value specified for SelectRole")
}
var r0 *milvuspb.SelectRoleResponse
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.SelectRoleRequest) (*milvuspb.SelectRoleResponse, error)); ok {
@ -2544,10 +2377,6 @@ func (_c *RootCoord_SelectRole_Call) RunAndReturn(run func(context.Context, *mil
func (_m *RootCoord) SelectUser(_a0 context.Context, _a1 *milvuspb.SelectUserRequest) (*milvuspb.SelectUserResponse, error) {
ret := _m.Called(_a0, _a1)
if len(ret) == 0 {
panic("no return value specified for SelectUser")
}
var r0 *milvuspb.SelectUserResponse
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.SelectUserRequest) (*milvuspb.SelectUserResponse, error)); ok {
@ -2599,14 +2428,226 @@ func (_c *RootCoord_SelectUser_Call) RunAndReturn(run func(context.Context, *mil
return _c
}
// SetAddress provides a mock function with given fields: address
func (_m *RootCoord) 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 {
*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 (_c *RootCoord_SetAddress_Call) Run(run func(address string)) *RootCoord_SetAddress_Call {
_c.Call.Run(func(args mock.Arguments) {
run(args[0].(string))
})
return _c
}
func (_c *RootCoord_SetAddress_Call) Return() *RootCoord_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)
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)
return _c
}
// SetEtcdClient provides a mock function with given fields: etcdClient
func (_m *RootCoord) 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 {
*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 (_c *RootCoord_SetEtcdClient_Call) Run(run func(etcdClient *clientv3.Client)) *RootCoord_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 {
_c.Call.Return()
return _c
}
func (_c *RootCoord_SetEtcdClient_Call) RunAndReturn(run func(*clientv3.Client)) *RootCoord_SetEtcdClient_Call {
_c.Call.Return(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)
var r0 error
if rf, ok := ret.Get(0).(func(types.QueryCoordClient) error); ok {
r0 = rf(queryCoord)
} else {
r0 = ret.Error(0)
}
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 {
*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)}
}
func (_c *RootCoord_SetQueryCoordClient_Call) Run(run func(queryCoord types.QueryCoordClient)) *RootCoord_SetQueryCoordClient_Call {
_c.Call.Run(func(args mock.Arguments) {
run(args[0].(types.QueryCoordClient))
})
return _c
}
func (_c *RootCoord_SetQueryCoordClient_Call) Return(_a0 error) *RootCoord_SetQueryCoordClient_Call {
_c.Call.Return(_a0)
return _c
}
func (_c *RootCoord_SetQueryCoordClient_Call) RunAndReturn(run func(types.QueryCoordClient) error) *RootCoord_SetQueryCoordClient_Call {
_c.Call.Return(run)
return _c
}
// SetTiKVClient provides a mock function with given fields: client
func (_m *RootCoord) 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 {
*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 (_c *RootCoord_SetTiKVClient_Call) Run(run func(client *txnkv.Client)) *RootCoord_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 {
_c.Call.Return()
return _c
}
func (_c *RootCoord_SetTiKVClient_Call) RunAndReturn(run func(*txnkv.Client)) *RootCoord_SetTiKVClient_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) {
ret := _m.Called(_a0, _a1)
if len(ret) == 0 {
panic("no return value specified for ShowCollections")
}
var r0 *milvuspb.ShowCollectionsResponse
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.ShowCollectionsRequest) (*milvuspb.ShowCollectionsResponse, error)); ok {
@ -2662,10 +2703,6 @@ func (_c *RootCoord_ShowCollections_Call) RunAndReturn(run func(context.Context,
func (_m *RootCoord) ShowConfigurations(_a0 context.Context, _a1 *internalpb.ShowConfigurationsRequest) (*internalpb.ShowConfigurationsResponse, error) {
ret := _m.Called(_a0, _a1)
if len(ret) == 0 {
panic("no return value specified for ShowConfigurations")
}
var r0 *internalpb.ShowConfigurationsResponse
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, *internalpb.ShowConfigurationsRequest) (*internalpb.ShowConfigurationsResponse, error)); ok {
@ -2721,10 +2758,6 @@ func (_c *RootCoord_ShowConfigurations_Call) RunAndReturn(run func(context.Conte
func (_m *RootCoord) ShowPartitions(_a0 context.Context, _a1 *milvuspb.ShowPartitionsRequest) (*milvuspb.ShowPartitionsResponse, error) {
ret := _m.Called(_a0, _a1)
if len(ret) == 0 {
panic("no return value specified for ShowPartitions")
}
var r0 *milvuspb.ShowPartitionsResponse
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.ShowPartitionsRequest) (*milvuspb.ShowPartitionsResponse, error)); ok {
@ -2780,10 +2813,6 @@ func (_c *RootCoord_ShowPartitions_Call) RunAndReturn(run func(context.Context,
func (_m *RootCoord) ShowPartitionsInternal(_a0 context.Context, _a1 *milvuspb.ShowPartitionsRequest) (*milvuspb.ShowPartitionsResponse, error) {
ret := _m.Called(_a0, _a1)
if len(ret) == 0 {
panic("no return value specified for ShowPartitionsInternal")
}
var r0 *milvuspb.ShowPartitionsResponse
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.ShowPartitionsRequest) (*milvuspb.ShowPartitionsResponse, error)); ok {
@ -2839,10 +2868,6 @@ func (_c *RootCoord_ShowPartitionsInternal_Call) RunAndReturn(run func(context.C
func (_m *RootCoord) ShowSegments(_a0 context.Context, _a1 *milvuspb.ShowSegmentsRequest) (*milvuspb.ShowSegmentsResponse, error) {
ret := _m.Called(_a0, _a1)
if len(ret) == 0 {
panic("no return value specified for ShowSegments")
}
var r0 *milvuspb.ShowSegmentsResponse
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.ShowSegmentsRequest) (*milvuspb.ShowSegmentsResponse, error)); ok {
@ -2898,10 +2923,6 @@ func (_c *RootCoord_ShowSegments_Call) RunAndReturn(run func(context.Context, *m
func (_m *RootCoord) Start() error {
ret := _m.Called()
if len(ret) == 0 {
panic("no return value specified for Start")
}
var r0 error
if rf, ok := ret.Get(0).(func() error); ok {
r0 = rf()
@ -2943,10 +2964,6 @@ func (_c *RootCoord_Start_Call) RunAndReturn(run func() error) *RootCoord_Start_
func (_m *RootCoord) Stop() error {
ret := _m.Called()
if len(ret) == 0 {
panic("no return value specified for Stop")
}
var r0 error
if rf, ok := ret.Get(0).(func() error); ok {
r0 = rf()
@ -2988,10 +3005,6 @@ func (_c *RootCoord_Stop_Call) RunAndReturn(run func() error) *RootCoord_Stop_Ca
func (_m *RootCoord) UpdateChannelTimeTick(_a0 context.Context, _a1 *internalpb.ChannelTimeTickMsg) (*commonpb.Status, error) {
ret := _m.Called(_a0, _a1)
if len(ret) == 0 {
panic("no return value specified for UpdateChannelTimeTick")
}
var r0 *commonpb.Status
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, *internalpb.ChannelTimeTickMsg) (*commonpb.Status, error)); ok {
@ -3047,10 +3060,6 @@ func (_c *RootCoord_UpdateChannelTimeTick_Call) RunAndReturn(run func(context.Co
func (_m *RootCoord) UpdateCredential(_a0 context.Context, _a1 *internalpb.CredentialInfo) (*commonpb.Status, error) {
ret := _m.Called(_a0, _a1)
if len(ret) == 0 {
panic("no return value specified for UpdateCredential")
}
var r0 *commonpb.Status
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, *internalpb.CredentialInfo) (*commonpb.Status, error)); ok {
@ -3102,6 +3111,39 @@ func (_c *RootCoord_UpdateCredential_Call) RunAndReturn(run func(context.Context
return _c
}
// UpdateStateCode provides a mock function with given fields: _a0
func (_m *RootCoord) 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 {
*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 (_c *RootCoord_UpdateStateCode_Call) Run(run func(_a0 commonpb.StateCode)) *RootCoord_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 {
_c.Call.Return()
return _c
}
func (_c *RootCoord_UpdateStateCode_Call) RunAndReturn(run func(commonpb.StateCode)) *RootCoord_UpdateStateCode_Call {
_c.Call.Return(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.
// The first argument is typically a *testing.T value.
func NewRootCoord(t interface {

View File

@ -32,6 +32,7 @@ import (
"go.uber.org/zap"
"github.com/milvus-io/milvus-proto/go-api/v2/commonpb"
"github.com/milvus-io/milvus-proto/go-api/v2/milvuspb"
"github.com/milvus-io/milvus/internal/allocator"
"github.com/milvus-io/milvus/internal/proto/internalpb"
"github.com/milvus-io/milvus/internal/proxy/accesslog"
@ -72,6 +73,8 @@ var rateCol *ratelimitutil.RateCollector
// Proxy of milvus
type Proxy struct {
milvuspb.UnimplementedMilvusServiceServer
ctx context.Context
cancel context.CancelFunc
wg sync.WaitGroup

View File

@ -12,10 +12,9 @@ require (
github.com/expr-lang/expr v1.15.7
github.com/golang/protobuf v1.5.3
github.com/grpc-ecosystem/go-grpc-middleware v1.3.0
github.com/karlseguin/ccache/v3 v3.0.5
github.com/klauspost/compress v1.16.5
github.com/lingdor/stackerror v0.0.0-20191119040541-976d8885ed76
github.com/milvus-io/milvus-proto/go-api/v2 v2.3.4-0.20240109020841-d367b5a59df1
github.com/milvus-io/milvus-proto/go-api/v2 v2.3.4-0.20240228061649-a922b16f2a46
github.com/nats-io/nats-server/v2 v2.9.17
github.com/nats-io/nats.go v1.24.0
github.com/panjf2000/ants/v2 v2.7.2
@ -23,6 +22,7 @@ require (
github.com/quasilyte/go-ruleguard/dsl v0.3.22
github.com/samber/lo v1.27.0
github.com/shirou/gopsutil/v3 v3.22.9
github.com/sirupsen/logrus v1.9.0
github.com/spaolacci/murmur3 v1.1.0
github.com/spf13/cast v1.3.1
github.com/spf13/viper v1.8.1
@ -132,7 +132,6 @@ require (
github.com/prometheus/procfs v0.9.0 // indirect
github.com/remyoudompheng/bigfft v0.0.0-20200410134404-eec4a21b6bb0 // indirect
github.com/rogpeppe/go-internal v1.10.0 // indirect
github.com/sirupsen/logrus v1.9.0 // indirect
github.com/smartystreets/assertions v1.1.0 // indirect
github.com/soheilhy/cmux v0.1.5 // indirect
github.com/spf13/afero v1.6.0 // indirect

View File

@ -415,8 +415,6 @@ github.com/juju/qthttptest v0.1.1/go.mod h1:aTlAv8TYaflIiTDIQYzxnl1QdPjAg8Q8qJME
github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w=
github.com/julienschmidt/httprouter v1.3.0/go.mod h1:JR6WtHb+2LUe8TCKY3cZOxFyyO8IZAc4RVcycCCAKdM=
github.com/k0kubun/colorstring v0.0.0-20150214042306-9440f1994b88/go.mod h1:3w7q1U84EfirKl04SVQ/s7nPm1ZPhiXd34z40TNz36k=
github.com/karlseguin/ccache/v3 v3.0.5 h1:hFX25+fxzNjsRlREYsoGNa2LoVEw5mPF8wkWq/UnevQ=
github.com/karlseguin/ccache/v3 v3.0.5/go.mod h1:qxC372+Qn+IBj8Pe3KvGjHPj0sWwEF7AeZVhsNPZ6uY=
github.com/kataras/golog v0.0.10/go.mod h1:yJ8YKCmyL+nWjERB90Qwn+bdyBZsaQwU3bTVFgkFIp8=
github.com/kataras/iris/v12 v12.1.8/go.mod h1:LMYy4VlP67TQ3Zgriz8RE2h2kMZV2SgMYbq3UhfoFmE=
github.com/kataras/neffos v0.0.14/go.mod h1:8lqADm8PnbeFfL7CLXh1WHw53dG27MC3pgi2R1rmoTE=
@ -485,8 +483,8 @@ github.com/matttproud/golang_protobuf_extensions v1.0.4/go.mod h1:BSXmuO+STAnVfr
github.com/mediocregopher/radix/v3 v3.4.2/go.mod h1:8FL3F6UQRXHXIBSPUs5h0RybMF8i4n7wVopoX3x7Bv8=
github.com/microcosm-cc/bluemonday v1.0.2/go.mod h1:iVP4YcDBq+n/5fb23BhYFvIMq/leAFZyRl6bYmGDlGc=
github.com/miekg/dns v1.0.14/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg=
github.com/milvus-io/milvus-proto/go-api/v2 v2.3.4-0.20240109020841-d367b5a59df1 h1:oNpMivd94JAMhdSVsFw8t1b+olXz8pbzd5PES21sth8=
github.com/milvus-io/milvus-proto/go-api/v2 v2.3.4-0.20240109020841-d367b5a59df1/go.mod h1:1OIl0v5PQeNxIJhCvY+K55CBUOYDZevw9g9380u1Wek=
github.com/milvus-io/milvus-proto/go-api/v2 v2.3.4-0.20240228061649-a922b16f2a46 h1:IgoGNTbsRPa2kdNI+IWuZrrortFEjTB42/gYDklZHVU=
github.com/milvus-io/milvus-proto/go-api/v2 v2.3.4-0.20240228061649-a922b16f2a46/go.mod h1:1OIl0v5PQeNxIJhCvY+K55CBUOYDZevw9g9380u1Wek=
github.com/milvus-io/pulsar-client-go v0.6.10 h1:eqpJjU+/QX0iIhEo3nhOqMNXL+TyInAs1IAHZCrCM/A=
github.com/milvus-io/pulsar-client-go v0.6.10/go.mod h1:lQqCkgwDF8YFYjKA+zOheTk1tev2B+bKj5j7+nm8M1w=
github.com/minio/highwayhash v1.0.2 h1:Aak5U0nElisjDCfPSG79Tgzkn2gl66NxOMspRrKnA/g=