From 633ea75c2acb8666740feed834945c3e3b4928a4 Mon Sep 17 00:00:00 2001 From: SimFG Date: Mon, 18 Sep 2023 10:50:12 +0800 Subject: [PATCH] Support the replicate message api Signed-off-by: SimFG --- client/client.go | 28 +-- client/client_mock_test.go | 12 +- client/collection.go | 12 +- client/collection_test.go | 8 +- client/data_test.go | 2 +- client/database.go | 10 +- client/database_test.go | 5 +- client/index.go | 9 + client/index_test.go | 4 +- client/insert.go | 9 +- client/mq_message.go | 41 +++++ client/mq_message_test.go | 41 +++++ client/options.go | 23 +++ client/options_msg_base.go | 78 +++++++++ client/partition.go | 20 ++- client/partition_test.go | 8 +- entity/mq_message.go | 5 + go.sum | 2 - mocks/MilvusServiceServer.go | 320 +++++++++++++++++------------------ 19 files changed, 439 insertions(+), 198 deletions(-) create mode 100644 client/mq_message.go create mode 100644 client/mq_message_test.go create mode 100644 client/options_msg_base.go create mode 100644 entity/mq_message.go diff --git a/client/client.go b/client/client.go index 5f066b02..ed2bacfe 100644 --- a/client/client.go +++ b/client/client.go @@ -18,6 +18,8 @@ import ( "google.golang.org/grpc" + "github.com/milvus-io/milvus-proto/go-api/v2/msgpb" + "github.com/milvus-io/milvus-sdk-go/v2/entity" ) @@ -38,9 +40,9 @@ type Client interface { // ListDatabases list all database in milvus cluster. ListDatabases(ctx context.Context) ([]entity.Database, error) // CreateDatabase create database with the given name. - CreateDatabase(ctx context.Context, dbName string) error + CreateDatabase(ctx context.Context, dbName string, opts ...CreateDatabaseOption) error // DropDatabase drop database with the given db name. - DropDatabase(ctx context.Context, dbName string) error + DropDatabase(ctx context.Context, dbName string, opts ...DropDatabaseOption) error // -- collection -- @@ -53,13 +55,13 @@ type Client interface { // DescribeCollection describe collection meta DescribeCollection(ctx context.Context, collName string) (*entity.Collection, error) // DropCollection drop the specified collection - DropCollection(ctx context.Context, collName string) error + DropCollection(ctx context.Context, collName string, opts ...DropCollectionOption) error // GetCollectionStatistics get collection statistics GetCollectionStatistics(ctx context.Context, collName string) (map[string]string, error) // LoadCollection load collection into memory LoadCollection(ctx context.Context, collName string, async bool, opts ...LoadCollectionOption) error // ReleaseCollection release loaded collection - ReleaseCollection(ctx context.Context, collName string) error + ReleaseCollection(ctx context.Context, collName string, opts ...ReleaseCollectionOption) error // HasCollection check whether collection exists HasCollection(ctx context.Context, collName string) (bool, error) // RenameCollection performs renaming for provided collection. @@ -91,17 +93,17 @@ type Client interface { // -- partition -- // CreatePartition create partition for collection - CreatePartition(ctx context.Context, collName string, partitionName string) error + CreatePartition(ctx context.Context, collName string, partitionName string, opts ...CreatePartitionOption) error // DropPartition drop partition from collection - DropPartition(ctx context.Context, collName string, partitionName string) error + DropPartition(ctx context.Context, collName string, partitionName string, opts ...DropPartitionOption) error // ShowPartitions list all partitions from collection ShowPartitions(ctx context.Context, collName string) ([]*entity.Partition, error) // HasPartition check whether partition exists in collection HasPartition(ctx context.Context, collName string, partitionName string) (bool, error) // LoadPartitions load partitions into memory - LoadPartitions(ctx context.Context, collName string, partitionNames []string, async bool) error + LoadPartitions(ctx context.Context, collName string, partitionNames []string, async bool, opts ...LoadPartitionsOption) error // ReleasePartitions release partitions - ReleasePartitions(ctx context.Context, collName string, partitionNames []string) error + ReleasePartitions(ctx context.Context, collName string, partitionNames []string, opts ...ReleasePartitionsOption) error // -- segment -- GetPersistentSegmentInfo(ctx context.Context, collName string) ([]*entity.Segment, error) @@ -124,10 +126,10 @@ type Client interface { // Insert column-based data into collection, returns id column values Insert(ctx context.Context, collName string, partitionName string, columns ...entity.Column) (entity.Column, error) // Flush collection, specified - Flush(ctx context.Context, collName string, async bool) error + Flush(ctx context.Context, collName string, async bool, opts ...FlushOption) error // FlushV2 flush collection, specified, return newly sealed segmentIds, all flushed segmentIds of the collection, seal time and error // currently it is only used in milvus-backup(https://github.com/zilliztech/milvus-backup) - FlushV2(ctx context.Context, collName string, async bool) ([]int64, []int64, int64, error) + FlushV2(ctx context.Context, collName string, async bool, opts ...FlushOption) ([]int64, []int64, int64, error) // DeleteByPks deletes entries related to provided primary keys DeleteByPks(ctx context.Context, collName string, partitionName string, ids entity.Column) error // Delete deletes entries match expression @@ -211,6 +213,12 @@ type Client interface { GetVersion(ctx context.Context) (string, error) // CheckHealth returns milvus state CheckHealth(ctx context.Context) (*entity.MilvusState, error) + + ReplicateMessage(ctx context.Context, + channelName string, beginTs, endTs uint64, + msgsBytes [][]byte, startPositions, endPositions []*msgpb.MsgPosition, + opts ...ReplicateMessageOption, + ) (*entity.MessageInfo, error) } // NewClient create a client connected to remote milvus cluster. diff --git a/client/client_mock_test.go b/client/client_mock_test.go index cb0c1bda..2c06e5b1 100644 --- a/client/client_mock_test.go +++ b/client/client_mock_test.go @@ -300,6 +300,8 @@ const ( MListDatabase ServiceMethod = 1000 MCreateDatabase ServiceMethod = 1001 MDropDatabase ServiceMethod = 1002 + + MReplicateMessage ServiceMethod = 1100 ) // injection function definition @@ -924,8 +926,14 @@ func (m *MockServer) AllocTimestamp(_ context.Context, _ *milvuspb.AllocTimestam panic("not implemented") } -func (m *MockServer) ReplicateMessage(_ context.Context, _ *milvuspb.ReplicateMessageRequest) (*milvuspb.ReplicateMessageResponse, error) { - panic("not implemented") +func (m *MockServer) ReplicateMessage(ctx context.Context, req *milvuspb.ReplicateMessageRequest) (*milvuspb.ReplicateMessageResponse, error) { + f := m.GetInjection(MReplicateMessage) + if f != nil { + r, err := f(ctx, req) + return r.(*milvuspb.ReplicateMessageResponse), err + } + s, err := SuccessStatus() + return &milvuspb.ReplicateMessageResponse{Status: s}, err } func (m *MockServer) Connect(_ context.Context, _ *milvuspb.ConnectRequest) (*milvuspb.ConnectResponse, error) { diff --git a/client/collection.go b/client/collection.go index f954f32d..e0fbcb8a 100644 --- a/client/collection.go +++ b/client/collection.go @@ -18,6 +18,7 @@ import ( "github.com/cockroachdb/errors" "github.com/golang/protobuf/proto" + "github.com/milvus-io/milvus-sdk-go/v2/entity" "github.com/milvus-io/milvus-proto/go-api/v2/commonpb" @@ -151,6 +152,7 @@ func (c *GrpcClient) requestCreateCollection(ctx context.Context, sch *entity.Sc } req := &milvuspb.CreateCollectionRequest{ + Base: opt.MsgBase, DbName: "", // reserved fields, not used for now CollectionName: sch.CollectionName, Schema: bs, @@ -279,7 +281,7 @@ func (c *GrpcClient) DescribeCollection(ctx context.Context, collName string) (* } // DropCollection drop collection by name -func (c *GrpcClient) DropCollection(ctx context.Context, collName string) error { +func (c *GrpcClient) DropCollection(ctx context.Context, collName string, opts ...DropCollectionOption) error { if c.Service == nil { return ErrClientNotReady } @@ -290,6 +292,9 @@ func (c *GrpcClient) DropCollection(ctx context.Context, collName string) error req := &milvuspb.DropCollectionRequest{ CollectionName: collName, } + for _, opt := range opts { + opt(req) + } resp, err := c.Service.DropCollection(ctx, req) if err != nil { return err @@ -447,7 +452,7 @@ func (c *GrpcClient) LoadCollection(ctx context.Context, collName string, async } // ReleaseCollection release loaded collection -func (c *GrpcClient) ReleaseCollection(ctx context.Context, collName string) error { +func (c *GrpcClient) ReleaseCollection(ctx context.Context, collName string, opts ...ReleaseCollectionOption) error { if c.Service == nil { return ErrClientNotReady } @@ -459,6 +464,9 @@ func (c *GrpcClient) ReleaseCollection(ctx context.Context, collName string) err DbName: "", // reserved CollectionName: collName, } + for _, opt := range opts { + opt(req) + } resp, err := c.Service.ReleaseCollection(ctx, req) if err != nil { return err diff --git a/client/collection_test.go b/client/collection_test.go index e7378e32..fc144b35 100644 --- a/client/collection_test.go +++ b/client/collection_test.go @@ -126,7 +126,7 @@ func (s *CollectionSuite) TestCreateCollection() { Return(&commonpb.Status{ErrorCode: commonpb.ErrorCode_Success}, nil) s.mock.EXPECT().HasCollection(mock.Anything, &milvuspb.HasCollectionRequest{CollectionName: testCollectionName}).Return(&milvuspb.BoolResponse{Status: &commonpb.Status{}, Value: false}, nil) - err := c.CreateCollection(ctx, ds, shardsNum) + err := c.CreateCollection(ctx, ds, shardsNum, WithCreateCollectionMsgBase(&commonpb.MsgBase{})) s.NoError(err) }) @@ -514,7 +514,7 @@ func (s *CollectionSuite) TestLoadCollection() { s.mock.EXPECT().LoadCollection(mock.Anything, mock.Anything).Return(&commonpb.Status{ErrorCode: commonpb.ErrorCode_Success}, nil) - err := c.LoadCollection(ctx, testCollectionName, true) + err := c.LoadCollection(ctx, testCollectionName, true, WithLoadCollectionMsgBase(&commonpb.MsgBase{})) s.NoError(err) }) @@ -663,7 +663,7 @@ func TestGrpcClientDropCollection(t *testing.T) { }) t.Run("Test Normal drop", func(t *testing.T) { - assert.Nil(t, c.DropCollection(ctx, testCollectionName)) + assert.Nil(t, c.DropCollection(ctx, testCollectionName, WithDropCollectionMsgBase(&commonpb.MsgBase{}))) }) t.Run("Test drop non-existing collection", func(t *testing.T) { @@ -685,7 +685,7 @@ func TestReleaseCollection(t *testing.T) { return SuccessStatus() }) - c.ReleaseCollection(ctx, testCollectionName) + c.ReleaseCollection(ctx, testCollectionName, WithReleaseCollectionMsgBase(&commonpb.MsgBase{})) } func TestGrpcClientHasCollection(t *testing.T) { diff --git a/client/data_test.go b/client/data_test.go index 3af0ed4e..8e2748d6 100644 --- a/client/data_test.go +++ b/client/data_test.go @@ -36,7 +36,7 @@ func TestGrpcClientFlush(t *testing.T) { c := testClient(ctx, t) t.Run("test async flush", func(t *testing.T) { - assert.Nil(t, c.Flush(ctx, testCollectionName, true)) + assert.Nil(t, c.Flush(ctx, testCollectionName, true, WithFlushMsgBase(&commonpb.MsgBase{}))) }) t.Run("test sync flush", func(t *testing.T) { diff --git a/client/database.go b/client/database.go index 567987ca..a52952ce 100644 --- a/client/database.go +++ b/client/database.go @@ -40,7 +40,7 @@ func (c *GrpcClient) UsingDatabase(ctx context.Context, dbName string) error { // CreateDatabase creates a new database for remote Milvus cluster. // TODO:New options can be added as expanding parameters. -func (c *GrpcClient) CreateDatabase(ctx context.Context, dbName string) error { +func (c *GrpcClient) CreateDatabase(ctx context.Context, dbName string, opts ...CreateDatabaseOption) error { if c.Service == nil { return ErrClientNotReady } @@ -50,6 +50,9 @@ func (c *GrpcClient) CreateDatabase(ctx context.Context, dbName string) error { req := &milvuspb.CreateDatabaseRequest{ DbName: dbName, } + for _, opt := range opts { + opt(req) + } resp, err := c.Service.CreateDatabase(ctx, req) if err != nil { return err @@ -84,7 +87,7 @@ func (c *GrpcClient) ListDatabases(ctx context.Context) ([]entity.Database, erro } // DropDatabase drop all database in milvus cluster. -func (c *GrpcClient) DropDatabase(ctx context.Context, dbName string) error { +func (c *GrpcClient) DropDatabase(ctx context.Context, dbName string, opts ...DropDatabaseOption) error { if c.Service == nil { return ErrClientNotReady } @@ -95,6 +98,9 @@ func (c *GrpcClient) DropDatabase(ctx context.Context, dbName string) error { req := &milvuspb.DropDatabaseRequest{ DbName: dbName, } + for _, opt := range opts { + opt(req) + } resp, err := c.Service.DropDatabase(ctx, req) if err != nil { return err diff --git a/client/database_test.go b/client/database_test.go index 24ed4b3a..a42390c0 100644 --- a/client/database_test.go +++ b/client/database_test.go @@ -7,6 +7,7 @@ import ( "github.com/go-faker/faker/v4" "github.com/go-faker/faker/v4/pkg/options" "github.com/golang/protobuf/proto" + "github.com/milvus-io/milvus-proto/go-api/v2/commonpb" "github.com/milvus-io/milvus-proto/go-api/v2/milvuspb" "github.com/stretchr/testify/assert" ) @@ -45,7 +46,7 @@ func TestGrpcClientCreateDatabase(t *testing.T) { mockServer.SetInjection(MCreateDatabase, func(ctx context.Context, m proto.Message) (proto.Message, error) { return SuccessStatus() }) - err := c.CreateDatabase(ctx, "a") + err := c.CreateDatabase(ctx, "a", WithCreateDatabaseMsgBase(&commonpb.MsgBase{})) assert.Nil(t, err) } @@ -55,6 +56,6 @@ func TestGrpcClientDropDatabase(t *testing.T) { mockServer.SetInjection(MDropDatabase, func(ctx context.Context, m proto.Message) (proto.Message, error) { return SuccessStatus() }) - err := c.DropDatabase(ctx, "a") + err := c.DropDatabase(ctx, "a", WithDropDatabaseMsgBase(&commonpb.MsgBase{})) assert.Nil(t, err) } diff --git a/client/index.go b/client/index.go index 6b717136..e6bbe658 100644 --- a/client/index.go +++ b/client/index.go @@ -58,6 +58,7 @@ type indexDef struct { name string fieldName string collectionName string + MsgBase *commonpb.MsgBase } // IndexOption is the predefined function to alter index def. @@ -71,6 +72,12 @@ func WithIndexName(name string) IndexOption { } } +func WithIndexMsgBase(msgBase *commonpb.MsgBase) IndexOption { + return func(def *indexDef) { + def.MsgBase = msgBase + } +} + func getIndexDef(opts ...IndexOption) indexDef { idxDef := indexDef{} for _, opt := range opts { @@ -93,6 +100,7 @@ func (c *GrpcClient) CreateIndex(ctx context.Context, collName string, fieldName idxDef := getIndexDef(opts...) req := &milvuspb.CreateIndexRequest{ + Base: idxDef.MsgBase, DbName: "", // reserved CollectionName: collName, FieldName: fieldName, @@ -167,6 +175,7 @@ func (c *GrpcClient) DropIndex(ctx context.Context, collName string, fieldName s idxDef := getIndexDef(opts...) req := &milvuspb.DropIndexRequest{ + Base: idxDef.MsgBase, DbName: "", //reserved, CollectionName: collName, FieldName: fieldName, diff --git a/client/index_test.go b/client/index_test.go index f1ca827f..323ef7c6 100644 --- a/client/index_test.go +++ b/client/index_test.go @@ -38,7 +38,7 @@ func TestGrpcClientCreateIndex(t *testing.T) { }) t.Run("test async create index", func(t *testing.T) { - assert.Nil(t, c.CreateIndex(ctx, testCollectionName, fieldName, idx, true)) + assert.Nil(t, c.CreateIndex(ctx, testCollectionName, fieldName, idx, true, WithIndexMsgBase(&commonpb.MsgBase{}))) }) t.Run("test sync create index", func(t *testing.T) { @@ -85,7 +85,7 @@ func TestGrpcClientDropIndex(t *testing.T) { c := testClient(ctx, t) mockServer.SetInjection(MHasCollection, hasCollectionDefault) mockServer.SetInjection(MDescribeCollection, describeCollectionInjection(t, 0, testCollectionName, defaultSchema())) - assert.Nil(t, c.DropIndex(ctx, testCollectionName, "vector")) + assert.Nil(t, c.DropIndex(ctx, testCollectionName, "vector", WithIndexMsgBase(&commonpb.MsgBase{}))) } func TestGrpcClientDescribeIndex(t *testing.T) { diff --git a/client/insert.go b/client/insert.go index 91b7c0ff..fe24db40 100644 --- a/client/insert.go +++ b/client/insert.go @@ -190,14 +190,14 @@ func (c *GrpcClient) mergeDynamicColumns(dynamicName string, rowSize int, column // Flush force collection to flush memory records into storage // in sync mode, flush will wait all segments to be flushed -func (c *GrpcClient) Flush(ctx context.Context, collName string, async bool) error { - _, _, _, err := c.FlushV2(ctx, collName, async) +func (c *GrpcClient) Flush(ctx context.Context, collName string, async bool, opts ...FlushOption) error { + _, _, _, err := c.FlushV2(ctx, collName, async, opts...) return err } // Flush force collection to flush memory records into storage // in sync mode, flush will wait all segments to be flushed -func (c *GrpcClient) FlushV2(ctx context.Context, collName string, async bool) ([]int64, []int64, int64, error) { +func (c *GrpcClient) FlushV2(ctx context.Context, collName string, async bool, opts ...FlushOption) ([]int64, []int64, int64, error) { if c.Service == nil { return nil, nil, 0, ErrClientNotReady } @@ -208,6 +208,9 @@ func (c *GrpcClient) FlushV2(ctx context.Context, collName string, async bool) ( DbName: "", // reserved, CollectionNames: []string{collName}, } + for _, opt := range opts { + opt(req) + } resp, err := c.Service.Flush(ctx, req) if err != nil { return nil, nil, 0, err diff --git a/client/mq_message.go b/client/mq_message.go new file mode 100644 index 00000000..da645a19 --- /dev/null +++ b/client/mq_message.go @@ -0,0 +1,41 @@ +package client + +import ( + "context" + + "github.com/milvus-io/milvus-proto/go-api/v2/milvuspb" + "github.com/milvus-io/milvus-proto/go-api/v2/msgpb" + "github.com/milvus-io/milvus-sdk-go/v2/entity" +) + +func (c *GrpcClient) ReplicateMessage(ctx context.Context, + channelName string, beginTs, endTs uint64, + msgsBytes [][]byte, startPositions, endPositions []*msgpb.MsgPosition, + opts ...ReplicateMessageOption) (*entity.MessageInfo, error) { + + if c.Service == nil { + return nil, ErrClientNotReady + } + req := &milvuspb.ReplicateMessageRequest{ + ChannelName: channelName, + BeginTs: beginTs, + EndTs: endTs, + Msgs: msgsBytes, + StartPositions: startPositions, + EndPositions: endPositions, + } + for _, opt := range opts { + opt(req) + } + resp, err := c.Service.ReplicateMessage(ctx, req) + if err != nil { + return nil, err + } + err = handleRespStatus(resp.GetStatus()) + if err != nil { + return nil, err + } + return &entity.MessageInfo{ + Position: resp.GetPosition(), + }, nil +} diff --git a/client/mq_message_test.go b/client/mq_message_test.go new file mode 100644 index 00000000..d5cc5c75 --- /dev/null +++ b/client/mq_message_test.go @@ -0,0 +1,41 @@ +package client + +import ( + "context" + "testing" + + "github.com/golang/protobuf/proto" + "github.com/milvus-io/milvus-proto/go-api/v2/commonpb" + "github.com/milvus-io/milvus-proto/go-api/v2/milvuspb" + "github.com/stretchr/testify/assert" +) + +func TestGrpcClientReplicateMessage(t *testing.T) { + { + ctx := context.Background() + c := testClient(ctx, t) + mockServer.SetInjection(MReplicateMessage, func(ctx context.Context, m proto.Message) (proto.Message, error) { + return &milvuspb.ReplicateMessageResponse{ + Status: &commonpb.Status{ErrorCode: commonpb.ErrorCode_Success}, + Position: "hello", + }, nil + }) + resp, err := c.ReplicateMessage(ctx, "ch1", 1000, 1001, + nil, nil, nil, WithReplicateMessageMsgBase(&commonpb.MsgBase{})) + assert.Nil(t, err) + assert.Equal(t, "hello", resp.Position) + } + + { + ctx := context.Background() + c := testClient(ctx, t) + mockServer.SetInjection(MReplicateMessage, func(ctx context.Context, m proto.Message) (proto.Message, error) { + return &milvuspb.ReplicateMessageResponse{ + Status: &commonpb.Status{ErrorCode: commonpb.ErrorCode_UnexpectedError}, + }, nil + }) + _, err := c.ReplicateMessage(ctx, "ch1", 1000, 1001, + nil, nil, nil, WithReplicateMessageMsgBase(&commonpb.MsgBase{})) + assert.NotNil(t, err) + } +} diff --git a/client/options.go b/client/options.go index 14875c3e..3146cb79 100644 --- a/client/options.go +++ b/client/options.go @@ -16,6 +16,8 @@ import ( "github.com/cockroachdb/errors" + "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-sdk-go/v2/entity" ) @@ -34,6 +36,7 @@ type createCollOpt struct { AutoID bool EnableDynamicSchema bool Properties map[string]string + MsgBase *commonpb.MsgBase } func WithPKFieldName(name string) CreateCollectionOption { @@ -262,3 +265,23 @@ func GetWithOutputFields(outputFields ...string) GetOption { o.outputFields = outputFields } } + +type DropCollectionOption func(*milvuspb.DropCollectionRequest) + +type ReleaseCollectionOption func(*milvuspb.ReleaseCollectionRequest) + +type FlushOption func(*milvuspb.FlushRequest) + +type CreateDatabaseOption func(*milvuspb.CreateDatabaseRequest) + +type DropDatabaseOption func(*milvuspb.DropDatabaseRequest) + +type ReplicateMessageOption func(*milvuspb.ReplicateMessageRequest) + +type CreatePartitionOption func(*milvuspb.CreatePartitionRequest) + +type DropPartitionOption func(*milvuspb.DropPartitionRequest) + +type LoadPartitionsOption func(*milvuspb.LoadPartitionsRequest) + +type ReleasePartitionsOption func(*milvuspb.ReleasePartitionsRequest) diff --git a/client/options_msg_base.go b/client/options_msg_base.go new file mode 100644 index 00000000..a8c6013f --- /dev/null +++ b/client/options_msg_base.go @@ -0,0 +1,78 @@ +package client + +import ( + "github.com/milvus-io/milvus-proto/go-api/v2/commonpb" + "github.com/milvus-io/milvus-proto/go-api/v2/milvuspb" +) + +func WithCreateCollectionMsgBase(msgBase *commonpb.MsgBase) CreateCollectionOption { + return func(opt *createCollOpt) { + opt.MsgBase = msgBase + } +} + +func WithDropCollectionMsgBase(msgBase *commonpb.MsgBase) DropCollectionOption { + return func(req *milvuspb.DropCollectionRequest) { + req.Base = msgBase + } +} + +func WithLoadCollectionMsgBase(msgBase *commonpb.MsgBase) LoadCollectionOption { + return func(req *milvuspb.LoadCollectionRequest) { + req.Base = msgBase + } +} + +func WithReleaseCollectionMsgBase(msgBase *commonpb.MsgBase) ReleaseCollectionOption { + return func(req *milvuspb.ReleaseCollectionRequest) { + req.Base = msgBase + } +} + +func WithFlushMsgBase(msgBase *commonpb.MsgBase) FlushOption { + return func(req *milvuspb.FlushRequest) { + req.Base = msgBase + } +} + +func WithCreateDatabaseMsgBase(msgBase *commonpb.MsgBase) CreateDatabaseOption { + return func(req *milvuspb.CreateDatabaseRequest) { + req.Base = msgBase + } +} + +func WithDropDatabaseMsgBase(msgBase *commonpb.MsgBase) DropDatabaseOption { + return func(req *milvuspb.DropDatabaseRequest) { + req.Base = msgBase + } +} + +func WithReplicateMessageMsgBase(msgBase *commonpb.MsgBase) ReplicateMessageOption { + return func(req *milvuspb.ReplicateMessageRequest) { + req.Base = msgBase + } +} + +func WithCreatePartitionMsgBase(msgBase *commonpb.MsgBase) CreatePartitionOption { + return func(req *milvuspb.CreatePartitionRequest) { + req.Base = msgBase + } +} + +func WithDropPartitionMsgBase(msgBase *commonpb.MsgBase) DropPartitionOption { + return func(req *milvuspb.DropPartitionRequest) { + req.Base = msgBase + } +} + +func WithLoadPartitionsMsgBase(msgBase *commonpb.MsgBase) LoadPartitionsOption { + return func(req *milvuspb.LoadPartitionsRequest) { + req.Base = msgBase + } +} + +func WithReleasePartitionMsgBase(msgBase *commonpb.MsgBase) ReleasePartitionsOption { + return func(req *milvuspb.ReleasePartitionsRequest) { + req.Base = msgBase + } +} diff --git a/client/partition.go b/client/partition.go index 0d99ab03..d0f95ac2 100644 --- a/client/partition.go +++ b/client/partition.go @@ -24,7 +24,7 @@ import ( ) // CreatePartition create partition for collection -func (c *GrpcClient) CreatePartition(ctx context.Context, collName string, partitionName string) error { +func (c *GrpcClient) CreatePartition(ctx context.Context, collName string, partitionName string, opts ...CreatePartitionOption) error { if c.Service == nil { return ErrClientNotReady } @@ -44,6 +44,9 @@ func (c *GrpcClient) CreatePartition(ctx context.Context, collName string, parti CollectionName: collName, PartitionName: partitionName, } + for _, opt := range opts { + opt(req) + } resp, err := c.Service.CreatePartition(ctx, req) if err != nil { return err @@ -63,7 +66,7 @@ func (c *GrpcClient) checkPartitionExists(ctx context.Context, collName string, } // DropPartition drop partition from collection -func (c *GrpcClient) DropPartition(ctx context.Context, collName string, partitionName string) error { +func (c *GrpcClient) DropPartition(ctx context.Context, collName string, partitionName string, opts ...DropPartitionOption) error { if c.Service == nil { return ErrClientNotReady } @@ -78,6 +81,9 @@ func (c *GrpcClient) DropPartition(ctx context.Context, collName string, partiti CollectionName: collName, PartitionName: partitionName, } + for _, opt := range opts { + opt(req) + } resp, err := c.Service.DropPartition(ctx, req) if err != nil { return err @@ -137,7 +143,7 @@ func (c *GrpcClient) ShowPartitions(ctx context.Context, collName string) ([]*en } // LoadPartitions load collection paritions into memory -func (c *GrpcClient) LoadPartitions(ctx context.Context, collName string, partitionNames []string, async bool) error { +func (c *GrpcClient) LoadPartitions(ctx context.Context, collName string, partitionNames []string, async bool, opts ...LoadPartitionsOption) error { if c.Service == nil { return ErrClientNotReady } @@ -155,6 +161,9 @@ func (c *GrpcClient) LoadPartitions(ctx context.Context, collName string, partit CollectionName: collName, PartitionNames: partitionNames, } + for _, opt := range opts { + opt(req) + } resp, err := c.Service.LoadPartitions(ctx, req) if err != nil { return err @@ -187,7 +196,7 @@ func (c *GrpcClient) LoadPartitions(ctx context.Context, collName string, partit } // ReleasePartitions release partitions -func (c *GrpcClient) ReleasePartitions(ctx context.Context, collName string, partitionNames []string) error { +func (c *GrpcClient) ReleasePartitions(ctx context.Context, collName string, partitionNames []string, opts ...ReleasePartitionsOption) error { if c.Service == nil { return ErrClientNotReady } @@ -204,6 +213,9 @@ func (c *GrpcClient) ReleasePartitions(ctx context.Context, collName string, par CollectionName: collName, PartitionNames: partitionNames, } + for _, opt := range opts { + opt(req) + } resp, err := c.Service.ReleasePartitions(ctx, req) if err != nil { return err diff --git a/client/partition_test.go b/client/partition_test.go index 1fe78378..685472b2 100644 --- a/client/partition_test.go +++ b/client/partition_test.go @@ -68,7 +68,7 @@ func TestGrpcClientCreatePartition(t *testing.T) { return resp, err }) - assert.Nil(t, c.CreatePartition(ctx, testCollectionName, partitionName)) + assert.Nil(t, c.CreatePartition(ctx, testCollectionName, partitionName, WithCreatePartitionMsgBase(&commonpb.MsgBase{}))) } func TestGrpcClientDropPartition(t *testing.T) { @@ -77,7 +77,7 @@ func TestGrpcClientDropPartition(t *testing.T) { c := testClient(ctx, t) mockServer.SetInjection(MHasCollection, hasCollectionDefault) mockServer.SetInjection(MHasPartition, hasPartitionInjection(t, testCollectionName, true, partitionName)) // injection has assertion of collName & parition name - assert.Nil(t, c.DropPartition(ctx, testCollectionName, partitionName)) + assert.Nil(t, c.DropPartition(ctx, testCollectionName, partitionName, WithDropPartitionMsgBase(&commonpb.MsgBase{}))) } func TestGrpcClientHasPartition(t *testing.T) { @@ -188,7 +188,7 @@ func TestGrpcClientReleasePartitions(t *testing.T) { }) defer mockServer.SetInjection(MHasPartition, hasPartitionInjection(t, testCollectionName, false, "testPart")) - assert.Nil(t, c.ReleasePartitions(ctx, testCollectionName, parts)) + assert.Nil(t, c.ReleasePartitions(ctx, testCollectionName, parts, WithReleasePartitionMsgBase(&commonpb.MsgBase{}))) } func TestGrpcShowPartitions(t *testing.T) { @@ -277,7 +277,7 @@ func (s *PartitionSuite) TestLoadPartitions() { s.ElementsMatch(partNames, req.GetPartitionNames()) }).Return(&commonpb.Status{ErrorCode: commonpb.ErrorCode_Success}, nil) - err := c.LoadPartitions(ctx, testCollectionName, partNames, true) + err := c.LoadPartitions(ctx, testCollectionName, partNames, true, WithLoadPartitionsMsgBase(&commonpb.MsgBase{})) s.NoError(err) }) diff --git a/entity/mq_message.go b/entity/mq_message.go new file mode 100644 index 00000000..98013a3f --- /dev/null +++ b/entity/mq_message.go @@ -0,0 +1,5 @@ +package entity + +type MessageInfo struct { + Position string +} diff --git a/go.sum b/go.sum index 1ff670a9..33a249c2 100644 --- a/go.sum +++ b/go.sum @@ -157,8 +157,6 @@ github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27k github.com/mattn/goveralls v0.0.2/go.mod h1:8d1ZMHsd7fW6IRPKQh46F2WRpyib5/X4FOpevwGNQEw= 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/milvus-io/milvus-proto/go-api/v2 v2.3.1 h1:4qD1QJN6jDdote1UAZbEQoxKcH399oVod1GtiBYWQtQ= -github.com/milvus-io/milvus-proto/go-api/v2 v2.3.1/go.mod h1:1OIl0v5PQeNxIJhCvY+K55CBUOYDZevw9g9380u1Wek= github.com/milvus-io/milvus-proto/go-api/v2 v2.3.2 h1:tBcKiEUcX6i3MaFYvMJO1F7R6fIoeLFkg1kSGE1Tvpk= github.com/milvus-io/milvus-proto/go-api/v2 v2.3.2/go.mod h1:1OIl0v5PQeNxIJhCvY+K55CBUOYDZevw9g9380u1Wek= github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= diff --git a/mocks/MilvusServiceServer.go b/mocks/MilvusServiceServer.go index f7b887a8..c14a7bb5 100644 --- a/mocks/MilvusServiceServer.go +++ b/mocks/MilvusServiceServer.go @@ -59,8 +59,8 @@ type MilvusServiceServer_AllocTimestamp_Call struct { } // AllocTimestamp is a helper method to define mock.On call -// - _a0 context.Context -// - _a1 *milvuspb.AllocTimestampRequest +// - _a0 context.Context +// - _a1 *milvuspb.AllocTimestampRequest func (_e *MilvusServiceServer_Expecter) AllocTimestamp(_a0 interface{}, _a1 interface{}) *MilvusServiceServer_AllocTimestamp_Call { return &MilvusServiceServer_AllocTimestamp_Call{Call: _e.mock.On("AllocTimestamp", _a0, _a1)} } @@ -114,8 +114,8 @@ type MilvusServiceServer_AlterAlias_Call struct { } // AlterAlias is a helper method to define mock.On call -// - _a0 context.Context -// - _a1 *milvuspb.AlterAliasRequest +// - _a0 context.Context +// - _a1 *milvuspb.AlterAliasRequest func (_e *MilvusServiceServer_Expecter) AlterAlias(_a0 interface{}, _a1 interface{}) *MilvusServiceServer_AlterAlias_Call { return &MilvusServiceServer_AlterAlias_Call{Call: _e.mock.On("AlterAlias", _a0, _a1)} } @@ -169,8 +169,8 @@ type MilvusServiceServer_AlterCollection_Call struct { } // AlterCollection is a helper method to define mock.On call -// - _a0 context.Context -// - _a1 *milvuspb.AlterCollectionRequest +// - _a0 context.Context +// - _a1 *milvuspb.AlterCollectionRequest func (_e *MilvusServiceServer_Expecter) AlterCollection(_a0 interface{}, _a1 interface{}) *MilvusServiceServer_AlterCollection_Call { return &MilvusServiceServer_AlterCollection_Call{Call: _e.mock.On("AlterCollection", _a0, _a1)} } @@ -224,8 +224,8 @@ type MilvusServiceServer_CalcDistance_Call struct { } // CalcDistance is a helper method to define mock.On call -// - _a0 context.Context -// - _a1 *milvuspb.CalcDistanceRequest +// - _a0 context.Context +// - _a1 *milvuspb.CalcDistanceRequest func (_e *MilvusServiceServer_Expecter) CalcDistance(_a0 interface{}, _a1 interface{}) *MilvusServiceServer_CalcDistance_Call { return &MilvusServiceServer_CalcDistance_Call{Call: _e.mock.On("CalcDistance", _a0, _a1)} } @@ -279,8 +279,8 @@ type MilvusServiceServer_CheckHealth_Call struct { } // CheckHealth is a helper method to define mock.On call -// - _a0 context.Context -// - _a1 *milvuspb.CheckHealthRequest +// - _a0 context.Context +// - _a1 *milvuspb.CheckHealthRequest func (_e *MilvusServiceServer_Expecter) CheckHealth(_a0 interface{}, _a1 interface{}) *MilvusServiceServer_CheckHealth_Call { return &MilvusServiceServer_CheckHealth_Call{Call: _e.mock.On("CheckHealth", _a0, _a1)} } @@ -334,8 +334,8 @@ type MilvusServiceServer_Connect_Call struct { } // Connect is a helper method to define mock.On call -// - _a0 context.Context -// - _a1 *milvuspb.ConnectRequest +// - _a0 context.Context +// - _a1 *milvuspb.ConnectRequest func (_e *MilvusServiceServer_Expecter) Connect(_a0 interface{}, _a1 interface{}) *MilvusServiceServer_Connect_Call { return &MilvusServiceServer_Connect_Call{Call: _e.mock.On("Connect", _a0, _a1)} } @@ -389,8 +389,8 @@ type MilvusServiceServer_CreateAlias_Call struct { } // CreateAlias is a helper method to define mock.On call -// - _a0 context.Context -// - _a1 *milvuspb.CreateAliasRequest +// - _a0 context.Context +// - _a1 *milvuspb.CreateAliasRequest func (_e *MilvusServiceServer_Expecter) CreateAlias(_a0 interface{}, _a1 interface{}) *MilvusServiceServer_CreateAlias_Call { return &MilvusServiceServer_CreateAlias_Call{Call: _e.mock.On("CreateAlias", _a0, _a1)} } @@ -444,8 +444,8 @@ type MilvusServiceServer_CreateCollection_Call struct { } // CreateCollection is a helper method to define mock.On call -// - _a0 context.Context -// - _a1 *milvuspb.CreateCollectionRequest +// - _a0 context.Context +// - _a1 *milvuspb.CreateCollectionRequest func (_e *MilvusServiceServer_Expecter) CreateCollection(_a0 interface{}, _a1 interface{}) *MilvusServiceServer_CreateCollection_Call { return &MilvusServiceServer_CreateCollection_Call{Call: _e.mock.On("CreateCollection", _a0, _a1)} } @@ -499,8 +499,8 @@ type MilvusServiceServer_CreateCredential_Call struct { } // CreateCredential is a helper method to define mock.On call -// - _a0 context.Context -// - _a1 *milvuspb.CreateCredentialRequest +// - _a0 context.Context +// - _a1 *milvuspb.CreateCredentialRequest func (_e *MilvusServiceServer_Expecter) CreateCredential(_a0 interface{}, _a1 interface{}) *MilvusServiceServer_CreateCredential_Call { return &MilvusServiceServer_CreateCredential_Call{Call: _e.mock.On("CreateCredential", _a0, _a1)} } @@ -554,8 +554,8 @@ type MilvusServiceServer_CreateDatabase_Call struct { } // CreateDatabase is a helper method to define mock.On call -// - _a0 context.Context -// - _a1 *milvuspb.CreateDatabaseRequest +// - _a0 context.Context +// - _a1 *milvuspb.CreateDatabaseRequest func (_e *MilvusServiceServer_Expecter) CreateDatabase(_a0 interface{}, _a1 interface{}) *MilvusServiceServer_CreateDatabase_Call { return &MilvusServiceServer_CreateDatabase_Call{Call: _e.mock.On("CreateDatabase", _a0, _a1)} } @@ -609,8 +609,8 @@ type MilvusServiceServer_CreateIndex_Call struct { } // CreateIndex is a helper method to define mock.On call -// - _a0 context.Context -// - _a1 *milvuspb.CreateIndexRequest +// - _a0 context.Context +// - _a1 *milvuspb.CreateIndexRequest func (_e *MilvusServiceServer_Expecter) CreateIndex(_a0 interface{}, _a1 interface{}) *MilvusServiceServer_CreateIndex_Call { return &MilvusServiceServer_CreateIndex_Call{Call: _e.mock.On("CreateIndex", _a0, _a1)} } @@ -664,8 +664,8 @@ type MilvusServiceServer_CreatePartition_Call struct { } // CreatePartition is a helper method to define mock.On call -// - _a0 context.Context -// - _a1 *milvuspb.CreatePartitionRequest +// - _a0 context.Context +// - _a1 *milvuspb.CreatePartitionRequest func (_e *MilvusServiceServer_Expecter) CreatePartition(_a0 interface{}, _a1 interface{}) *MilvusServiceServer_CreatePartition_Call { return &MilvusServiceServer_CreatePartition_Call{Call: _e.mock.On("CreatePartition", _a0, _a1)} } @@ -719,8 +719,8 @@ type MilvusServiceServer_CreateResourceGroup_Call struct { } // CreateResourceGroup is a helper method to define mock.On call -// - _a0 context.Context -// - _a1 *milvuspb.CreateResourceGroupRequest +// - _a0 context.Context +// - _a1 *milvuspb.CreateResourceGroupRequest func (_e *MilvusServiceServer_Expecter) CreateResourceGroup(_a0 interface{}, _a1 interface{}) *MilvusServiceServer_CreateResourceGroup_Call { return &MilvusServiceServer_CreateResourceGroup_Call{Call: _e.mock.On("CreateResourceGroup", _a0, _a1)} } @@ -774,8 +774,8 @@ type MilvusServiceServer_CreateRole_Call struct { } // CreateRole is a helper method to define mock.On call -// - _a0 context.Context -// - _a1 *milvuspb.CreateRoleRequest +// - _a0 context.Context +// - _a1 *milvuspb.CreateRoleRequest func (_e *MilvusServiceServer_Expecter) CreateRole(_a0 interface{}, _a1 interface{}) *MilvusServiceServer_CreateRole_Call { return &MilvusServiceServer_CreateRole_Call{Call: _e.mock.On("CreateRole", _a0, _a1)} } @@ -829,8 +829,8 @@ type MilvusServiceServer_Delete_Call struct { } // Delete is a helper method to define mock.On call -// - _a0 context.Context -// - _a1 *milvuspb.DeleteRequest +// - _a0 context.Context +// - _a1 *milvuspb.DeleteRequest func (_e *MilvusServiceServer_Expecter) Delete(_a0 interface{}, _a1 interface{}) *MilvusServiceServer_Delete_Call { return &MilvusServiceServer_Delete_Call{Call: _e.mock.On("Delete", _a0, _a1)} } @@ -884,8 +884,8 @@ type MilvusServiceServer_DeleteCredential_Call struct { } // DeleteCredential is a helper method to define mock.On call -// - _a0 context.Context -// - _a1 *milvuspb.DeleteCredentialRequest +// - _a0 context.Context +// - _a1 *milvuspb.DeleteCredentialRequest func (_e *MilvusServiceServer_Expecter) DeleteCredential(_a0 interface{}, _a1 interface{}) *MilvusServiceServer_DeleteCredential_Call { return &MilvusServiceServer_DeleteCredential_Call{Call: _e.mock.On("DeleteCredential", _a0, _a1)} } @@ -939,8 +939,8 @@ type MilvusServiceServer_DescribeAlias_Call struct { } // DescribeAlias is a helper method to define mock.On call -// - _a0 context.Context -// - _a1 *milvuspb.DescribeAliasRequest +// - _a0 context.Context +// - _a1 *milvuspb.DescribeAliasRequest func (_e *MilvusServiceServer_Expecter) DescribeAlias(_a0 interface{}, _a1 interface{}) *MilvusServiceServer_DescribeAlias_Call { return &MilvusServiceServer_DescribeAlias_Call{Call: _e.mock.On("DescribeAlias", _a0, _a1)} } @@ -994,8 +994,8 @@ type MilvusServiceServer_DescribeCollection_Call struct { } // DescribeCollection is a helper method to define mock.On call -// - _a0 context.Context -// - _a1 *milvuspb.DescribeCollectionRequest +// - _a0 context.Context +// - _a1 *milvuspb.DescribeCollectionRequest func (_e *MilvusServiceServer_Expecter) DescribeCollection(_a0 interface{}, _a1 interface{}) *MilvusServiceServer_DescribeCollection_Call { return &MilvusServiceServer_DescribeCollection_Call{Call: _e.mock.On("DescribeCollection", _a0, _a1)} } @@ -1049,8 +1049,8 @@ type MilvusServiceServer_DescribeIndex_Call struct { } // DescribeIndex is a helper method to define mock.On call -// - _a0 context.Context -// - _a1 *milvuspb.DescribeIndexRequest +// - _a0 context.Context +// - _a1 *milvuspb.DescribeIndexRequest func (_e *MilvusServiceServer_Expecter) DescribeIndex(_a0 interface{}, _a1 interface{}) *MilvusServiceServer_DescribeIndex_Call { return &MilvusServiceServer_DescribeIndex_Call{Call: _e.mock.On("DescribeIndex", _a0, _a1)} } @@ -1104,8 +1104,8 @@ type MilvusServiceServer_DescribeResourceGroup_Call struct { } // DescribeResourceGroup is a helper method to define mock.On call -// - _a0 context.Context -// - _a1 *milvuspb.DescribeResourceGroupRequest +// - _a0 context.Context +// - _a1 *milvuspb.DescribeResourceGroupRequest func (_e *MilvusServiceServer_Expecter) DescribeResourceGroup(_a0 interface{}, _a1 interface{}) *MilvusServiceServer_DescribeResourceGroup_Call { return &MilvusServiceServer_DescribeResourceGroup_Call{Call: _e.mock.On("DescribeResourceGroup", _a0, _a1)} } @@ -1159,8 +1159,8 @@ type MilvusServiceServer_DescribeSegmentIndexData_Call struct { } // DescribeSegmentIndexData is a helper method to define mock.On call -// - _a0 context.Context -// - _a1 *federpb.DescribeSegmentIndexDataRequest +// - _a0 context.Context +// - _a1 *federpb.DescribeSegmentIndexDataRequest func (_e *MilvusServiceServer_Expecter) DescribeSegmentIndexData(_a0 interface{}, _a1 interface{}) *MilvusServiceServer_DescribeSegmentIndexData_Call { return &MilvusServiceServer_DescribeSegmentIndexData_Call{Call: _e.mock.On("DescribeSegmentIndexData", _a0, _a1)} } @@ -1214,8 +1214,8 @@ type MilvusServiceServer_DropAlias_Call struct { } // DropAlias is a helper method to define mock.On call -// - _a0 context.Context -// - _a1 *milvuspb.DropAliasRequest +// - _a0 context.Context +// - _a1 *milvuspb.DropAliasRequest func (_e *MilvusServiceServer_Expecter) DropAlias(_a0 interface{}, _a1 interface{}) *MilvusServiceServer_DropAlias_Call { return &MilvusServiceServer_DropAlias_Call{Call: _e.mock.On("DropAlias", _a0, _a1)} } @@ -1269,8 +1269,8 @@ type MilvusServiceServer_DropCollection_Call struct { } // DropCollection is a helper method to define mock.On call -// - _a0 context.Context -// - _a1 *milvuspb.DropCollectionRequest +// - _a0 context.Context +// - _a1 *milvuspb.DropCollectionRequest func (_e *MilvusServiceServer_Expecter) DropCollection(_a0 interface{}, _a1 interface{}) *MilvusServiceServer_DropCollection_Call { return &MilvusServiceServer_DropCollection_Call{Call: _e.mock.On("DropCollection", _a0, _a1)} } @@ -1324,8 +1324,8 @@ type MilvusServiceServer_DropDatabase_Call struct { } // DropDatabase is a helper method to define mock.On call -// - _a0 context.Context -// - _a1 *milvuspb.DropDatabaseRequest +// - _a0 context.Context +// - _a1 *milvuspb.DropDatabaseRequest func (_e *MilvusServiceServer_Expecter) DropDatabase(_a0 interface{}, _a1 interface{}) *MilvusServiceServer_DropDatabase_Call { return &MilvusServiceServer_DropDatabase_Call{Call: _e.mock.On("DropDatabase", _a0, _a1)} } @@ -1379,8 +1379,8 @@ type MilvusServiceServer_DropIndex_Call struct { } // DropIndex is a helper method to define mock.On call -// - _a0 context.Context -// - _a1 *milvuspb.DropIndexRequest +// - _a0 context.Context +// - _a1 *milvuspb.DropIndexRequest func (_e *MilvusServiceServer_Expecter) DropIndex(_a0 interface{}, _a1 interface{}) *MilvusServiceServer_DropIndex_Call { return &MilvusServiceServer_DropIndex_Call{Call: _e.mock.On("DropIndex", _a0, _a1)} } @@ -1434,8 +1434,8 @@ type MilvusServiceServer_DropPartition_Call struct { } // DropPartition is a helper method to define mock.On call -// - _a0 context.Context -// - _a1 *milvuspb.DropPartitionRequest +// - _a0 context.Context +// - _a1 *milvuspb.DropPartitionRequest func (_e *MilvusServiceServer_Expecter) DropPartition(_a0 interface{}, _a1 interface{}) *MilvusServiceServer_DropPartition_Call { return &MilvusServiceServer_DropPartition_Call{Call: _e.mock.On("DropPartition", _a0, _a1)} } @@ -1489,8 +1489,8 @@ type MilvusServiceServer_DropResourceGroup_Call struct { } // DropResourceGroup is a helper method to define mock.On call -// - _a0 context.Context -// - _a1 *milvuspb.DropResourceGroupRequest +// - _a0 context.Context +// - _a1 *milvuspb.DropResourceGroupRequest func (_e *MilvusServiceServer_Expecter) DropResourceGroup(_a0 interface{}, _a1 interface{}) *MilvusServiceServer_DropResourceGroup_Call { return &MilvusServiceServer_DropResourceGroup_Call{Call: _e.mock.On("DropResourceGroup", _a0, _a1)} } @@ -1544,8 +1544,8 @@ type MilvusServiceServer_DropRole_Call struct { } // DropRole is a helper method to define mock.On call -// - _a0 context.Context -// - _a1 *milvuspb.DropRoleRequest +// - _a0 context.Context +// - _a1 *milvuspb.DropRoleRequest func (_e *MilvusServiceServer_Expecter) DropRole(_a0 interface{}, _a1 interface{}) *MilvusServiceServer_DropRole_Call { return &MilvusServiceServer_DropRole_Call{Call: _e.mock.On("DropRole", _a0, _a1)} } @@ -1599,8 +1599,8 @@ type MilvusServiceServer_Dummy_Call struct { } // Dummy is a helper method to define mock.On call -// - _a0 context.Context -// - _a1 *milvuspb.DummyRequest +// - _a0 context.Context +// - _a1 *milvuspb.DummyRequest func (_e *MilvusServiceServer_Expecter) Dummy(_a0 interface{}, _a1 interface{}) *MilvusServiceServer_Dummy_Call { return &MilvusServiceServer_Dummy_Call{Call: _e.mock.On("Dummy", _a0, _a1)} } @@ -1654,8 +1654,8 @@ type MilvusServiceServer_Flush_Call struct { } // Flush is a helper method to define mock.On call -// - _a0 context.Context -// - _a1 *milvuspb.FlushRequest +// - _a0 context.Context +// - _a1 *milvuspb.FlushRequest func (_e *MilvusServiceServer_Expecter) Flush(_a0 interface{}, _a1 interface{}) *MilvusServiceServer_Flush_Call { return &MilvusServiceServer_Flush_Call{Call: _e.mock.On("Flush", _a0, _a1)} } @@ -1709,8 +1709,8 @@ type MilvusServiceServer_FlushAll_Call struct { } // FlushAll is a helper method to define mock.On call -// - _a0 context.Context -// - _a1 *milvuspb.FlushAllRequest +// - _a0 context.Context +// - _a1 *milvuspb.FlushAllRequest func (_e *MilvusServiceServer_Expecter) FlushAll(_a0 interface{}, _a1 interface{}) *MilvusServiceServer_FlushAll_Call { return &MilvusServiceServer_FlushAll_Call{Call: _e.mock.On("FlushAll", _a0, _a1)} } @@ -1764,8 +1764,8 @@ type MilvusServiceServer_GetCollectionStatistics_Call struct { } // GetCollectionStatistics is a helper method to define mock.On call -// - _a0 context.Context -// - _a1 *milvuspb.GetCollectionStatisticsRequest +// - _a0 context.Context +// - _a1 *milvuspb.GetCollectionStatisticsRequest func (_e *MilvusServiceServer_Expecter) GetCollectionStatistics(_a0 interface{}, _a1 interface{}) *MilvusServiceServer_GetCollectionStatistics_Call { return &MilvusServiceServer_GetCollectionStatistics_Call{Call: _e.mock.On("GetCollectionStatistics", _a0, _a1)} } @@ -1819,8 +1819,8 @@ type MilvusServiceServer_GetCompactionState_Call struct { } // GetCompactionState is a helper method to define mock.On call -// - _a0 context.Context -// - _a1 *milvuspb.GetCompactionStateRequest +// - _a0 context.Context +// - _a1 *milvuspb.GetCompactionStateRequest func (_e *MilvusServiceServer_Expecter) GetCompactionState(_a0 interface{}, _a1 interface{}) *MilvusServiceServer_GetCompactionState_Call { return &MilvusServiceServer_GetCompactionState_Call{Call: _e.mock.On("GetCompactionState", _a0, _a1)} } @@ -1874,8 +1874,8 @@ type MilvusServiceServer_GetCompactionStateWithPlans_Call struct { } // GetCompactionStateWithPlans is a helper method to define mock.On call -// - _a0 context.Context -// - _a1 *milvuspb.GetCompactionPlansRequest +// - _a0 context.Context +// - _a1 *milvuspb.GetCompactionPlansRequest func (_e *MilvusServiceServer_Expecter) GetCompactionStateWithPlans(_a0 interface{}, _a1 interface{}) *MilvusServiceServer_GetCompactionStateWithPlans_Call { return &MilvusServiceServer_GetCompactionStateWithPlans_Call{Call: _e.mock.On("GetCompactionStateWithPlans", _a0, _a1)} } @@ -1929,8 +1929,8 @@ type MilvusServiceServer_GetComponentStates_Call struct { } // GetComponentStates is a helper method to define mock.On call -// - _a0 context.Context -// - _a1 *milvuspb.GetComponentStatesRequest +// - _a0 context.Context +// - _a1 *milvuspb.GetComponentStatesRequest func (_e *MilvusServiceServer_Expecter) GetComponentStates(_a0 interface{}, _a1 interface{}) *MilvusServiceServer_GetComponentStates_Call { return &MilvusServiceServer_GetComponentStates_Call{Call: _e.mock.On("GetComponentStates", _a0, _a1)} } @@ -1984,8 +1984,8 @@ type MilvusServiceServer_GetFlushAllState_Call struct { } // GetFlushAllState is a helper method to define mock.On call -// - _a0 context.Context -// - _a1 *milvuspb.GetFlushAllStateRequest +// - _a0 context.Context +// - _a1 *milvuspb.GetFlushAllStateRequest func (_e *MilvusServiceServer_Expecter) GetFlushAllState(_a0 interface{}, _a1 interface{}) *MilvusServiceServer_GetFlushAllState_Call { return &MilvusServiceServer_GetFlushAllState_Call{Call: _e.mock.On("GetFlushAllState", _a0, _a1)} } @@ -2039,8 +2039,8 @@ type MilvusServiceServer_GetFlushState_Call struct { } // GetFlushState is a helper method to define mock.On call -// - _a0 context.Context -// - _a1 *milvuspb.GetFlushStateRequest +// - _a0 context.Context +// - _a1 *milvuspb.GetFlushStateRequest func (_e *MilvusServiceServer_Expecter) GetFlushState(_a0 interface{}, _a1 interface{}) *MilvusServiceServer_GetFlushState_Call { return &MilvusServiceServer_GetFlushState_Call{Call: _e.mock.On("GetFlushState", _a0, _a1)} } @@ -2094,8 +2094,8 @@ type MilvusServiceServer_GetImportState_Call struct { } // GetImportState is a helper method to define mock.On call -// - _a0 context.Context -// - _a1 *milvuspb.GetImportStateRequest +// - _a0 context.Context +// - _a1 *milvuspb.GetImportStateRequest func (_e *MilvusServiceServer_Expecter) GetImportState(_a0 interface{}, _a1 interface{}) *MilvusServiceServer_GetImportState_Call { return &MilvusServiceServer_GetImportState_Call{Call: _e.mock.On("GetImportState", _a0, _a1)} } @@ -2149,8 +2149,8 @@ type MilvusServiceServer_GetIndexBuildProgress_Call struct { } // GetIndexBuildProgress is a helper method to define mock.On call -// - _a0 context.Context -// - _a1 *milvuspb.GetIndexBuildProgressRequest +// - _a0 context.Context +// - _a1 *milvuspb.GetIndexBuildProgressRequest func (_e *MilvusServiceServer_Expecter) GetIndexBuildProgress(_a0 interface{}, _a1 interface{}) *MilvusServiceServer_GetIndexBuildProgress_Call { return &MilvusServiceServer_GetIndexBuildProgress_Call{Call: _e.mock.On("GetIndexBuildProgress", _a0, _a1)} } @@ -2204,8 +2204,8 @@ type MilvusServiceServer_GetIndexState_Call struct { } // GetIndexState is a helper method to define mock.On call -// - _a0 context.Context -// - _a1 *milvuspb.GetIndexStateRequest +// - _a0 context.Context +// - _a1 *milvuspb.GetIndexStateRequest func (_e *MilvusServiceServer_Expecter) GetIndexState(_a0 interface{}, _a1 interface{}) *MilvusServiceServer_GetIndexState_Call { return &MilvusServiceServer_GetIndexState_Call{Call: _e.mock.On("GetIndexState", _a0, _a1)} } @@ -2259,8 +2259,8 @@ type MilvusServiceServer_GetIndexStatistics_Call struct { } // GetIndexStatistics is a helper method to define mock.On call -// - _a0 context.Context -// - _a1 *milvuspb.GetIndexStatisticsRequest +// - _a0 context.Context +// - _a1 *milvuspb.GetIndexStatisticsRequest func (_e *MilvusServiceServer_Expecter) GetIndexStatistics(_a0 interface{}, _a1 interface{}) *MilvusServiceServer_GetIndexStatistics_Call { return &MilvusServiceServer_GetIndexStatistics_Call{Call: _e.mock.On("GetIndexStatistics", _a0, _a1)} } @@ -2314,8 +2314,8 @@ type MilvusServiceServer_GetLoadState_Call struct { } // GetLoadState is a helper method to define mock.On call -// - _a0 context.Context -// - _a1 *milvuspb.GetLoadStateRequest +// - _a0 context.Context +// - _a1 *milvuspb.GetLoadStateRequest func (_e *MilvusServiceServer_Expecter) GetLoadState(_a0 interface{}, _a1 interface{}) *MilvusServiceServer_GetLoadState_Call { return &MilvusServiceServer_GetLoadState_Call{Call: _e.mock.On("GetLoadState", _a0, _a1)} } @@ -2369,8 +2369,8 @@ type MilvusServiceServer_GetLoadingProgress_Call struct { } // GetLoadingProgress is a helper method to define mock.On call -// - _a0 context.Context -// - _a1 *milvuspb.GetLoadingProgressRequest +// - _a0 context.Context +// - _a1 *milvuspb.GetLoadingProgressRequest func (_e *MilvusServiceServer_Expecter) GetLoadingProgress(_a0 interface{}, _a1 interface{}) *MilvusServiceServer_GetLoadingProgress_Call { return &MilvusServiceServer_GetLoadingProgress_Call{Call: _e.mock.On("GetLoadingProgress", _a0, _a1)} } @@ -2424,8 +2424,8 @@ type MilvusServiceServer_GetMetrics_Call struct { } // GetMetrics is a helper method to define mock.On call -// - _a0 context.Context -// - _a1 *milvuspb.GetMetricsRequest +// - _a0 context.Context +// - _a1 *milvuspb.GetMetricsRequest func (_e *MilvusServiceServer_Expecter) GetMetrics(_a0 interface{}, _a1 interface{}) *MilvusServiceServer_GetMetrics_Call { return &MilvusServiceServer_GetMetrics_Call{Call: _e.mock.On("GetMetrics", _a0, _a1)} } @@ -2479,8 +2479,8 @@ type MilvusServiceServer_GetPartitionStatistics_Call struct { } // GetPartitionStatistics is a helper method to define mock.On call -// - _a0 context.Context -// - _a1 *milvuspb.GetPartitionStatisticsRequest +// - _a0 context.Context +// - _a1 *milvuspb.GetPartitionStatisticsRequest func (_e *MilvusServiceServer_Expecter) GetPartitionStatistics(_a0 interface{}, _a1 interface{}) *MilvusServiceServer_GetPartitionStatistics_Call { return &MilvusServiceServer_GetPartitionStatistics_Call{Call: _e.mock.On("GetPartitionStatistics", _a0, _a1)} } @@ -2534,8 +2534,8 @@ type MilvusServiceServer_GetPersistentSegmentInfo_Call struct { } // GetPersistentSegmentInfo is a helper method to define mock.On call -// - _a0 context.Context -// - _a1 *milvuspb.GetPersistentSegmentInfoRequest +// - _a0 context.Context +// - _a1 *milvuspb.GetPersistentSegmentInfoRequest func (_e *MilvusServiceServer_Expecter) GetPersistentSegmentInfo(_a0 interface{}, _a1 interface{}) *MilvusServiceServer_GetPersistentSegmentInfo_Call { return &MilvusServiceServer_GetPersistentSegmentInfo_Call{Call: _e.mock.On("GetPersistentSegmentInfo", _a0, _a1)} } @@ -2589,8 +2589,8 @@ type MilvusServiceServer_GetQuerySegmentInfo_Call struct { } // GetQuerySegmentInfo is a helper method to define mock.On call -// - _a0 context.Context -// - _a1 *milvuspb.GetQuerySegmentInfoRequest +// - _a0 context.Context +// - _a1 *milvuspb.GetQuerySegmentInfoRequest func (_e *MilvusServiceServer_Expecter) GetQuerySegmentInfo(_a0 interface{}, _a1 interface{}) *MilvusServiceServer_GetQuerySegmentInfo_Call { return &MilvusServiceServer_GetQuerySegmentInfo_Call{Call: _e.mock.On("GetQuerySegmentInfo", _a0, _a1)} } @@ -2644,8 +2644,8 @@ type MilvusServiceServer_GetReplicas_Call struct { } // GetReplicas is a helper method to define mock.On call -// - _a0 context.Context -// - _a1 *milvuspb.GetReplicasRequest +// - _a0 context.Context +// - _a1 *milvuspb.GetReplicasRequest func (_e *MilvusServiceServer_Expecter) GetReplicas(_a0 interface{}, _a1 interface{}) *MilvusServiceServer_GetReplicas_Call { return &MilvusServiceServer_GetReplicas_Call{Call: _e.mock.On("GetReplicas", _a0, _a1)} } @@ -2699,8 +2699,8 @@ type MilvusServiceServer_GetVersion_Call struct { } // GetVersion is a helper method to define mock.On call -// - _a0 context.Context -// - _a1 *milvuspb.GetVersionRequest +// - _a0 context.Context +// - _a1 *milvuspb.GetVersionRequest func (_e *MilvusServiceServer_Expecter) GetVersion(_a0 interface{}, _a1 interface{}) *MilvusServiceServer_GetVersion_Call { return &MilvusServiceServer_GetVersion_Call{Call: _e.mock.On("GetVersion", _a0, _a1)} } @@ -2754,8 +2754,8 @@ type MilvusServiceServer_HasCollection_Call struct { } // HasCollection is a helper method to define mock.On call -// - _a0 context.Context -// - _a1 *milvuspb.HasCollectionRequest +// - _a0 context.Context +// - _a1 *milvuspb.HasCollectionRequest func (_e *MilvusServiceServer_Expecter) HasCollection(_a0 interface{}, _a1 interface{}) *MilvusServiceServer_HasCollection_Call { return &MilvusServiceServer_HasCollection_Call{Call: _e.mock.On("HasCollection", _a0, _a1)} } @@ -2809,8 +2809,8 @@ type MilvusServiceServer_HasPartition_Call struct { } // HasPartition is a helper method to define mock.On call -// - _a0 context.Context -// - _a1 *milvuspb.HasPartitionRequest +// - _a0 context.Context +// - _a1 *milvuspb.HasPartitionRequest func (_e *MilvusServiceServer_Expecter) HasPartition(_a0 interface{}, _a1 interface{}) *MilvusServiceServer_HasPartition_Call { return &MilvusServiceServer_HasPartition_Call{Call: _e.mock.On("HasPartition", _a0, _a1)} } @@ -2864,8 +2864,8 @@ type MilvusServiceServer_Import_Call struct { } // Import is a helper method to define mock.On call -// - _a0 context.Context -// - _a1 *milvuspb.ImportRequest +// - _a0 context.Context +// - _a1 *milvuspb.ImportRequest func (_e *MilvusServiceServer_Expecter) Import(_a0 interface{}, _a1 interface{}) *MilvusServiceServer_Import_Call { return &MilvusServiceServer_Import_Call{Call: _e.mock.On("Import", _a0, _a1)} } @@ -2919,8 +2919,8 @@ type MilvusServiceServer_Insert_Call struct { } // Insert is a helper method to define mock.On call -// - _a0 context.Context -// - _a1 *milvuspb.InsertRequest +// - _a0 context.Context +// - _a1 *milvuspb.InsertRequest func (_e *MilvusServiceServer_Expecter) Insert(_a0 interface{}, _a1 interface{}) *MilvusServiceServer_Insert_Call { return &MilvusServiceServer_Insert_Call{Call: _e.mock.On("Insert", _a0, _a1)} } @@ -2974,8 +2974,8 @@ type MilvusServiceServer_ListAliases_Call struct { } // ListAliases is a helper method to define mock.On call -// - _a0 context.Context -// - _a1 *milvuspb.ListAliasesRequest +// - _a0 context.Context +// - _a1 *milvuspb.ListAliasesRequest func (_e *MilvusServiceServer_Expecter) ListAliases(_a0 interface{}, _a1 interface{}) *MilvusServiceServer_ListAliases_Call { return &MilvusServiceServer_ListAliases_Call{Call: _e.mock.On("ListAliases", _a0, _a1)} } @@ -3029,8 +3029,8 @@ type MilvusServiceServer_ListCredUsers_Call struct { } // ListCredUsers is a helper method to define mock.On call -// - _a0 context.Context -// - _a1 *milvuspb.ListCredUsersRequest +// - _a0 context.Context +// - _a1 *milvuspb.ListCredUsersRequest func (_e *MilvusServiceServer_Expecter) ListCredUsers(_a0 interface{}, _a1 interface{}) *MilvusServiceServer_ListCredUsers_Call { return &MilvusServiceServer_ListCredUsers_Call{Call: _e.mock.On("ListCredUsers", _a0, _a1)} } @@ -3084,8 +3084,8 @@ type MilvusServiceServer_ListDatabases_Call struct { } // ListDatabases is a helper method to define mock.On call -// - _a0 context.Context -// - _a1 *milvuspb.ListDatabasesRequest +// - _a0 context.Context +// - _a1 *milvuspb.ListDatabasesRequest func (_e *MilvusServiceServer_Expecter) ListDatabases(_a0 interface{}, _a1 interface{}) *MilvusServiceServer_ListDatabases_Call { return &MilvusServiceServer_ListDatabases_Call{Call: _e.mock.On("ListDatabases", _a0, _a1)} } @@ -3139,8 +3139,8 @@ type MilvusServiceServer_ListImportTasks_Call struct { } // ListImportTasks is a helper method to define mock.On call -// - _a0 context.Context -// - _a1 *milvuspb.ListImportTasksRequest +// - _a0 context.Context +// - _a1 *milvuspb.ListImportTasksRequest func (_e *MilvusServiceServer_Expecter) ListImportTasks(_a0 interface{}, _a1 interface{}) *MilvusServiceServer_ListImportTasks_Call { return &MilvusServiceServer_ListImportTasks_Call{Call: _e.mock.On("ListImportTasks", _a0, _a1)} } @@ -3194,8 +3194,8 @@ type MilvusServiceServer_ListIndexedSegment_Call struct { } // ListIndexedSegment is a helper method to define mock.On call -// - _a0 context.Context -// - _a1 *federpb.ListIndexedSegmentRequest +// - _a0 context.Context +// - _a1 *federpb.ListIndexedSegmentRequest func (_e *MilvusServiceServer_Expecter) ListIndexedSegment(_a0 interface{}, _a1 interface{}) *MilvusServiceServer_ListIndexedSegment_Call { return &MilvusServiceServer_ListIndexedSegment_Call{Call: _e.mock.On("ListIndexedSegment", _a0, _a1)} } @@ -3249,8 +3249,8 @@ type MilvusServiceServer_ListResourceGroups_Call struct { } // ListResourceGroups is a helper method to define mock.On call -// - _a0 context.Context -// - _a1 *milvuspb.ListResourceGroupsRequest +// - _a0 context.Context +// - _a1 *milvuspb.ListResourceGroupsRequest func (_e *MilvusServiceServer_Expecter) ListResourceGroups(_a0 interface{}, _a1 interface{}) *MilvusServiceServer_ListResourceGroups_Call { return &MilvusServiceServer_ListResourceGroups_Call{Call: _e.mock.On("ListResourceGroups", _a0, _a1)} } @@ -3304,8 +3304,8 @@ type MilvusServiceServer_LoadBalance_Call struct { } // LoadBalance is a helper method to define mock.On call -// - _a0 context.Context -// - _a1 *milvuspb.LoadBalanceRequest +// - _a0 context.Context +// - _a1 *milvuspb.LoadBalanceRequest func (_e *MilvusServiceServer_Expecter) LoadBalance(_a0 interface{}, _a1 interface{}) *MilvusServiceServer_LoadBalance_Call { return &MilvusServiceServer_LoadBalance_Call{Call: _e.mock.On("LoadBalance", _a0, _a1)} } @@ -3359,8 +3359,8 @@ type MilvusServiceServer_LoadCollection_Call struct { } // LoadCollection is a helper method to define mock.On call -// - _a0 context.Context -// - _a1 *milvuspb.LoadCollectionRequest +// - _a0 context.Context +// - _a1 *milvuspb.LoadCollectionRequest func (_e *MilvusServiceServer_Expecter) LoadCollection(_a0 interface{}, _a1 interface{}) *MilvusServiceServer_LoadCollection_Call { return &MilvusServiceServer_LoadCollection_Call{Call: _e.mock.On("LoadCollection", _a0, _a1)} } @@ -3414,8 +3414,8 @@ type MilvusServiceServer_LoadPartitions_Call struct { } // LoadPartitions is a helper method to define mock.On call -// - _a0 context.Context -// - _a1 *milvuspb.LoadPartitionsRequest +// - _a0 context.Context +// - _a1 *milvuspb.LoadPartitionsRequest func (_e *MilvusServiceServer_Expecter) LoadPartitions(_a0 interface{}, _a1 interface{}) *MilvusServiceServer_LoadPartitions_Call { return &MilvusServiceServer_LoadPartitions_Call{Call: _e.mock.On("LoadPartitions", _a0, _a1)} } @@ -3469,8 +3469,8 @@ type MilvusServiceServer_ManualCompaction_Call struct { } // ManualCompaction is a helper method to define mock.On call -// - _a0 context.Context -// - _a1 *milvuspb.ManualCompactionRequest +// - _a0 context.Context +// - _a1 *milvuspb.ManualCompactionRequest func (_e *MilvusServiceServer_Expecter) ManualCompaction(_a0 interface{}, _a1 interface{}) *MilvusServiceServer_ManualCompaction_Call { return &MilvusServiceServer_ManualCompaction_Call{Call: _e.mock.On("ManualCompaction", _a0, _a1)} } @@ -3524,8 +3524,8 @@ type MilvusServiceServer_OperatePrivilege_Call struct { } // OperatePrivilege is a helper method to define mock.On call -// - _a0 context.Context -// - _a1 *milvuspb.OperatePrivilegeRequest +// - _a0 context.Context +// - _a1 *milvuspb.OperatePrivilegeRequest func (_e *MilvusServiceServer_Expecter) OperatePrivilege(_a0 interface{}, _a1 interface{}) *MilvusServiceServer_OperatePrivilege_Call { return &MilvusServiceServer_OperatePrivilege_Call{Call: _e.mock.On("OperatePrivilege", _a0, _a1)} } @@ -3579,8 +3579,8 @@ type MilvusServiceServer_OperateUserRole_Call struct { } // OperateUserRole is a helper method to define mock.On call -// - _a0 context.Context -// - _a1 *milvuspb.OperateUserRoleRequest +// - _a0 context.Context +// - _a1 *milvuspb.OperateUserRoleRequest func (_e *MilvusServiceServer_Expecter) OperateUserRole(_a0 interface{}, _a1 interface{}) *MilvusServiceServer_OperateUserRole_Call { return &MilvusServiceServer_OperateUserRole_Call{Call: _e.mock.On("OperateUserRole", _a0, _a1)} } @@ -3634,8 +3634,8 @@ type MilvusServiceServer_Query_Call struct { } // Query is a helper method to define mock.On call -// - _a0 context.Context -// - _a1 *milvuspb.QueryRequest +// - _a0 context.Context +// - _a1 *milvuspb.QueryRequest func (_e *MilvusServiceServer_Expecter) Query(_a0 interface{}, _a1 interface{}) *MilvusServiceServer_Query_Call { return &MilvusServiceServer_Query_Call{Call: _e.mock.On("Query", _a0, _a1)} } @@ -3689,8 +3689,8 @@ type MilvusServiceServer_RegisterLink_Call struct { } // RegisterLink is a helper method to define mock.On call -// - _a0 context.Context -// - _a1 *milvuspb.RegisterLinkRequest +// - _a0 context.Context +// - _a1 *milvuspb.RegisterLinkRequest func (_e *MilvusServiceServer_Expecter) RegisterLink(_a0 interface{}, _a1 interface{}) *MilvusServiceServer_RegisterLink_Call { return &MilvusServiceServer_RegisterLink_Call{Call: _e.mock.On("RegisterLink", _a0, _a1)} } @@ -3744,8 +3744,8 @@ type MilvusServiceServer_ReleaseCollection_Call struct { } // ReleaseCollection is a helper method to define mock.On call -// - _a0 context.Context -// - _a1 *milvuspb.ReleaseCollectionRequest +// - _a0 context.Context +// - _a1 *milvuspb.ReleaseCollectionRequest func (_e *MilvusServiceServer_Expecter) ReleaseCollection(_a0 interface{}, _a1 interface{}) *MilvusServiceServer_ReleaseCollection_Call { return &MilvusServiceServer_ReleaseCollection_Call{Call: _e.mock.On("ReleaseCollection", _a0, _a1)} } @@ -3799,8 +3799,8 @@ type MilvusServiceServer_ReleasePartitions_Call struct { } // ReleasePartitions is a helper method to define mock.On call -// - _a0 context.Context -// - _a1 *milvuspb.ReleasePartitionsRequest +// - _a0 context.Context +// - _a1 *milvuspb.ReleasePartitionsRequest func (_e *MilvusServiceServer_Expecter) ReleasePartitions(_a0 interface{}, _a1 interface{}) *MilvusServiceServer_ReleasePartitions_Call { return &MilvusServiceServer_ReleasePartitions_Call{Call: _e.mock.On("ReleasePartitions", _a0, _a1)} } @@ -3854,8 +3854,8 @@ type MilvusServiceServer_RenameCollection_Call struct { } // RenameCollection is a helper method to define mock.On call -// - _a0 context.Context -// - _a1 *milvuspb.RenameCollectionRequest +// - _a0 context.Context +// - _a1 *milvuspb.RenameCollectionRequest func (_e *MilvusServiceServer_Expecter) RenameCollection(_a0 interface{}, _a1 interface{}) *MilvusServiceServer_RenameCollection_Call { return &MilvusServiceServer_RenameCollection_Call{Call: _e.mock.On("RenameCollection", _a0, _a1)} } @@ -3964,8 +3964,8 @@ type MilvusServiceServer_Search_Call struct { } // Search is a helper method to define mock.On call -// - _a0 context.Context -// - _a1 *milvuspb.SearchRequest +// - _a0 context.Context +// - _a1 *milvuspb.SearchRequest func (_e *MilvusServiceServer_Expecter) Search(_a0 interface{}, _a1 interface{}) *MilvusServiceServer_Search_Call { return &MilvusServiceServer_Search_Call{Call: _e.mock.On("Search", _a0, _a1)} } @@ -4019,8 +4019,8 @@ type MilvusServiceServer_SelectGrant_Call struct { } // SelectGrant is a helper method to define mock.On call -// - _a0 context.Context -// - _a1 *milvuspb.SelectGrantRequest +// - _a0 context.Context +// - _a1 *milvuspb.SelectGrantRequest func (_e *MilvusServiceServer_Expecter) SelectGrant(_a0 interface{}, _a1 interface{}) *MilvusServiceServer_SelectGrant_Call { return &MilvusServiceServer_SelectGrant_Call{Call: _e.mock.On("SelectGrant", _a0, _a1)} } @@ -4074,8 +4074,8 @@ type MilvusServiceServer_SelectRole_Call struct { } // SelectRole is a helper method to define mock.On call -// - _a0 context.Context -// - _a1 *milvuspb.SelectRoleRequest +// - _a0 context.Context +// - _a1 *milvuspb.SelectRoleRequest func (_e *MilvusServiceServer_Expecter) SelectRole(_a0 interface{}, _a1 interface{}) *MilvusServiceServer_SelectRole_Call { return &MilvusServiceServer_SelectRole_Call{Call: _e.mock.On("SelectRole", _a0, _a1)} } @@ -4129,8 +4129,8 @@ type MilvusServiceServer_SelectUser_Call struct { } // SelectUser is a helper method to define mock.On call -// - _a0 context.Context -// - _a1 *milvuspb.SelectUserRequest +// - _a0 context.Context +// - _a1 *milvuspb.SelectUserRequest func (_e *MilvusServiceServer_Expecter) SelectUser(_a0 interface{}, _a1 interface{}) *MilvusServiceServer_SelectUser_Call { return &MilvusServiceServer_SelectUser_Call{Call: _e.mock.On("SelectUser", _a0, _a1)} } @@ -4184,8 +4184,8 @@ type MilvusServiceServer_ShowCollections_Call struct { } // ShowCollections is a helper method to define mock.On call -// - _a0 context.Context -// - _a1 *milvuspb.ShowCollectionsRequest +// - _a0 context.Context +// - _a1 *milvuspb.ShowCollectionsRequest func (_e *MilvusServiceServer_Expecter) ShowCollections(_a0 interface{}, _a1 interface{}) *MilvusServiceServer_ShowCollections_Call { return &MilvusServiceServer_ShowCollections_Call{Call: _e.mock.On("ShowCollections", _a0, _a1)} } @@ -4239,8 +4239,8 @@ type MilvusServiceServer_ShowPartitions_Call struct { } // ShowPartitions is a helper method to define mock.On call -// - _a0 context.Context -// - _a1 *milvuspb.ShowPartitionsRequest +// - _a0 context.Context +// - _a1 *milvuspb.ShowPartitionsRequest func (_e *MilvusServiceServer_Expecter) ShowPartitions(_a0 interface{}, _a1 interface{}) *MilvusServiceServer_ShowPartitions_Call { return &MilvusServiceServer_ShowPartitions_Call{Call: _e.mock.On("ShowPartitions", _a0, _a1)} } @@ -4294,8 +4294,8 @@ type MilvusServiceServer_TransferNode_Call struct { } // TransferNode is a helper method to define mock.On call -// - _a0 context.Context -// - _a1 *milvuspb.TransferNodeRequest +// - _a0 context.Context +// - _a1 *milvuspb.TransferNodeRequest func (_e *MilvusServiceServer_Expecter) TransferNode(_a0 interface{}, _a1 interface{}) *MilvusServiceServer_TransferNode_Call { return &MilvusServiceServer_TransferNode_Call{Call: _e.mock.On("TransferNode", _a0, _a1)} } @@ -4349,8 +4349,8 @@ type MilvusServiceServer_TransferReplica_Call struct { } // TransferReplica is a helper method to define mock.On call -// - _a0 context.Context -// - _a1 *milvuspb.TransferReplicaRequest +// - _a0 context.Context +// - _a1 *milvuspb.TransferReplicaRequest func (_e *MilvusServiceServer_Expecter) TransferReplica(_a0 interface{}, _a1 interface{}) *MilvusServiceServer_TransferReplica_Call { return &MilvusServiceServer_TransferReplica_Call{Call: _e.mock.On("TransferReplica", _a0, _a1)} } @@ -4404,8 +4404,8 @@ type MilvusServiceServer_UpdateCredential_Call struct { } // UpdateCredential is a helper method to define mock.On call -// - _a0 context.Context -// - _a1 *milvuspb.UpdateCredentialRequest +// - _a0 context.Context +// - _a1 *milvuspb.UpdateCredentialRequest func (_e *MilvusServiceServer_Expecter) UpdateCredential(_a0 interface{}, _a1 interface{}) *MilvusServiceServer_UpdateCredential_Call { return &MilvusServiceServer_UpdateCredential_Call{Call: _e.mock.On("UpdateCredential", _a0, _a1)} } @@ -4459,8 +4459,8 @@ type MilvusServiceServer_Upsert_Call struct { } // Upsert is a helper method to define mock.On call -// - _a0 context.Context -// - _a1 *milvuspb.UpsertRequest +// - _a0 context.Context +// - _a1 *milvuspb.UpsertRequest func (_e *MilvusServiceServer_Expecter) Upsert(_a0 interface{}, _a1 interface{}) *MilvusServiceServer_Upsert_Call { return &MilvusServiceServer_Upsert_Call{Call: _e.mock.On("Upsert", _a0, _a1)} }