Repository: milvus-io/milvus-sdk-go
Pull request #449 (2023-04-27 08:30:42)

Support Database for managing collection and index
Related issue #448

codecov[bot]: ## [Codecov](https://codecov.io/gh/milvus-io/milvus-sdk-go/pull/449?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=milvus-io) Report
> Merging [#449](https://codecov.io/gh/milvus-io/milvus-sdk-go/pull/449?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=milvus-io) (b8a42e4) into [v2.2.x](https://codecov.io/gh/milvus-io/milvus-sdk-go/commit/bef5ddb5797085850977081d3f00a3cb30a7548b?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=milvus-io) (bef5ddb) will **decrease** coverage by `1.08%`.
> The diff coverage is `51.49%`.

[![Impacted file tree graph](https://codecov.io/gh/milvus-io/milvus-sdk-go/pull/449/graphs/tree.svg?width=650&height=150&src=pr&token=WJK43PV390&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=milvus-io)](https://codecov.io/gh/milvus-io/milvus-sdk-go/pull/449?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=milvus-io)

```diff
@@            Coverage Diff             @@
##           v2.2.x     #449      +/-   ##
==========================================
- Coverage   87.44%   86.36%   -1.08%     
==========================================
  Files          31       33       +2     
  Lines        2835     2912      +77     
==========================================
+ Hits         2479     2515      +36     
- Misses        269      305      +36     
- Partials       87       92       +5     
```


| [Impacted Files](https://codecov.io/gh/milvus-io/milvus-sdk-go/pull/449?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=milvus-io) | Coverage Δ | |
|---|---|---|
| [client/client\_grpc\_collection.go](https://codecov.io/gh/milvus-io/milvus-sdk-go/pull/449?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=milvus-io#diff-Y2xpZW50L2NsaWVudF9ncnBjX2NvbGxlY3Rpb24uZ28=) | `86.42% <ø> (ø)` | |
| [client/interceptor.go](https://codecov.io/gh/milvus-io/milvus-sdk-go/pull/449?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=milvus-io#diff-Y2xpZW50L2ludGVyY2VwdG9yLmdv) | `20.00% <11.11%> (-5.00%)` | :arrow_down: |
| [client/client.go](https://codecov.io/gh/milvus-io/milvus-sdk-go/pull/449?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=milvus-io#diff-Y2xpZW50L2NsaWVudC5nbw==) | `32.50% <31.42%> (-43.31%)` | :arrow_down: |
| [client/config.go](https://codecov.io/gh/milvus-io/milvus-sdk-go/pull/449?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=milvus-io#diff-Y2xpZW50L2NvbmZpZy5nbw==) | `50.00% <50.00%> (ø)` | |
| [client/client\_grpc\_database.go](https://codecov.io/gh/milvus-io/milvus-sdk-go/pull/449?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=milvus-io#diff-Y2xpZW50L2NsaWVudF9ncnBjX2RhdGFiYXNlLmdv) | `92.85% <92.85%> (ø)` | |

... and [2 files with indirect coverage changes](https://codecov.io/gh/milvus-io/milvus-sdk-go/pull/449/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=milvus-io)

sre-ci-robot: [APPROVALNOTIFIER] This PR is **APPROVED**

This pull-request has been approved by: *<a href="https://github.com/milvus-io/milvus-sdk-go/pull/449#" title="Author self-approved">chyezh</a>*, *<a href="https://github.com/milvus-io/milvus-sdk-go/pull/449#pullrequestreview-1438177295" title="LGTM">congqixia</a>*

The full list of commands accepted by this bot can be found [here](https://go.k8s.io/bot-commands?repo=milvus-io%2Fmilvus-sdk-go).

The pull request process is described [here](https://git.k8s.io/community/contributors/guide/owners.md#the-code-review-process)

<details >
Needs approval from an approver in each of these files:

- ~~[OWNERS](https://github.com/milvus-io/milvus-sdk-go/blob/v2.2.x/OWNERS)~~ [congqixia]

Approvers can indicate their approval by writing `/approve` in a comment
Approvers can cancel approval by writing `/approve cancel` in a comment
</details>
<!-- META={"approvers":[]} -->

Patch:
diff --git a/README.md b/README.md
index 3102c46..7fd3469 100644
--- a/README.md
+++ b/README.md
@@ -42,7 +42,9 @@ Go 1.15 or higher
    import "github.com/milvus-io/milvus-sdk-go/v2/client"
 
    //...other snippet ...
-   client, err := client.NewGrpcClient(context.Background(), "address_of_milvus")
+   client, err := client.NewClient(context.Background(), client.Config{
+      Address: "localhost:19530",
+   })
    if err != nil {
        // handle error
    }
diff --git a/client/client.go b/client/client.go
index 0dbb761..4dfb2bd 100644
--- a/client/client.go
+++ b/client/client.go
@@ -14,28 +14,34 @@ package client
 
 import (
 	"context"
-	"crypto/tls"
-	"math"
-	"net/url"
-	"strings"
+	"sync"
 	"time"
 
-	grpc_middleware "github.com/grpc-ecosystem/go-grpc-middleware"
-	grpc_retry "github.com/grpc-ecosystem/go-grpc-middleware/retry"
 	"github.com/milvus-io/milvus-sdk-go/v2/entity"
 	"google.golang.org/grpc"
-	"google.golang.org/grpc/backoff"
-	"google.golang.org/grpc/codes"
-	"google.golang.org/grpc/credentials"
-	"google.golang.org/grpc/credentials/insecure"
-	"google.golang.org/grpc/keepalive"
 )
 
 // Client is the interface used to communicate with Milvus
 type Client interface {
+	// -- client --
 	// Close close the remaining connection resources
 	Close() error
 
+	// UsingDatabase for database operation after this function call.
+	// All request in any goroutine will be applied to new database on the same client. e.g.
+	// 1. goroutine A access DB1.
+	// 2. goroutine B call UsingDatabase(ctx, "DB2").
+	// 3. goroutine A access DB2 after 2.
+	UsingDatabase(ctx context.Context, dbName string)
+
+	// -- database --
+	// 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
+	// DropDatabase drop database with the given db name.
+	DropDatabase(ctx context.Context, dbName string) error
+
 	// -- collection --
 
 	// ListCollections list collections from connection
@@ -201,134 +207,91 @@ type SearchResult struct {
 	Err         error           // search error if any
 }
 
-var DefaultGrpcOpts = []grpc.DialOption{
-	grpc.WithBlock(),
-	grpc.WithKeepaliveParams(keepalive.ClientParameters{
-		Time:                5 * time.Second,
-		Timeout:             10 * time.Second,
-		PermitWithoutStream: true,
-	}),
-	grpc.WithConnectParams(grpc.ConnectParams{
-		Backoff: backoff.Config{
-			BaseDelay:  100 * time.Millisecond,
-			Multiplier: 1.6,
-			Jitter:     0.2,
-			MaxDelay:   3 * time.Second,
-		},
-		MinConnectTimeout: 3 * time.Second,
-	}),
-}
+// Check if GrpcClient implement Client.
+var _ Client = &GrpcClient{}
 
-// NewGrpcClient create client with grpc addr
-// the `Connect` API will be called for you
-// dialOptions contains the dial option(s) that control the grpc dialing process
-func NewGrpcClient(ctx context.Context, addr string, dialOptions ...grpc.DialOption) (Client, error) {
-	c := &GrpcClient{}
-	if len(dialOptions) == 0 {
-		return NewDefaultGrpcClient(ctx, addr)
+// NewClient create a client connected to remote milvus cluster.
+// More connect option can be modified by Config.
+func NewClient(ctx context.Context, config Config) (Client, error) {
+	if err := config.parse(); err != nil {
+		return nil, err
+	}
+
+	c := &GrpcClient{
+		config: &syncConfig{
+			Mutex: sync.Mutex{},
+			cfg:   config,
+		},
 	}
 
-	if err := c.connect(ctx, addr, dialOptions...); err != nil {
+	// Parse remote address.
+	addr := c.config.getParsedAddress()
+
+	// Parse grpc options
+	options := c.config.getDialOption()
+
+	// Connect the grpc server.
+	if err := c.connect(ctx, addr, options...); err != nil {
 		return nil, err
 	}
 
 	return c, nil
 }
 
+// NewGrpcClient create client with grpc addr
+// the `Connect` API will be called for you
+// dialOptions contains the dial option(s) that control the grpc dialing process
+// !!!Deprecated in future, use `NewClient` first.
+func NewGrpcClient(ctx context.Context, addr string, dialOptions ...grpc.DialOption) (Client, error) {
+	return NewClient(ctx, Config{
+		Address:     addr,
+		DialOptions: dialOptions,
+	})
+}
+
+// NewDefaultGrpcClient creates a new gRPC client.
+// !!!Deprecated in future, use `NewClient` first.
 func NewDefaultGrpcClient(ctx context.Context, addr string) (Client, error) {
-	c := &GrpcClient{}
-	defaultOpts := append(DefaultGrpcOpts,
-		grpc.WithTransportCredentials(insecure.NewCredentials()),
-		grpc.WithUnaryInterceptor(
-			grpc_middleware.ChainUnaryClient(
-				grpc_retry.UnaryClientInterceptor(
-					grpc_retry.WithMax(6),
-					grpc_retry.WithBackoff(func(attempt uint) time.Duration {
-						return 60 * time.Millisecond * time.Duration(math.Pow(3, float64(attempt)))
-					}),
-					grpc_retry.WithCodes(codes.Unavailable, codes.ResourceExhausted)),
-				RetryOnRateLimitInterceptor(10, func(ctx context.Context, attempt uint) time.Duration {
-					return 10 * time.Millisecond * time.Duration(math.Pow(3, float64(attempt)))
-				}),
-			),
-		),
+	return NewClient(
+		ctx, Config{
+			Address: addr,
+		},
 	)
-	err := c.connect(ctx, addr, defaultOpts...)
-	if err != nil {
-		return nil, err
-	}
-	return c, nil
 }
 
+// NewDefaultGrpcClientWithURI creates a new gRPC client with URI.
+// !!!Deprecated in future, use `NewClient` first.
 func NewDefaultGrpcClientWithURI(ctx context.Context, uri, username, password string) (Client, error) {
-	addr, inSecure, err := parseURI(uri)
-	if err != nil {
-		return nil, err
-	}
-
-	if inSecure {
-		return NewDefaultGrpcClientWithTLSAuth(ctx, addr, username, password)
-	}
-
-	return NewDefaultGrpcClientWithAuth(ctx, addr, username, password)
+	return NewClient(ctx, Config{
+		Address:  uri,
+		Username: username,
+		Password: password,
+	})
 }
 
-// NewDefaultGrpcClientWithTLSAuth enable transport security
+// NewDefaultGrpcClientWithTLSAuth creates a new gRPC client with TLS authentication.
+// !!!Deprecated in future, use `NewClient` first.
 func NewDefaultGrpcClientWithTLSAuth(ctx context.Context, addr, username, password string) (Client, error) {
-	defaultOpts := getDefaultAuthOpts(username, password, true)
-	return NewGrpcClient(ctx, addr, defaultOpts...)
+	return NewClient(
+		ctx,
+		Config{
+			Address:       addr,
+			Username:      username,
+			Password:      password,
+			EnableTLSAuth: true,
+		},
+	)
 }
 
-// NewDefaultGrpcClientWithAuth  disable transport security
+// NewDefaultGrpcClientWithAuth creates a new gRPC client with authentication.
+// !!!Deprecated in future, use `NewClient` first.
 func NewDefaultGrpcClientWithAuth(ctx context.Context, addr, username, password string) (Client, error) {
-	defaultOpts := getDefaultAuthOpts(username, password, false)
-	return NewGrpcClient(ctx, addr, defaultOpts...)
-}
-
-func getDefaultAuthOpts(username, password string, enableTLS bool) []grpc.DialOption {
-	var credential credentials.TransportCredentials
-	if enableTLS {
-		credential = credentials.NewTLS(&tls.Config{})
-	} else {
-		credential = insecure.NewCredentials()
-	}
-
-	defaultOpts := append(DefaultGrpcOpts,
-		grpc.WithTransportCredentials(credential),
-		grpc.WithChainUnaryInterceptor(
-			CreateAuthenticationUnaryInterceptor(username, password),
-			grpc_retry.UnaryClientInterceptor(
-				grpc_retry.WithMax(6),
-				grpc_retry.WithBackoff(func(attempt uint) time.Duration {
-					return 60 * time.Millisecond * time.Duration(math.Pow(3, float64(attempt)))
-				}),
-				grpc_retry.WithCodes(codes.Unavailable, codes.ResourceExhausted)),
-		),
-		grpc.WithStreamInterceptor(CreateAuthenticationStreamInterceptor(username, password)),
+	return NewClient(
+		ctx,
+		Config{
+			Address:  addr,
+			Username: username,
+			Password: password,
+		},
 	)
-	return defaultOpts
-}
-
-func parseURI(uri string) (string, bool, error) {
-	hasPrefix := false
-	inSecure := false
-	if strings.HasPrefix(uri, "https://") {
-		inSecure = true
-		hasPrefix = true
-	}
-
-	if strings.HasPrefix(uri, "http://") {
-		inSecure = false
-		hasPrefix = true
-	}
-
-	if hasPrefix {
-		url, err := url.Parse(uri)
-		if err != nil {
-			return "", inSecure, err
-		}
-		return url.Host, inSecure, nil
-	}
-
-	return uri, inSecure, nil
 }
diff --git a/client/client_grpc_collection.go b/client/client_grpc_collection.go
index 4260599..c2f27e7 100644
--- a/client/client_grpc_collection.go
+++ b/client/client_grpc_collection.go
@@ -29,6 +29,8 @@ import (
 type GrpcClient struct {
 	Conn    *grpc.ClientConn           // grpc connection instance
 	Service server.MilvusServiceClient // Service client stub
+
+	config *syncConfig
 }
 
 // connect connect to Service
@@ -46,6 +48,15 @@ func (c *GrpcClient) connect(ctx context.Context, addr string, opts ...grpc.Dial
 	return nil
 }
 
+// UsingDatabase for database operation after this function call.
+// All request in any goroutine will be applied to new database on the same client. e.g.
+// 1. goroutine A access DB1.
+// 2. goroutine B call UsingDatabase(ctx, "DB2").
+// 3. goroutine A access DB2 after 2.
+func (c *GrpcClient) UsingDatabase(ctx context.Context, dbName string) {
+	c.config.useDatabase(dbName)
+}
+
 // Close close the connection
 func (c *GrpcClient) Close() error {
 	if c.Conn != nil {
diff --git a/client/client_grpc_database.go b/client/client_grpc_database.go
new file mode 100644
index 0000000..c4662e2
--- /dev/null
+++ b/client/client_grpc_database.go
@@ -0,0 +1,79 @@
+// Licensed to the LF AI & Data foundation under one
+// or more contributor license agreements. See the NOTICE file
+// distributed with this work for additional information
+// regarding copyright ownership. The ASF licenses this file
+// to you under the Apache License, Version 2.0 (the
+// "License"); you may not use this file except in compliance
+// with the License. You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package client
+
+import (
+	"context"
+
+	server "github.com/milvus-io/milvus-proto/go-api/milvuspb"
+	"github.com/milvus-io/milvus-sdk-go/v2/entity"
+)
+
+// 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 {
+	if c.Service == nil {
+		return ErrClientNotReady
+	}
+	req := &server.CreateDatabaseRequest{
+		DbName: dbName,
+	}
+	resp, err := c.Service.CreateDatabase(ctx, req)
+	if err != nil {
+		return err
+	}
+	return handleRespStatus(resp)
+}
+
+// ListDatabases list all database in milvus cluster.
+func (c *GrpcClient) ListDatabases(ctx context.Context) ([]entity.Database, error) {
+	if c.Service == nil {
+		return nil, ErrClientNotReady
+	}
+
+	req := &server.ListDatabasesRequest{}
+	resp, err := c.Service.ListDatabases(ctx, req)
+	if err != nil {
+		return nil, err
+	}
+	if err = handleRespStatus(resp.GetStatus()); err != nil {
+		return nil, err
+	}
+	databases := make([]entity.Database, len(resp.GetDbNames()))
+	for i, dbName := range resp.GetDbNames() {
+		databases[i] = entity.Database{
+			Name: dbName,
+		}
+	}
+	return databases, nil
+}
+
+// DropDatabase drop all database in milvus cluster.
+func (c *GrpcClient) DropDatabase(ctx context.Context, dbName string) error {
+	if c.Service == nil {
+		return ErrClientNotReady
+	}
+
+	req := &server.DropDatabaseRequest{
+		DbName: dbName,
+	}
+	resp, err := c.Service.DropDatabase(ctx, req)
+	if err != nil {
+		return err
+	}
+	return handleRespStatus(resp)
+}
diff --git a/client/config.go b/client/config.go
new file mode 100644
index 0000000..83cdb5e
--- /dev/null
+++ b/client/config.go
@@ -0,0 +1,180 @@
+package client
+
+import (
+	"context"
+	"crypto/tls"
+	"fmt"
+	"math"
+	"net/url"
+	"regexp"
+	"strings"
+	"sync"
+	"time"
+
+	"github.com/cockroachdb/errors"
+	grpc_retry "github.com/grpc-ecosystem/go-grpc-middleware/retry"
+	"google.golang.org/grpc"
+	"google.golang.org/grpc/backoff"
+	"google.golang.org/grpc/codes"
+	"google.golang.org/grpc/credentials"
+	"google.golang.org/grpc/credentials/insecure"
+	"google.golang.org/grpc/keepalive"
+)
+
+var regexValidScheme = regexp.MustCompile(`^https?:\/\/`)
+
+// DefaultGrpcOpts is GRPC options for milvus client.
+var DefaultGrpcOpts = []grpc.DialOption{
+	grpc.WithBlock(),
+	grpc.WithKeepaliveParams(keepalive.ClientParameters{
+		Time:                5 * time.Second,
+		Timeout:             10 * time.Second,
+		PermitWithoutStream: true,
+	}),
+	grpc.WithConnectParams(grpc.ConnectParams{
+		Backoff: backoff.Config{
+			BaseDelay:  100 * time.Millisecond,
+			Multiplier: 1.6,
+			Jitter:     0.2,
+			MaxDelay:   3 * time.Second,
+		},
+		MinConnectTimeout: 3 * time.Second,
+	}),
+}
+
+// Config for milvus client.
+type Config struct {
+	Address       string // Remote address, "localhost:19530".
+	Username      string // Username for auth.
+	Password      string // Password for auth.
+	DBName        string // DBName for this client.
+	EnableTLSAuth bool   // Enable TLS Auth for transport security.
+
+	DialOptions []grpc.DialOption // Dial options for GRPC.
+
+	parsedAddress *url.URL
+}
+
+// Copy a new config, dialOption may shared with old config.
+func (c *Config) Copy() Config {
+	newConfig := Config{
+		Address:       c.Address,
+		Username:      c.Username,
+		Password:      c.Password,
+		DBName:        c.DBName,
+		EnableTLSAuth: c.EnableTLSAuth,
+	}
+	newConfig.DialOptions = make([]grpc.DialOption, 0, len(c.DialOptions))
+	newConfig.DialOptions = append(newConfig.DialOptions, c.DialOptions...)
+	return newConfig
+}
+
+func (c *Config) parse() error {
+	// Prepend default fake tcp:// scheme for remote address.
+	address := c.Address
+	if !regexValidScheme.MatchString(address) {
+		address = fmt.Sprintf("tcp://%s", address)
+	}
+
+	remoteURL, err := url.Parse(address)
+	if err != nil {
+		return errors.Wrap(err, "milvus address parse fail")
+	}
+	// Remote Host should never be empty.
+	if remoteURL.Host == "" {
+		return errors.New("empty remote host of milvus address")
+	}
+	// Use DBName in remote url path.
+	if c.DBName == "" {
+		c.DBName = strings.TrimLeft(remoteURL.Path, "/")
+	}
+	// Always enable tls auth for https remote url.
+	if remoteURL.Scheme == "https" {
+		c.EnableTLSAuth = true
+	}
+	c.parsedAddress = remoteURL
+	return nil
+}
+
+// Get parsed remote milvus address, should be called after parse was called.
+func (c *Config) getParsedAddress() string {
+	return c.parsedAddress.Host
+}
+
+// syncConfig
+type syncConfig struct {
+	sync.Mutex
+	cfg Config
+}
+
+// useDatabase change the inner db name.
+func (c *syncConfig) useDatabase(dbName string) {
+	c.Lock()
+	defer c.Unlock()
+	c.cfg.DBName = dbName
+}
+
+// Get parsed remote milvus address, should be called after parse was called.
+func (c *syncConfig) getParsedAddress() string {
+	c.Lock()
+	defer c.Unlock()
+	return c.cfg.getParsedAddress()
+}
+
+// Get parsed grpc dial options, should be called after parse was called.
+func (c *syncConfig) getDialOption() []grpc.DialOption {
+	c.Lock()
+	defer c.Unlock()
+
+	options := c.cfg.DialOptions
+	if c.cfg.DialOptions == nil {
+		// Add default connection options.
+		options = make([]grpc.DialOption, len(DefaultGrpcOpts))
+		copy(options, DefaultGrpcOpts)
+	}
+
+	// Construct dial option.
+	if c.cfg.EnableTLSAuth {
+		options = append(options, grpc.WithTransportCredentials(credentials.NewTLS(&tls.Config{})))
+	} else {
+		options = append(options, grpc.WithTransportCredentials(insecure.NewCredentials()))
+	}
+
+	options = append(options,
+		grpc.WithChainUnaryInterceptor(grpc_retry.UnaryClientInterceptor(
+			grpc_retry.WithMax(6),
+			grpc_retry.WithBackoff(func(attempt uint) time.Duration {
+				return 60 * time.Millisecond * time.Duration(math.Pow(3, float64(attempt)))
+			}),
+			grpc_retry.WithCodes(codes.Unavailable, codes.ResourceExhausted)),
+			RetryOnRateLimitInterceptor(10, func(ctx context.Context, attempt uint) time.Duration {
+				return 10 * time.Millisecond * time.Duration(math.Pow(3, float64(attempt)))
+			}),
+		))
+
+	// Construct username:password field
+	if c.cfg.Username != "" && c.cfg.Password != "" {
+		options = append(options,
+			grpc.WithChainUnaryInterceptor(
+				createAuthenticationUnaryInterceptor(c.cfg.Username, c.cfg.Password),
+			),
+			grpc.WithStreamInterceptor(createAuthenticationStreamInterceptor(c.cfg.Username, c.cfg.Password)),
+		)
+	}
+
+	// Construct DBName field
+	dbNameGetter := func() string {
+		c.Lock()
+		defer c.Unlock()
+		return c.cfg.DBName
+	}
+
+	options = append(options,
+		grpc.WithChainUnaryInterceptor(
+			createDatabaseNameUnaryInterceptor(
+				dbNameGetter),
+		),
+		grpc.WithStreamInterceptor(createDatabaseNameStreamInterceptor(dbNameGetter)),
+	)
+	return options
+}
diff --git a/client/interceptor.go b/client/interceptor.go
index 1aa8b1c..795009c 100644
--- a/client/interceptor.go
+++ b/client/interceptor.go
@@ -9,24 +9,49 @@ import (
 	"google.golang.org/grpc/metadata"
 )
 
-// AuthenticationInterceptor appends credential into context metadata
-func AuthenticationInterceptor(ctx context.Context, username, password string) context.Context {
+// authenticationInterceptor appends credential into context metadata
+func authenticationInterceptor(ctx context.Context, username, password string) context.Context {
 	value := crypto.Base64Encode(fmt.Sprintf("%s:%s", username, password))
 	return metadata.AppendToOutgoingContext(ctx, "authorization", value)
 }
 
 // CreateAuthenticationUnaryInterceptor creates a unary interceptor for authentication
-func CreateAuthenticationUnaryInterceptor(username, password string) grpc.UnaryClientInterceptor {
+func createAuthenticationUnaryInterceptor(username, password string) grpc.UnaryClientInterceptor {
 	return func(ctx context.Context, method string, req, reply interface{}, cc *grpc.ClientConn, invoker grpc.UnaryInvoker, opts ...grpc.CallOption) error {
-		ctx = AuthenticationInterceptor(ctx, username, password)
+		ctx = authenticationInterceptor(ctx, username, password)
 		return invoker(ctx, method, req, reply, cc, opts...)
 	}
 }
 
-// CreateAuthenticationStreamInterceptor creates a stream interceptor for authentication
-func CreateAuthenticationStreamInterceptor(username, password string) grpc.StreamClientInterceptor {
+// createAuthenticationStreamInterceptor creates a stream interceptor for authentication
+func createAuthenticationStreamInterceptor(username, password string) grpc.StreamClientInterceptor {
 	return func(ctx context.Context, desc *grpc.StreamDesc, cc *grpc.ClientConn, method string, streamer grpc.Streamer, opts ...grpc.CallOption) (grpc.ClientStream, error) {
-		ctx = AuthenticationInterceptor(ctx, username, password)
+		ctx = authenticationInterceptor(ctx, username, password)
+		return streamer(ctx, desc, cc, method, opts...)
+	}
+}
+
+// databaseNameInterceptor appends the dbName into metadata.
+func databaseNameInterceptor(ctx context.Context, dbNameGetter func() string) context.Context {
+	dbname := dbNameGetter()
+	if dbname != "" {
+		ctx = metadata.AppendToOutgoingContext(ctx, "dbname", dbname)
+	}
+	return ctx
+}
+
+// createDatabaseNameInterceptor creates a unary interceptor for db name.
+func createDatabaseNameUnaryInterceptor(dbNameGetter func() string) grpc.UnaryClientInterceptor {
+	return func(ctx context.Context, method string, req, reply interface{}, cc *grpc.ClientConn, invoker grpc.UnaryInvoker, opts ...grpc.CallOption) error {
+		ctx = databaseNameInterceptor(ctx, dbNameGetter)
+		return invoker(ctx, method, req, reply, cc, opts...)
+	}
+}
+
+// createDatabaseNameStreamInterceptor creates a unary interceptor for db name.
+func createDatabaseNameStreamInterceptor(dbNameGetter func() string) grpc.StreamClientInterceptor {
+	return func(ctx context.Context, desc *grpc.StreamDesc, cc *grpc.ClientConn, method string, streamer grpc.Streamer, opts ...grpc.CallOption) (grpc.ClientStream, error) {
+		ctx = databaseNameInterceptor(ctx, dbNameGetter)
 		return streamer(ctx, desc, cc, method, opts...)
 	}
 }
diff --git a/docs/new_client.md b/docs/new_client.md
index efbfb7d..c024739 100644
--- a/docs/new_client.md
+++ b/docs/new_client.md
@@ -18,5 +18,7 @@ This is the "Constructor" method set (only one for current release) to obtain `C
 
 ```go
 ctx := context.Background()
-cli, err := client.NewGrpcClient(ctx, "localhost:19530")
+cli, err := client.NewClient(context.Background(), client.Config{
+		Address:  "localhost:19530",
+	})
 ```
diff --git a/entity/database.go b/entity/database.go
new file mode 100644
index 0000000..a354c6a
--- /dev/null
+++ b/entity/database.go
@@ -0,0 +1,22 @@
+package entity
+
+// Licensed to the LF AI & Data foundation under one
+// or more contributor license agreements. See the NOTICE file
+// distributed with this work for additional information
+// regarding copyright ownership. The ASF licenses this file
+// to you under the Apache License, Version 2.0 (the
+// "License"); you may not use this file except in compliance
+// with the License. You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+// Database represents a database in a remote Milvus cluster.
+type Database struct {
+	Name string // Database name.
+}
diff --git a/examples/README.md b/examples/README.md
index 8c64dd0..57fb6c9 100644
--- a/examples/README.md
+++ b/examples/README.md
@@ -7,3 +7,4 @@ here is some list to demonstrate the usage of `milvus-sdk-go`
 - [Index building](index/index.go) Index related creation/search example, time consumption compared as well
 - [Calculate Distance](calcdistance/calc_distance.go) Calculate distance between vectors. Both ids or raw vectors example are presented.
 - [Hello Milvus](hello_milvus/hello_milvus.go) Golang version of [hello_milvus](https://milvus.io/docs/v2.0.x/example_code.md)
+- [Use database](database/database.go) Create, use and drop database of Milvus, isolate your data in the unique Milvus cluster.
diff --git a/examples/auth/auth.go b/examples/auth/auth.go
index da53e7b..b1ee23a 100644
--- a/examples/auth/auth.go
+++ b/examples/auth/auth.go
@@ -22,7 +22,14 @@ const (
 func main() {
 	ctx := context.Background()
 	// create grpc client that tls is enabled
-	c, err := client.NewDefaultGrpcClientWithTLSAuth(ctx, addr, username, password)
+	c, err := client.NewClient(
+		ctx,
+		client.Config{
+			Address:  addr,
+			Username: username,
+			Password: password,
+		},
+	)
 	if err != nil {
 		log.Fatal("failed to connect:", err)
 	}
diff --git a/examples/basic/basic.go b/examples/basic/basic.go
index f2d866b..0ccd172 100644
--- a/examples/basic/basic.go
+++ b/examples/basic/basic.go
@@ -19,7 +19,9 @@ func main() {
 	ctx, cancel := context.WithTimeout(ctx, 2*time.Second)
 	defer cancel()
 
-	c, err := client.NewGrpcClient(ctx, milvusAddr)
+	c, err := client.NewClient(ctx, client.Config{
+		Address: milvusAddr,
+	})
 	if err != nil {
 		// handling error and exit, to make example simple here
 		log.Fatal("failed to connect to milvus:", err.Error())
diff --git a/examples/calcdistance/calc_distance.go b/examples/calcdistance/calc_distance.go
index cf3e173..7a19f7d 100644
--- a/examples/calcdistance/calc_distance.go
+++ b/examples/calcdistance/calc_distance.go
@@ -22,7 +22,9 @@ func main() {
 	ctx, cancel := context.WithTimeout(ctx, 2*time.Second)
 	defer cancel()
 
-	c, err := client.NewGrpcClient(ctx, milvusAddr)
+	c, err := client.NewClient(ctx, client.Config{
+		Address: milvusAddr,
+	})
 	if err != nil {
 		// handling error and exit, to make example simple here
 		log.Fatal("failed to connect to milvus:", err.Error())
@@ -117,8 +119,8 @@ func main() {
 	}
 	log.Println("load collection completed")
 
-	//searchFilm := films[0] // use first fim to search
-	//vector := entity.FloatVector(searchFilm.Vector[:])
+	// searchFilm := films[0] // use first fim to search
+	// vector := entity.FloatVector(searchFilm.Vector[:])
 	// Use flat search param
 
 	r, err := c.CalcDistance(ctx, collectionName, []string{}, entity.L2, entity.NewColumnFloatVector("Vector", 8, vectors[0:2]), entity.NewColumnFloatVector("Vector", 8, vectors[3:4]))
diff --git a/examples/database/database.go b/examples/database/database.go
new file mode 100644
index 0000000..80cc659
--- /dev/null
+++ b/examples/database/database.go
@@ -0,0 +1,168 @@
+package main
+
+import (
+	"context"
+	"fmt"
+	"log"
+
+	"github.com/milvus-io/milvus-sdk-go/v2/client"
+	"github.com/milvus-io/milvus-sdk-go/v2/entity"
+)
+
+func main() {
+	fmt.Println("using default database...")
+	ctx := context.Background()
+	cfg := client.Config{
+		Address:  "localhost:19530",
+		Username: "root",
+		Password: "Milvus",
+	}
+	clientDefault := mustConnect(ctx, cfg)
+	defer clientDefault.Close()
+	createCollection(ctx, clientDefault, "col1")
+	if err := clientDefault.CreateDatabase(ctx, "db1"); err != nil {
+		log.Fatalf("create db1 failed, %+v", err)
+	}
+	dbs, err := clientDefault.ListDatabases(ctx)
+	if err != nil {
+		log.Fatalf("list database failed: %+v", err)
+	}
+	if len(dbs) != 2 {
+		log.Fatalf("unexpected db number, %d, %+v", len(dbs), dbs)
+	}
+
+	fmt.Println("using db1...")
+	cfg.DBName = ""
+	cfg.Address = "localhost:19530/db1"
+	clientDB1 := mustConnect(ctx, cfg)
+	defer clientDB1.Close()
+	createCollection(ctx, clientDB1, "col1")
+	createCollection(ctx, clientDB1, "col2")
+
+	fmt.Println("create collection col1 in default database...")
+	collections, err := clientDefault.ListCollections(ctx)
+	if err != nil {
+		log.Fatalf("list on default database failed: %+v", err)
+	}
+	if len(collections) != 1 {
+		log.Fatalf("unexpected count of default database, %d", len(collections))
+	}
+	if collections[0].Name != "col1" {
+		log.Fatalf("unexpected db name of default database, %s", collections[0].Name)
+	}
+
+	fmt.Println("create collection col1, col2 in db1...")
+	collections, err = clientDB1.ListCollections(ctx)
+	if err != nil {
+		log.Fatalf("list on db1 failed: %+v", err)
+	}
+	if len(collections) != 2 {
+		log.Fatalf("unexpected count of db1, %d", len(collections))
+	}
+
+	fmt.Println("create db2...")
+	if err := clientDefault.CreateDatabase(ctx, "db2"); err != nil {
+		log.Fatalf("create db2 failed, %+v", err)
+	}
+	dbs, err = clientDefault.ListDatabases(ctx)
+	if err != nil {
+		log.Fatalf("list database failed: %+v", err)
+	}
+	if len(dbs) != 3 {
+		log.Fatalf("unexpected db number, %d, %+v", len(dbs), dbs)
+	}
+
+	fmt.Println("connect to db2 with existing client...")
+	clientDefault.UsingDatabase(ctx, "db2")
+	fmt.Println("create and drop collection on db2...")
+	createCollection(ctx, clientDefault, "col1")
+	if err := clientDefault.DropCollection(ctx, "col1"); err != nil {
+		log.Fatalf("drop col1 at db2 failed, %+v", err)
+	}
+
+	clientDefault.UsingDatabase(ctx, "")
+	fmt.Println("drop db2: drop empty database should be always success...")
+	if err := clientDefault.DropDatabase(ctx, "db2"); err != nil {
+		log.Fatalf("drop db2 failed, %+v", err)
+	}
+	dbs, err = clientDefault.ListDatabases(ctx)
+	if err != nil {
+		log.Fatalf("list database failed: %+v", err)
+	}
+	if len(dbs) != 2 {
+		log.Fatalf("unexpected db number, %d, %+v", len(dbs), dbs)
+	}
+
+	fmt.Println("drop db1: drop non-empty database should be fail...")
+	if err := clientDB1.DropDatabase(ctx, "db1"); err == nil {
+		log.Fatalf("drop an non empty db success")
+	}
+
+	fmt.Println("drop db1: drop all collection before drop db...")
+	if err := clientDB1.DropCollection(ctx, "col1"); err != nil {
+		log.Fatalf("drop col1 at db1 failed, %+v", err)
+	}
+	if err := clientDB1.DropCollection(ctx, "col2"); err != nil {
+		log.Fatalf("drop col2 at db1 failed, %+v", err)
+	}
+	if err := clientDB1.DropDatabase(ctx, "db1"); err != nil {
+		log.Fatalf("drop db1 failed, %+v", err)
+	}
+
+	fmt.Println("Drop collection on default database...")
+	if err := clientDefault.DropCollection(ctx, "col1"); err != nil {
+		log.Fatalf("drop col1 at default db failed, %+v", err)
+	}
+
+	fmt.Println("drop default: drop default database should be fail...")
+	if err := clientDefault.DropDatabase(ctx, ""); err == nil {
+		log.Fatalf("drop an default db success")
+	}
+	dbs, err = clientDefault.ListDatabases(ctx)
+	if err != nil {
+		log.Fatalf("list database failed: %+v", err)
+	}
+	if len(dbs) != 1 {
+		log.Fatalf("unexpected db number, %d, %+v", len(dbs), dbs)
+	}
+}
+
+func mustConnect(ctx context.Context, cfg client.Config) client.Client {
+	c, err := client.NewClient(ctx, cfg)
+	if err != nil {
+		log.Fatalf("connect to database failed, %+v", err)
+	}
+	return c
+}
+
+func createCollection(ctx context.Context, c client.Client, collectionName string) {
+	schema := &entity.Schema{
+		CollectionName: collectionName,
+		Description:    "database demo",
+		AutoID:         false,
+		Fields: []*entity.Field{
+			{
+				Name:       "id",
+				DataType:   entity.FieldTypeInt64,
+				PrimaryKey: true,
+				AutoID:     false,
+			},
+			{
+				Name:       "data",
+				DataType:   entity.FieldTypeDouble,
+				PrimaryKey: false,
+				AutoID:     false,
+			},
+			{
+				Name:     "embeddings",
+				DataType: entity.FieldTypeFloatVector,
+				TypeParams: map[string]string{
+					entity.TypeParamDim: fmt.Sprintf("%d", 128),
+				},
+			},
+		},
+	}
+	if err := c.CreateCollection(ctx, schema, entity.DefaultShardNumber); err != nil {
+		log.Fatalf("create collection failed, err: %v", err)
+	}
+}
diff --git a/examples/hello_milvus/hello_milvus.go b/examples/hello_milvus/hello_milvus.go
index 94a9d13..436435c 100644
--- a/examples/hello_milvus/hello_milvus.go
+++ b/examples/hello_milvus/hello_milvus.go
@@ -25,7 +25,9 @@ func main() {
 	ctx := context.Background()
 
 	fmt.Printf(msgFmt, "start connecting to Milvus")
-	c, err := client.NewGrpcClient(ctx, milvusAddr)
+	c, err := client.NewClient(ctx, client.Config{
+		Address: milvusAddr,
+	})
 	if err != nil {
 		log.Fatalf("failed to connect to milvus, err: %v", err)
 	}
diff --git a/examples/index/index.go b/examples/index/index.go
index dcad0de..bccceb2 100644
--- a/examples/index/index.go
+++ b/examples/index/index.go
@@ -23,7 +23,9 @@ func main() {
 	ctx, cancel := context.WithTimeout(ctx, 2*time.Second)
 	defer cancel()
 
-	c, err := client.NewGrpcClient(ctx, milvusAddr)
+	c, err := client.NewClient(ctx, client.Config{
+		Address: milvusAddr,
+	})
 	if err != nil {
 		// handling error and exit, to make example simple here
 		log.Fatal("failed to connect to milvus:", err.Error())
diff --git a/examples/insert/insert.go b/examples/insert/insert.go
index 0bfe83a..e0e2fc0 100644
--- a/examples/insert/insert.go
+++ b/examples/insert/insert.go
@@ -23,7 +23,9 @@ func main() {
 	ctx, cancel := context.WithTimeout(ctx, 2*time.Second)
 	defer cancel()
 
-	c, err := client.NewGrpcClient(ctx, milvusAddr)
+	c, err := client.NewClient(ctx, client.Config{
+		Address: milvusAddr,
+	})
 	if err != nil {
 		// handling error and exit, to make example simple here
 		log.Fatal("failed to connect to milvus:", err.Error())
diff --git a/examples/query/query.go b/examples/query/query.go
index 05177d1..d9b5a0c 100644
--- a/examples/query/query.go
+++ b/examples/query/query.go
@@ -25,7 +25,9 @@ func main() {
 	ctx := context.Background()
 
 	fmt.Printf(msgFmt, "start connecting to Milvus")
-	c, err := client.NewGrpcClient(ctx, milvusAddr)
+	c, err := client.NewClient(ctx, client.Config{
+		Address: milvusAddr,
+	})
 	if err != nil {
 		log.Fatalf("failed to connect to milvus, err: %v", err)
 	}
diff --git a/examples/tls/tls.go b/examples/tls/tls.go
index 9850d33..1cd885e 100644
--- a/examples/tls/tls.go
+++ b/examples/tls/tls.go
@@ -51,7 +51,10 @@ func main() {
 		MinVersion:   tls.VersionTLS13,
 	})
 
-	c, err := client.NewGrpcClient(ctx, milvusAddr, grpc.WithTransportCredentials(creds))
+	c, err := client.NewClient(ctx, client.Config{
+		Address:     milvusAddr,
+		DialOptions: []grpc.DialOption{grpc.WithTransportCredentials(creds)},
+	})
 	if err != nil {
 		// handling error and exit, to make example simple here
 		log.Fatal("failed to connect to milvus:", err.Error())
diff --git a/examples/varchar/varchar_pk.go b/examples/varchar/varchar_pk.go
index 248bfe7..b3c4954 100644
--- a/examples/varchar/varchar_pk.go
+++ b/examples/varchar/varchar_pk.go
@@ -26,7 +26,9 @@ func main() {
 	ctx := context.Background()
 
 	fmt.Printf(msgFmt, "start connecting to Milvus")
-	c, err := client.NewGrpcClient(ctx, milvusAddr)
+	c, err := client.NewClient(ctx, client.Config{
+		Address: milvusAddr,
+	})
 	if err != nil {
 		log.Fatalf("failed to connect to milvus, err: %v", err)
 	}
diff --git a/go.mod b/go.mod
index 3271a85..510d38c 100644
--- a/go.mod
+++ b/go.mod
@@ -3,17 +3,17 @@ module github.com/milvus-io/milvus-sdk-go/v2
 go 1.17
 
 require (
+	github.com/cockroachdb/errors v1.9.1
+	github.com/go-faker/faker/v4 v4.1.0
 	github.com/golang/protobuf v1.5.2
 	github.com/grpc-ecosystem/go-grpc-middleware v1.3.0
-	github.com/milvus-io/milvus-proto/go-api v0.0.0-20230324025554-5bbe6698c2b0
+	github.com/milvus-io/milvus-proto/go-api v0.0.0-20230426074830-1b5e205e11ab
 	github.com/stretchr/testify v1.8.1
 	google.golang.org/grpc v1.48.0
 	google.golang.org/grpc/examples v0.0.0-20220617181431-3e7b97febc7f
-	google.golang.org/protobuf v1.28.1
 )
 
 require (
-	github.com/cockroachdb/errors v1.9.1 // indirect
 	github.com/cockroachdb/logtags v0.0.0-20211118104740-dabe8e521a4f // indirect
 	github.com/cockroachdb/redact v1.1.3 // indirect
 	github.com/davecgh/go-spew v1.1.1 // indirect
@@ -24,12 +24,11 @@ require (
 	github.com/pkg/errors v0.9.1 // indirect
 	github.com/pmezard/go-difflib v1.0.0 // indirect
 	github.com/rogpeppe/go-internal v1.8.1 // indirect
-	github.com/samber/lo v1.37.0 // indirect
 	github.com/stretchr/objx v0.5.0 // indirect
-	golang.org/x/exp v0.0.0-20220303212507-bbda1eaf7a17 // indirect
 	golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd // indirect
 	golang.org/x/sys v0.0.0-20220422013727-9388b58f7150 // indirect
 	golang.org/x/text v0.3.7 // indirect
 	google.golang.org/genproto v0.0.0-20220503193339-ba3ae3f07e29 // indirect
+	google.golang.org/protobuf v1.28.1 // indirect
 	gopkg.in/yaml.v3 v3.0.1 // indirect
 )
diff --git a/go.sum b/go.sum
index 36f978e..4aa9f80 100644
--- a/go.sum
+++ b/go.sum
@@ -57,7 +57,10 @@ github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeME
 github.com/gin-contrib/sse v0.0.0-20190301062529-5545eab6dad3/go.mod h1:VJ0WA2NBN22VlZ2dKZQPAPnyWw5XTlK1KymzLKsr59s=
 github.com/gin-gonic/gin v1.4.0/go.mod h1:OW2EZn3DO8Ln9oIKOvM++LBO+5UPHJJDH72/q/3rZdM=
 github.com/go-check/check v0.0.0-20180628173108-788fd7840127/go.mod h1:9ES+weclKsC9YodN5RgxqK/VD9HM9JsCSh7rNhMZE98=
+github.com/go-errors/errors v1.0.1 h1:LUHzmkK3GUKUrL/1gfBUxAHzcev3apQlezX/+O7ma6w=
 github.com/go-errors/errors v1.0.1/go.mod h1:f4zRHt4oKfwPJE5k8C9vpYG+aDHdBFUsgrm6/TyX73Q=
+github.com/go-faker/faker/v4 v4.1.0 h1:ffuWmpDrducIUOO0QSKSF5Q2dxAht+dhsT9FvVHhPEI=
+github.com/go-faker/faker/v4 v4.1.0/go.mod h1:uuNc0PSRxF8nMgjGrrrU4Nw5cF30Jc6Kd0/FUTTYbhg=
 github.com/go-kit/kit v0.9.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as=
 github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk=
 github.com/go-martini/martini v0.0.0-20170121215854-22fa46961aab/go.mod h1:/P9AEU963A2AYjv4d1V5eVL1CQbEJq6aCNHDDjibzu8=
@@ -154,16 +157,8 @@ 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 v0.0.0-20221019080323-84e9fa2f9e45 h1:QxGQqRtJbbdMf/jxodjYaTW8ZcqdyPDsuhIb9Y2jnwk=
-github.com/milvus-io/milvus-proto/go-api v0.0.0-20221019080323-84e9fa2f9e45/go.mod h1:148qnlmZ0Fdm1Fq+Mj/OW2uDoEP25g3mjh0vMGtkgmk=
-github.com/milvus-io/milvus-proto/go-api v0.0.0-20230105121931-9f9303dcc729 h1:hsb1ifdNe3qlXi1YY5dWPPzWMNZmnqe5uunYPYK3gd0=
-github.com/milvus-io/milvus-proto/go-api v0.0.0-20230105121931-9f9303dcc729/go.mod h1:148qnlmZ0Fdm1Fq+Mj/OW2uDoEP25g3mjh0vMGtkgmk=
-github.com/milvus-io/milvus-proto/go-api v0.0.0-20230301092744-7efc6eec15fd h1:9ilgTEqZSdEPbJKSrRGB1TIHTaF7DqVDIwn8/azcaBk=
-github.com/milvus-io/milvus-proto/go-api v0.0.0-20230301092744-7efc6eec15fd/go.mod h1:148qnlmZ0Fdm1Fq+Mj/OW2uDoEP25g3mjh0vMGtkgmk=
-github.com/milvus-io/milvus-proto/go-api v0.0.0-20230303054144-16f081962572 h1:QOimLfT1VwjH9jUkq2SN3uT/WGfgcD4pYBoFOGUMwjM=
-github.com/milvus-io/milvus-proto/go-api v0.0.0-20230303054144-16f081962572/go.mod h1:148qnlmZ0Fdm1Fq+Mj/OW2uDoEP25g3mjh0vMGtkgmk=
-github.com/milvus-io/milvus-proto/go-api v0.0.0-20230324025554-5bbe6698c2b0 h1:k1VzMLw+FO6G4JUDIliN0+8UBnOGwSeiJUlO6/iJrXg=
-github.com/milvus-io/milvus-proto/go-api v0.0.0-20230324025554-5bbe6698c2b0/go.mod h1:148qnlmZ0Fdm1Fq+Mj/OW2uDoEP25g3mjh0vMGtkgmk=
+github.com/milvus-io/milvus-proto/go-api v0.0.0-20230426074830-1b5e205e11ab h1:8XkGKAgMvftgknyMoow5DmIjHZ28A7+U5tECi+MqJmk=
+github.com/milvus-io/milvus-proto/go-api v0.0.0-20230426074830-1b5e205e11ab/go.mod h1:148qnlmZ0Fdm1Fq+Mj/OW2uDoEP25g3mjh0vMGtkgmk=
 github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0=
 github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y=
 github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q=
@@ -180,6 +175,7 @@ github.com/onsi/ginkgo v1.10.3/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+
 github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY=
 github.com/opentracing/opentracing-go v1.1.0/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o=
 github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic=
+github.com/pingcap/errors v0.11.4 h1:lFuQV/oaUMGcD2tqt+01ROSmJs75VG1ToEOkZIZ4nE4=
 github.com/pingcap/errors v0.11.4/go.mod h1:Oi8TUi2kEtXXLMJk9l1cGmz20kV3TaQ0usTwv5KuLY8=
 github.com/pkg/diff v0.0.0-20210226163009-20ebb0f2a09e/go.mod h1:pJLUxLENpZxwdsKMEsNbx1VGcRFpLqf3715MtcvvzbA=
 github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
@@ -194,8 +190,6 @@ github.com/rogpeppe/go-internal v1.8.1 h1:geMPLpDpQOgVyCg5z5GoRwLHepNdb71NXb67XF
 github.com/rogpeppe/go-internal v1.8.1/go.mod h1:JeRgkft04UBgHMgCIwADu4Pn6Mtm5d4nPKWu0nJ5d+o=
 github.com/russross/blackfriday v1.5.2/go.mod h1:JO/DiYxRf+HjHt06OyowR9PTA263kcR/rfWxYHBV53g=
 github.com/ryanuber/columnize v2.1.0+incompatible/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts=
-github.com/samber/lo v1.37.0 h1:XjVcB8g6tgUp8rsPsJ2CvhClfImrpL04YpQHXeHPhRw=
-github.com/samber/lo v1.37.0/go.mod h1:9vaz2O4o8oOnK23pd2TrXufcbdbJIa3b6cstBWKpopA=
 github.com/schollz/closestmatch v2.1.0+incompatible/go.mod h1:RtP1ddjLong6gTkbtmuhtR2uUrrJOpYzYRvbcPAid+g=
 github.com/sergi/go-diff v1.0.0/go.mod h1:0CfEIISq7TuYL3j771MWULgwwjU+GofnZX9QAmXWZgo=
 github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc=
@@ -232,8 +226,6 @@ github.com/valyala/fasthttp v1.6.0/go.mod h1:FstJa9V+Pj9vQ7OJie2qMHdwemEDaDiSdBn
 github.com/valyala/fasttemplate v1.0.1/go.mod h1:UQGH1tvbgY+Nz5t2n7tXsz52dQxojPUpymEIMZ47gx8=
 github.com/valyala/fasttemplate v1.2.1/go.mod h1:KHLXt3tVN2HBp8eijSv/kGJopbvo7S+qRAEEKiv+SiQ=
 github.com/valyala/tcplisten v0.0.0-20161114210144-ceec8f93295a/go.mod h1:v3UYOV9WzVtRmSR+PDvWpU/qWl4Wa5LApYYX4ZtKbio=
-github.com/vektra/mockery v1.1.2 h1:uc0Yn67rJpjt8U/mAZimdCKn9AeA97BOkjpmtBSlfP4=
-github.com/vektra/mockery v1.1.2/go.mod h1:VcfZjKaFOPO+MpN4ZvwPjs4c48lkq1o3Ym8yHZJu0jU=
 github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f/go.mod h1:N2zxlSyiKSe5eX1tZViRH5QA0qijqEDrYZiPEAiq3wU=
 github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415/go.mod h1:GwrjFmJcFw6At/Gs6z4yjiIwzuJ1/+UwLxMQDVQXShQ=
 github.com/xeipuuv/gojsonschema v1.2.0/go.mod h1:anYRn/JVcOK2ZgGU+IjEV4nwlhoK5sQluxsYJ78Id3Y=
@@ -242,7 +234,6 @@ github.com/yalp/jsonpath v0.0.0-20180802001716-5cc68e5049a0/go.mod h1:/LWChgwKmv
 github.com/yudai/gojsondiff v1.0.0/go.mod h1:AY32+k2cwILAkW1fbgxQ5mUmMiZFgLIV+FBNExI05xg=
 github.com/yudai/golcs v0.0.0-20170316035057-ecda9a501e82/go.mod h1:lgjkn3NuSvDfVJdfcVVdX+jpBxNmX4rDAzaS45IcYoM=
 github.com/yudai/pp v2.0.1+incompatible/go.mod h1:PuxR/8QJ7cyCkFp/aUDS+JY727OFEZkTdatxwunjIkc=
-github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
 github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
 github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
 github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k=
@@ -259,15 +250,12 @@ golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPh
 golang.org/x/crypto v0.0.0-20210322153248-0c34fe9e7dc2/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4=
 golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc=
 golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
-golang.org/x/exp v0.0.0-20220303212507-bbda1eaf7a17 h1:3MTrJm4PyNL9NBqvYDSj3DHl46qQakyfqfWo4jgfaEM=
-golang.org/x/exp v0.0.0-20220303212507-bbda1eaf7a17/go.mod h1:lgLbSvA5ygNOMpwM/9anMpWVlVJ7Z+cHWq/eFuinpGE=
 golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE=
 golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU=
 golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc=
 golang.org/x/lint v0.0.0-20210508222113-6edffad5e616/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY=
 golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg=
 golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
-golang.org/x/mod v0.3.0 h1:RM4zey1++hCTbCVQfnWeKs9/IEsaBLA8vTkd0WVtmH4=
 golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
 golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
 golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
@@ -348,9 +336,7 @@ golang.org/x/tools v0.0.0-20190328211700-ab21143f2384/go.mod h1:LCzVGOaR6xXOjkQ3
 golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q=
 golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
 golang.org/x/tools v0.0.0-20200130002326-2f3ba24bd6e7/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28=
-golang.org/x/tools v0.0.0-20200323144430-8dcfad9e016e/go.mod h1:Sl4aGygMT6LrqrWclx+PTx3U+LnKx/seiNR+3G19Ar8=
 golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE=
-golang.org/x/tools v0.0.0-20210106214847-113979e3529a h1:CB3a9Nez8M13wwlr/E2YtwoU+qYHKfC+JrDa45RXXoQ=
 golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA=
 golang.org/x/tools v0.1.3/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk=
 golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
@@ -400,9 +386,9 @@ google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQ
 google.golang.org/protobuf v1.28.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I=
 google.golang.org/protobuf v1.28.1 h1:d0NfwRgPtno5B1Wa6L2DAG+KivqkdutMf1UhdNx175w=
 google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I=
-gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM=
 gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
 gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
+gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15 h1:YR8cESwS4TdDjEe65xsg0ogRM/Nc3DYOhEAlW+xobZo=
 gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
 gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI=
 gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys=
diff --git a/mocks/MilvusServiceServer.go b/mocks/MilvusServiceServer.go
index 7ac2b92..9eaaebd 100644
--- a/mocks/MilvusServiceServer.go
+++ b/mocks/MilvusServiceServer.go
@@ -1,4 +1,4 @@
-// Code generated by mockery v2.16.0. DO NOT EDIT.
+// Code generated by mockery v2.26.1. DO NOT EDIT.
 
 package mocks
 
@@ -30,6 +30,10 @@ func (_m *MilvusServiceServer) AlterAlias(_a0 context.Context, _a1 *milvuspb.Alt
 	ret := _m.Called(_a0, _a1)
 
 	var r0 *commonpb.Status
+	var r1 error
+	if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.AlterAliasRequest) (*commonpb.Status, error)); ok {
+		return rf(_a0, _a1)
+	}
 	if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.AlterAliasRequest) *commonpb.Status); ok {
 		r0 = rf(_a0, _a1)
 	} else {
@@ -38,7 +42,6 @@ func (_m *MilvusServiceServer) AlterAlias(_a0 context.Context, _a1 *milvuspb.Alt
 		}
 	}
 
-	var r1 error
 	if rf, ok := ret.Get(1).(func(context.Context, *milvuspb.AlterAliasRequest) error); ok {
 		r1 = rf(_a0, _a1)
 	} else {
@@ -54,8 +57,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)}
 }
@@ -72,11 +75,20 @@ func (_c *MilvusServiceServer_AlterAlias_Call) Return(_a0 *commonpb.Status, _a1
 	return _c
 }
 
+func (_c *MilvusServiceServer_AlterAlias_Call) RunAndReturn(run func(context.Context, *milvuspb.AlterAliasRequest) (*commonpb.Status, error)) *MilvusServiceServer_AlterAlias_Call {
+	_c.Call.Return(run)
+	return _c
+}
+
 // AlterCollection provides a mock function with given fields: _a0, _a1
 func (_m *MilvusServiceServer) AlterCollection(_a0 context.Context, _a1 *milvuspb.AlterCollectionRequest) (*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.AlterCollectionRequest) (*commonpb.Status, error)); ok {
+		return rf(_a0, _a1)
+	}
 	if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.AlterCollectionRequest) *commonpb.Status); ok {
 		r0 = rf(_a0, _a1)
 	} else {
@@ -85,7 +97,6 @@ func (_m *MilvusServiceServer) AlterCollection(_a0 context.Context, _a1 *milvusp
 		}
 	}
 
-	var r1 error
 	if rf, ok := ret.Get(1).(func(context.Context, *milvuspb.AlterCollectionRequest) error); ok {
 		r1 = rf(_a0, _a1)
 	} else {
@@ -101,8 +112,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)}
 }
@@ -119,11 +130,20 @@ func (_c *MilvusServiceServer_AlterCollection_Call) Return(_a0 *commonpb.Status,
 	return _c
 }
 
+func (_c *MilvusServiceServer_AlterCollection_Call) RunAndReturn(run func(context.Context, *milvuspb.AlterCollectionRequest) (*commonpb.Status, error)) *MilvusServiceServer_AlterCollection_Call {
+	_c.Call.Return(run)
+	return _c
+}
+
 // CalcDistance provides a mock function with given fields: _a0, _a1
 func (_m *MilvusServiceServer) CalcDistance(_a0 context.Context, _a1 *milvuspb.CalcDistanceRequest) (*milvuspb.CalcDistanceResults, error) {
 	ret := _m.Called(_a0, _a1)
 
 	var r0 *milvuspb.CalcDistanceResults
+	var r1 error
+	if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.CalcDistanceRequest) (*milvuspb.CalcDistanceResults, error)); ok {
+		return rf(_a0, _a1)
+	}
 	if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.CalcDistanceRequest) *milvuspb.CalcDistanceResults); ok {
 		r0 = rf(_a0, _a1)
 	} else {
@@ -132,7 +152,6 @@ func (_m *MilvusServiceServer) CalcDistance(_a0 context.Context, _a1 *milvuspb.C
 		}
 	}
 
-	var r1 error
 	if rf, ok := ret.Get(1).(func(context.Context, *milvuspb.CalcDistanceRequest) error); ok {
 		r1 = rf(_a0, _a1)
 	} else {
@@ -148,8 +167,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)}
 }
@@ -166,11 +185,20 @@ func (_c *MilvusServiceServer_CalcDistance_Call) Return(_a0 *milvuspb.CalcDistan
 	return _c
 }
 
+func (_c *MilvusServiceServer_CalcDistance_Call) RunAndReturn(run func(context.Context, *milvuspb.CalcDistanceRequest) (*milvuspb.CalcDistanceResults, error)) *MilvusServiceServer_CalcDistance_Call {
+	_c.Call.Return(run)
+	return _c
+}
+
 // CheckHealth provides a mock function with given fields: _a0, _a1
 func (_m *MilvusServiceServer) CheckHealth(_a0 context.Context, _a1 *milvuspb.CheckHealthRequest) (*milvuspb.CheckHealthResponse, error) {
 	ret := _m.Called(_a0, _a1)
 
 	var r0 *milvuspb.CheckHealthResponse
+	var r1 error
+	if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.CheckHealthRequest) (*milvuspb.CheckHealthResponse, error)); ok {
+		return rf(_a0, _a1)
+	}
 	if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.CheckHealthRequest) *milvuspb.CheckHealthResponse); ok {
 		r0 = rf(_a0, _a1)
 	} else {
@@ -179,7 +207,6 @@ func (_m *MilvusServiceServer) CheckHealth(_a0 context.Context, _a1 *milvuspb.Ch
 		}
 	}
 
-	var r1 error
 	if rf, ok := ret.Get(1).(func(context.Context, *milvuspb.CheckHealthRequest) error); ok {
 		r1 = rf(_a0, _a1)
 	} else {
@@ -195,8 +222,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)}
 }
@@ -213,11 +240,20 @@ func (_c *MilvusServiceServer_CheckHealth_Call) Return(_a0 *milvuspb.CheckHealth
 	return _c
 }
 
+func (_c *MilvusServiceServer_CheckHealth_Call) RunAndReturn(run func(context.Context, *milvuspb.CheckHealthRequest) (*milvuspb.CheckHealthResponse, error)) *MilvusServiceServer_CheckHealth_Call {
+	_c.Call.Return(run)
+	return _c
+}
+
 // CreateAlias provides a mock function with given fields: _a0, _a1
 func (_m *MilvusServiceServer) CreateAlias(_a0 context.Context, _a1 *milvuspb.CreateAliasRequest) (*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.CreateAliasRequest) (*commonpb.Status, error)); ok {
+		return rf(_a0, _a1)
+	}
 	if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.CreateAliasRequest) *commonpb.Status); ok {
 		r0 = rf(_a0, _a1)
 	} else {
@@ -226,7 +262,6 @@ func (_m *MilvusServiceServer) CreateAlias(_a0 context.Context, _a1 *milvuspb.Cr
 		}
 	}
 
-	var r1 error
 	if rf, ok := ret.Get(1).(func(context.Context, *milvuspb.CreateAliasRequest) error); ok {
 		r1 = rf(_a0, _a1)
 	} else {
@@ -242,8 +277,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)}
 }
@@ -260,11 +295,20 @@ func (_c *MilvusServiceServer_CreateAlias_Call) Return(_a0 *commonpb.Status, _a1
 	return _c
 }
 
+func (_c *MilvusServiceServer_CreateAlias_Call) RunAndReturn(run func(context.Context, *milvuspb.CreateAliasRequest) (*commonpb.Status, error)) *MilvusServiceServer_CreateAlias_Call {
+	_c.Call.Return(run)
+	return _c
+}
+
 // CreateCollection provides a mock function with given fields: _a0, _a1
 func (_m *MilvusServiceServer) CreateCollection(_a0 context.Context, _a1 *milvuspb.CreateCollectionRequest) (*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.CreateCollectionRequest) (*commonpb.Status, error)); ok {
+		return rf(_a0, _a1)
+	}
 	if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.CreateCollectionRequest) *commonpb.Status); ok {
 		r0 = rf(_a0, _a1)
 	} else {
@@ -273,7 +317,6 @@ func (_m *MilvusServiceServer) CreateCollection(_a0 context.Context, _a1 *milvus
 		}
 	}
 
-	var r1 error
 	if rf, ok := ret.Get(1).(func(context.Context, *milvuspb.CreateCollectionRequest) error); ok {
 		r1 = rf(_a0, _a1)
 	} else {
@@ -289,8 +332,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)}
 }
@@ -307,11 +350,20 @@ func (_c *MilvusServiceServer_CreateCollection_Call) Return(_a0 *commonpb.Status
 	return _c
 }
 
+func (_c *MilvusServiceServer_CreateCollection_Call) RunAndReturn(run func(context.Context, *milvuspb.CreateCollectionRequest) (*commonpb.Status, error)) *MilvusServiceServer_CreateCollection_Call {
+	_c.Call.Return(run)
+	return _c
+}
+
 // CreateCredential provides a mock function with given fields: _a0, _a1
 func (_m *MilvusServiceServer) CreateCredential(_a0 context.Context, _a1 *milvuspb.CreateCredentialRequest) (*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.CreateCredentialRequest) (*commonpb.Status, error)); ok {
+		return rf(_a0, _a1)
+	}
 	if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.CreateCredentialRequest) *commonpb.Status); ok {
 		r0 = rf(_a0, _a1)
 	} else {
@@ -320,7 +372,6 @@ func (_m *MilvusServiceServer) CreateCredential(_a0 context.Context, _a1 *milvus
 		}
 	}
 
-	var r1 error
 	if rf, ok := ret.Get(1).(func(context.Context, *milvuspb.CreateCredentialRequest) error); ok {
 		r1 = rf(_a0, _a1)
 	} else {
@@ -336,8 +387,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)}
 }
@@ -354,11 +405,75 @@ func (_c *MilvusServiceServer_CreateCredential_Call) Return(_a0 *commonpb.Status
 	return _c
 }
 
+func (_c *MilvusServiceServer_CreateCredential_Call) RunAndReturn(run func(context.Context, *milvuspb.CreateCredentialRequest) (*commonpb.Status, error)) *MilvusServiceServer_CreateCredential_Call {
+	_c.Call.Return(run)
+	return _c
+}
+
+// CreateDatabase provides a mock function with given fields: _a0, _a1
+func (_m *MilvusServiceServer) CreateDatabase(_a0 context.Context, _a1 *milvuspb.CreateDatabaseRequest) (*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.CreateDatabaseRequest) (*commonpb.Status, error)); ok {
+		return rf(_a0, _a1)
+	}
+	if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.CreateDatabaseRequest) *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.CreateDatabaseRequest) error); ok {
+		r1 = rf(_a0, _a1)
+	} else {
+		r1 = ret.Error(1)
+	}
+
+	return r0, r1
+}
+
+// MilvusServiceServer_CreateDatabase_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CreateDatabase'
+type MilvusServiceServer_CreateDatabase_Call struct {
+	*mock.Call
+}
+
+// CreateDatabase is a helper method to define mock.On call
+//   - _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)}
+}
+
+func (_c *MilvusServiceServer_CreateDatabase_Call) Run(run func(_a0 context.Context, _a1 *milvuspb.CreateDatabaseRequest)) *MilvusServiceServer_CreateDatabase_Call {
+	_c.Call.Run(func(args mock.Arguments) {
+		run(args[0].(context.Context), args[1].(*milvuspb.CreateDatabaseRequest))
+	})
+	return _c
+}
+
+func (_c *MilvusServiceServer_CreateDatabase_Call) Return(_a0 *commonpb.Status, _a1 error) *MilvusServiceServer_CreateDatabase_Call {
+	_c.Call.Return(_a0, _a1)
+	return _c
+}
+
+func (_c *MilvusServiceServer_CreateDatabase_Call) RunAndReturn(run func(context.Context, *milvuspb.CreateDatabaseRequest) (*commonpb.Status, error)) *MilvusServiceServer_CreateDatabase_Call {
+	_c.Call.Return(run)
+	return _c
+}
+
 // CreateIndex provides a mock function with given fields: _a0, _a1
 func (_m *MilvusServiceServer) CreateIndex(_a0 context.Context, _a1 *milvuspb.CreateIndexRequest) (*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.CreateIndexRequest) (*commonpb.Status, error)); ok {
+		return rf(_a0, _a1)
+	}
 	if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.CreateIndexRequest) *commonpb.Status); ok {
 		r0 = rf(_a0, _a1)
 	} else {
@@ -367,7 +482,6 @@ func (_m *MilvusServiceServer) CreateIndex(_a0 context.Context, _a1 *milvuspb.Cr
 		}
 	}
 
-	var r1 error
 	if rf, ok := ret.Get(1).(func(context.Context, *milvuspb.CreateIndexRequest) error); ok {
 		r1 = rf(_a0, _a1)
 	} else {
@@ -383,8 +497,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)}
 }
@@ -401,11 +515,20 @@ func (_c *MilvusServiceServer_CreateIndex_Call) Return(_a0 *commonpb.Status, _a1
 	return _c
 }
 
+func (_c *MilvusServiceServer_CreateIndex_Call) RunAndReturn(run func(context.Context, *milvuspb.CreateIndexRequest) (*commonpb.Status, error)) *MilvusServiceServer_CreateIndex_Call {
+	_c.Call.Return(run)
+	return _c
+}
+
 // CreatePartition provides a mock function with given fields: _a0, _a1
 func (_m *MilvusServiceServer) CreatePartition(_a0 context.Context, _a1 *milvuspb.CreatePartitionRequest) (*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.CreatePartitionRequest) (*commonpb.Status, error)); ok {
+		return rf(_a0, _a1)
+	}
 	if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.CreatePartitionRequest) *commonpb.Status); ok {
 		r0 = rf(_a0, _a1)
 	} else {
@@ -414,7 +537,6 @@ func (_m *MilvusServiceServer) CreatePartition(_a0 context.Context, _a1 *milvusp
 		}
 	}
 
-	var r1 error
 	if rf, ok := ret.Get(1).(func(context.Context, *milvuspb.CreatePartitionRequest) error); ok {
 		r1 = rf(_a0, _a1)
 	} else {
@@ -430,8 +552,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)}
 }
@@ -448,11 +570,20 @@ func (_c *MilvusServiceServer_CreatePartition_Call) Return(_a0 *commonpb.Status,
 	return _c
 }
 
+func (_c *MilvusServiceServer_CreatePartition_Call) RunAndReturn(run func(context.Context, *milvuspb.CreatePartitionRequest) (*commonpb.Status, error)) *MilvusServiceServer_CreatePartition_Call {
+	_c.Call.Return(run)
+	return _c
+}
+
 // CreateResourceGroup provides a mock function with given fields: _a0, _a1
 func (_m *MilvusServiceServer) CreateResourceGroup(_a0 context.Context, _a1 *milvuspb.CreateResourceGroupRequest) (*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.CreateResourceGroupRequest) (*commonpb.Status, error)); ok {
+		return rf(_a0, _a1)
+	}
 	if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.CreateResourceGroupRequest) *commonpb.Status); ok {
 		r0 = rf(_a0, _a1)
 	} else {
@@ -461,7 +592,6 @@ func (_m *MilvusServiceServer) CreateResourceGroup(_a0 context.Context, _a1 *mil
 		}
 	}
 
-	var r1 error
 	if rf, ok := ret.Get(1).(func(context.Context, *milvuspb.CreateResourceGroupRequest) error); ok {
 		r1 = rf(_a0, _a1)
 	} else {
@@ -477,8 +607,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)}
 }
@@ -495,11 +625,20 @@ func (_c *MilvusServiceServer_CreateResourceGroup_Call) Return(_a0 *commonpb.Sta
 	return _c
 }
 
+func (_c *MilvusServiceServer_CreateResourceGroup_Call) RunAndReturn(run func(context.Context, *milvuspb.CreateResourceGroupRequest) (*commonpb.Status, error)) *MilvusServiceServer_CreateResourceGroup_Call {
+	_c.Call.Return(run)
+	return _c
+}
+
 // CreateRole provides a mock function with given fields: _a0, _a1
 func (_m *MilvusServiceServer) CreateRole(_a0 context.Context, _a1 *milvuspb.CreateRoleRequest) (*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.CreateRoleRequest) (*commonpb.Status, error)); ok {
+		return rf(_a0, _a1)
+	}
 	if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.CreateRoleRequest) *commonpb.Status); ok {
 		r0 = rf(_a0, _a1)
 	} else {
@@ -508,7 +647,6 @@ func (_m *MilvusServiceServer) CreateRole(_a0 context.Context, _a1 *milvuspb.Cre
 		}
 	}
 
-	var r1 error
 	if rf, ok := ret.Get(1).(func(context.Context, *milvuspb.CreateRoleRequest) error); ok {
 		r1 = rf(_a0, _a1)
 	} else {
@@ -524,8 +662,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)}
 }
@@ -542,11 +680,20 @@ func (_c *MilvusServiceServer_CreateRole_Call) Return(_a0 *commonpb.Status, _a1
 	return _c
 }
 
+func (_c *MilvusServiceServer_CreateRole_Call) RunAndReturn(run func(context.Context, *milvuspb.CreateRoleRequest) (*commonpb.Status, error)) *MilvusServiceServer_CreateRole_Call {
+	_c.Call.Return(run)
+	return _c
+}
+
 // Delete provides a mock function with given fields: _a0, _a1
 func (_m *MilvusServiceServer) Delete(_a0 context.Context, _a1 *milvuspb.DeleteRequest) (*milvuspb.MutationResult, error) {
 	ret := _m.Called(_a0, _a1)
 
 	var r0 *milvuspb.MutationResult
+	var r1 error
+	if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.DeleteRequest) (*milvuspb.MutationResult, error)); ok {
+		return rf(_a0, _a1)
+	}
 	if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.DeleteRequest) *milvuspb.MutationResult); ok {
 		r0 = rf(_a0, _a1)
 	} else {
@@ -555,7 +702,6 @@ func (_m *MilvusServiceServer) Delete(_a0 context.Context, _a1 *milvuspb.DeleteR
 		}
 	}
 
-	var r1 error
 	if rf, ok := ret.Get(1).(func(context.Context, *milvuspb.DeleteRequest) error); ok {
 		r1 = rf(_a0, _a1)
 	} else {
@@ -571,8 +717,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)}
 }
@@ -589,11 +735,20 @@ func (_c *MilvusServiceServer_Delete_Call) Return(_a0 *milvuspb.MutationResult,
 	return _c
 }
 
+func (_c *MilvusServiceServer_Delete_Call) RunAndReturn(run func(context.Context, *milvuspb.DeleteRequest) (*milvuspb.MutationResult, error)) *MilvusServiceServer_Delete_Call {
+	_c.Call.Return(run)
+	return _c
+}
+
 // DeleteCredential provides a mock function with given fields: _a0, _a1
 func (_m *MilvusServiceServer) DeleteCredential(_a0 context.Context, _a1 *milvuspb.DeleteCredentialRequest) (*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.DeleteCredentialRequest) (*commonpb.Status, error)); ok {
+		return rf(_a0, _a1)
+	}
 	if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.DeleteCredentialRequest) *commonpb.Status); ok {
 		r0 = rf(_a0, _a1)
 	} else {
@@ -602,7 +757,6 @@ func (_m *MilvusServiceServer) DeleteCredential(_a0 context.Context, _a1 *milvus
 		}
 	}
 
-	var r1 error
 	if rf, ok := ret.Get(1).(func(context.Context, *milvuspb.DeleteCredentialRequest) error); ok {
 		r1 = rf(_a0, _a1)
 	} else {
@@ -618,8 +772,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)}
 }
@@ -636,11 +790,20 @@ func (_c *MilvusServiceServer_DeleteCredential_Call) Return(_a0 *commonpb.Status
 	return _c
 }
 
+func (_c *MilvusServiceServer_DeleteCredential_Call) RunAndReturn(run func(context.Context, *milvuspb.DeleteCredentialRequest) (*commonpb.Status, error)) *MilvusServiceServer_DeleteCredential_Call {
+	_c.Call.Return(run)
+	return _c
+}
+
 // DescribeCollection provides a mock function with given fields: _a0, _a1
 func (_m *MilvusServiceServer) DescribeCollection(_a0 context.Context, _a1 *milvuspb.DescribeCollectionRequest) (*milvuspb.DescribeCollectionResponse, error) {
 	ret := _m.Called(_a0, _a1)
 
 	var r0 *milvuspb.DescribeCollectionResponse
+	var r1 error
+	if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.DescribeCollectionRequest) (*milvuspb.DescribeCollectionResponse, error)); ok {
+		return rf(_a0, _a1)
+	}
 	if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.DescribeCollectionRequest) *milvuspb.DescribeCollectionResponse); ok {
 		r0 = rf(_a0, _a1)
 	} else {
@@ -649,7 +812,6 @@ func (_m *MilvusServiceServer) DescribeCollection(_a0 context.Context, _a1 *milv
 		}
 	}
 
-	var r1 error
 	if rf, ok := ret.Get(1).(func(context.Context, *milvuspb.DescribeCollectionRequest) error); ok {
 		r1 = rf(_a0, _a1)
 	} else {
@@ -665,8 +827,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)}
 }
@@ -683,11 +845,20 @@ func (_c *MilvusServiceServer_DescribeCollection_Call) Return(_a0 *milvuspb.Desc
 	return _c
 }
 
+func (_c *MilvusServiceServer_DescribeCollection_Call) RunAndReturn(run func(context.Context, *milvuspb.DescribeCollectionRequest) (*milvuspb.DescribeCollectionResponse, error)) *MilvusServiceServer_DescribeCollection_Call {
+	_c.Call.Return(run)
+	return _c
+}
+
 // DescribeIndex provides a mock function with given fields: _a0, _a1
 func (_m *MilvusServiceServer) DescribeIndex(_a0 context.Context, _a1 *milvuspb.DescribeIndexRequest) (*milvuspb.DescribeIndexResponse, error) {
 	ret := _m.Called(_a0, _a1)
 
 	var r0 *milvuspb.DescribeIndexResponse
+	var r1 error
+	if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.DescribeIndexRequest) (*milvuspb.DescribeIndexResponse, error)); ok {
+		return rf(_a0, _a1)
+	}
 	if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.DescribeIndexRequest) *milvuspb.DescribeIndexResponse); ok {
 		r0 = rf(_a0, _a1)
 	} else {
@@ -696,7 +867,6 @@ func (_m *MilvusServiceServer) DescribeIndex(_a0 context.Context, _a1 *milvuspb.
 		}
 	}
 
-	var r1 error
 	if rf, ok := ret.Get(1).(func(context.Context, *milvuspb.DescribeIndexRequest) error); ok {
 		r1 = rf(_a0, _a1)
 	} else {
@@ -712,8 +882,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)}
 }
@@ -730,11 +900,20 @@ func (_c *MilvusServiceServer_DescribeIndex_Call) Return(_a0 *milvuspb.DescribeI
 	return _c
 }
 
+func (_c *MilvusServiceServer_DescribeIndex_Call) RunAndReturn(run func(context.Context, *milvuspb.DescribeIndexRequest) (*milvuspb.DescribeIndexResponse, error)) *MilvusServiceServer_DescribeIndex_Call {
+	_c.Call.Return(run)
+	return _c
+}
+
 // DescribeResourceGroup provides a mock function with given fields: _a0, _a1
 func (_m *MilvusServiceServer) DescribeResourceGroup(_a0 context.Context, _a1 *milvuspb.DescribeResourceGroupRequest) (*milvuspb.DescribeResourceGroupResponse, error) {
 	ret := _m.Called(_a0, _a1)
 
 	var r0 *milvuspb.DescribeResourceGroupResponse
+	var r1 error
+	if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.DescribeResourceGroupRequest) (*milvuspb.DescribeResourceGroupResponse, error)); ok {
+		return rf(_a0, _a1)
+	}
 	if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.DescribeResourceGroupRequest) *milvuspb.DescribeResourceGroupResponse); ok {
 		r0 = rf(_a0, _a1)
 	} else {
@@ -743,7 +922,6 @@ func (_m *MilvusServiceServer) DescribeResourceGroup(_a0 context.Context, _a1 *m
 		}
 	}
 
-	var r1 error
 	if rf, ok := ret.Get(1).(func(context.Context, *milvuspb.DescribeResourceGroupRequest) error); ok {
 		r1 = rf(_a0, _a1)
 	} else {
@@ -759,8 +937,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)}
 }
@@ -777,11 +955,20 @@ func (_c *MilvusServiceServer_DescribeResourceGroup_Call) Return(_a0 *milvuspb.D
 	return _c
 }
 
+func (_c *MilvusServiceServer_DescribeResourceGroup_Call) RunAndReturn(run func(context.Context, *milvuspb.DescribeResourceGroupRequest) (*milvuspb.DescribeResourceGroupResponse, error)) *MilvusServiceServer_DescribeResourceGroup_Call {
+	_c.Call.Return(run)
+	return _c
+}
+
 // DropAlias provides a mock function with given fields: _a0, _a1
 func (_m *MilvusServiceServer) DropAlias(_a0 context.Context, _a1 *milvuspb.DropAliasRequest) (*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.DropAliasRequest) (*commonpb.Status, error)); ok {
+		return rf(_a0, _a1)
+	}
 	if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.DropAliasRequest) *commonpb.Status); ok {
 		r0 = rf(_a0, _a1)
 	} else {
@@ -790,7 +977,6 @@ func (_m *MilvusServiceServer) DropAlias(_a0 context.Context, _a1 *milvuspb.Drop
 		}
 	}
 
-	var r1 error
 	if rf, ok := ret.Get(1).(func(context.Context, *milvuspb.DropAliasRequest) error); ok {
 		r1 = rf(_a0, _a1)
 	} else {
@@ -806,8 +992,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)}
 }
@@ -824,11 +1010,20 @@ func (_c *MilvusServiceServer_DropAlias_Call) Return(_a0 *commonpb.Status, _a1 e
 	return _c
 }
 
+func (_c *MilvusServiceServer_DropAlias_Call) RunAndReturn(run func(context.Context, *milvuspb.DropAliasRequest) (*commonpb.Status, error)) *MilvusServiceServer_DropAlias_Call {
+	_c.Call.Return(run)
+	return _c
+}
+
 // DropCollection provides a mock function with given fields: _a0, _a1
 func (_m *MilvusServiceServer) DropCollection(_a0 context.Context, _a1 *milvuspb.DropCollectionRequest) (*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.DropCollectionRequest) (*commonpb.Status, error)); ok {
+		return rf(_a0, _a1)
+	}
 	if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.DropCollectionRequest) *commonpb.Status); ok {
 		r0 = rf(_a0, _a1)
 	} else {
@@ -837,7 +1032,6 @@ func (_m *MilvusServiceServer) DropCollection(_a0 context.Context, _a1 *milvuspb
 		}
 	}
 
-	var r1 error
 	if rf, ok := ret.Get(1).(func(context.Context, *milvuspb.DropCollectionRequest) error); ok {
 		r1 = rf(_a0, _a1)
 	} else {
@@ -853,8 +1047,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)}
 }
@@ -871,11 +1065,75 @@ func (_c *MilvusServiceServer_DropCollection_Call) Return(_a0 *commonpb.Status,
 	return _c
 }
 
+func (_c *MilvusServiceServer_DropCollection_Call) RunAndReturn(run func(context.Context, *milvuspb.DropCollectionRequest) (*commonpb.Status, error)) *MilvusServiceServer_DropCollection_Call {
+	_c.Call.Return(run)
+	return _c
+}
+
+// DropDatabase provides a mock function with given fields: _a0, _a1
+func (_m *MilvusServiceServer) DropDatabase(_a0 context.Context, _a1 *milvuspb.DropDatabaseRequest) (*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.DropDatabaseRequest) (*commonpb.Status, error)); ok {
+		return rf(_a0, _a1)
+	}
+	if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.DropDatabaseRequest) *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.DropDatabaseRequest) error); ok {
+		r1 = rf(_a0, _a1)
+	} else {
+		r1 = ret.Error(1)
+	}
+
+	return r0, r1
+}
+
+// MilvusServiceServer_DropDatabase_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DropDatabase'
+type MilvusServiceServer_DropDatabase_Call struct {
+	*mock.Call
+}
+
+// DropDatabase is a helper method to define mock.On call
+//   - _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)}
+}
+
+func (_c *MilvusServiceServer_DropDatabase_Call) Run(run func(_a0 context.Context, _a1 *milvuspb.DropDatabaseRequest)) *MilvusServiceServer_DropDatabase_Call {
+	_c.Call.Run(func(args mock.Arguments) {
+		run(args[0].(context.Context), args[1].(*milvuspb.DropDatabaseRequest))
+	})
+	return _c
+}
+
+func (_c *MilvusServiceServer_DropDatabase_Call) Return(_a0 *commonpb.Status, _a1 error) *MilvusServiceServer_DropDatabase_Call {
+	_c.Call.Return(_a0, _a1)
+	return _c
+}
+
+func (_c *MilvusServiceServer_DropDatabase_Call) RunAndReturn(run func(context.Context, *milvuspb.DropDatabaseRequest) (*commonpb.Status, error)) *MilvusServiceServer_DropDatabase_Call {
+	_c.Call.Return(run)
+	return _c
+}
+
 // DropIndex provides a mock function with given fields: _a0, _a1
 func (_m *MilvusServiceServer) DropIndex(_a0 context.Context, _a1 *milvuspb.DropIndexRequest) (*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.DropIndexRequest) (*commonpb.Status, error)); ok {
+		return rf(_a0, _a1)
+	}
 	if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.DropIndexRequest) *commonpb.Status); ok {
 		r0 = rf(_a0, _a1)
 	} else {
@@ -884,7 +1142,6 @@ func (_m *MilvusServiceServer) DropIndex(_a0 context.Context, _a1 *milvuspb.Drop
 		}
 	}
 
-	var r1 error
 	if rf, ok := ret.Get(1).(func(context.Context, *milvuspb.DropIndexRequest) error); ok {
 		r1 = rf(_a0, _a1)
 	} else {
@@ -900,8 +1157,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)}
 }
@@ -918,11 +1175,20 @@ func (_c *MilvusServiceServer_DropIndex_Call) Return(_a0 *commonpb.Status, _a1 e
 	return _c
 }
 
+func (_c *MilvusServiceServer_DropIndex_Call) RunAndReturn(run func(context.Context, *milvuspb.DropIndexRequest) (*commonpb.Status, error)) *MilvusServiceServer_DropIndex_Call {
+	_c.Call.Return(run)
+	return _c
+}
+
 // DropPartition provides a mock function with given fields: _a0, _a1
 func (_m *MilvusServiceServer) DropPartition(_a0 context.Context, _a1 *milvuspb.DropPartitionRequest) (*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.DropPartitionRequest) (*commonpb.Status, error)); ok {
+		return rf(_a0, _a1)
+	}
 	if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.DropPartitionRequest) *commonpb.Status); ok {
 		r0 = rf(_a0, _a1)
 	} else {
@@ -931,7 +1197,6 @@ func (_m *MilvusServiceServer) DropPartition(_a0 context.Context, _a1 *milvuspb.
 		}
 	}
 
-	var r1 error
 	if rf, ok := ret.Get(1).(func(context.Context, *milvuspb.DropPartitionRequest) error); ok {
 		r1 = rf(_a0, _a1)
 	} else {
@@ -947,8 +1212,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)}
 }
@@ -965,11 +1230,20 @@ func (_c *MilvusServiceServer_DropPartition_Call) Return(_a0 *commonpb.Status, _
 	return _c
 }
 
+func (_c *MilvusServiceServer_DropPartition_Call) RunAndReturn(run func(context.Context, *milvuspb.DropPartitionRequest) (*commonpb.Status, error)) *MilvusServiceServer_DropPartition_Call {
+	_c.Call.Return(run)
+	return _c
+}
+
 // DropResourceGroup provides a mock function with given fields: _a0, _a1
 func (_m *MilvusServiceServer) DropResourceGroup(_a0 context.Context, _a1 *milvuspb.DropResourceGroupRequest) (*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.DropResourceGroupRequest) (*commonpb.Status, error)); ok {
+		return rf(_a0, _a1)
+	}
 	if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.DropResourceGroupRequest) *commonpb.Status); ok {
 		r0 = rf(_a0, _a1)
 	} else {
@@ -978,7 +1252,6 @@ func (_m *MilvusServiceServer) DropResourceGroup(_a0 context.Context, _a1 *milvu
 		}
 	}
 
-	var r1 error
 	if rf, ok := ret.Get(1).(func(context.Context, *milvuspb.DropResourceGroupRequest) error); ok {
 		r1 = rf(_a0, _a1)
 	} else {
@@ -994,8 +1267,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)}
 }
@@ -1012,11 +1285,20 @@ func (_c *MilvusServiceServer_DropResourceGroup_Call) Return(_a0 *commonpb.Statu
 	return _c
 }
 
+func (_c *MilvusServiceServer_DropResourceGroup_Call) RunAndReturn(run func(context.Context, *milvuspb.DropResourceGroupRequest) (*commonpb.Status, error)) *MilvusServiceServer_DropResourceGroup_Call {
+	_c.Call.Return(run)
+	return _c
+}
+
 // DropRole provides a mock function with given fields: _a0, _a1
 func (_m *MilvusServiceServer) DropRole(_a0 context.Context, _a1 *milvuspb.DropRoleRequest) (*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.DropRoleRequest) (*commonpb.Status, error)); ok {
+		return rf(_a0, _a1)
+	}
 	if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.DropRoleRequest) *commonpb.Status); ok {
 		r0 = rf(_a0, _a1)
 	} else {
@@ -1025,7 +1307,6 @@ func (_m *MilvusServiceServer) DropRole(_a0 context.Context, _a1 *milvuspb.DropR
 		}
 	}
 
-	var r1 error
 	if rf, ok := ret.Get(1).(func(context.Context, *milvuspb.DropRoleRequest) error); ok {
 		r1 = rf(_a0, _a1)
 	} else {
@@ -1041,8 +1322,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)}
 }
@@ -1059,11 +1340,20 @@ func (_c *MilvusServiceServer_DropRole_Call) Return(_a0 *commonpb.Status, _a1 er
 	return _c
 }
 
+func (_c *MilvusServiceServer_DropRole_Call) RunAndReturn(run func(context.Context, *milvuspb.DropRoleRequest) (*commonpb.Status, error)) *MilvusServiceServer_DropRole_Call {
+	_c.Call.Return(run)
+	return _c
+}
+
 // Dummy provides a mock function with given fields: _a0, _a1
 func (_m *MilvusServiceServer) Dummy(_a0 context.Context, _a1 *milvuspb.DummyRequest) (*milvuspb.DummyResponse, error) {
 	ret := _m.Called(_a0, _a1)
 
 	var r0 *milvuspb.DummyResponse
+	var r1 error
+	if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.DummyRequest) (*milvuspb.DummyResponse, error)); ok {
+		return rf(_a0, _a1)
+	}
 	if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.DummyRequest) *milvuspb.DummyResponse); ok {
 		r0 = rf(_a0, _a1)
 	} else {
@@ -1072,7 +1362,6 @@ func (_m *MilvusServiceServer) Dummy(_a0 context.Context, _a1 *milvuspb.DummyReq
 		}
 	}
 
-	var r1 error
 	if rf, ok := ret.Get(1).(func(context.Context, *milvuspb.DummyRequest) error); ok {
 		r1 = rf(_a0, _a1)
 	} else {
@@ -1088,8 +1377,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)}
 }
@@ -1106,11 +1395,20 @@ func (_c *MilvusServiceServer_Dummy_Call) Return(_a0 *milvuspb.DummyResponse, _a
 	return _c
 }
 
+func (_c *MilvusServiceServer_Dummy_Call) RunAndReturn(run func(context.Context, *milvuspb.DummyRequest) (*milvuspb.DummyResponse, error)) *MilvusServiceServer_Dummy_Call {
+	_c.Call.Return(run)
+	return _c
+}
+
 // Flush provides a mock function with given fields: _a0, _a1
 func (_m *MilvusServiceServer) Flush(_a0 context.Context, _a1 *milvuspb.FlushRequest) (*milvuspb.FlushResponse, error) {
 	ret := _m.Called(_a0, _a1)
 
 	var r0 *milvuspb.FlushResponse
+	var r1 error
+	if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.FlushRequest) (*milvuspb.FlushResponse, error)); ok {
+		return rf(_a0, _a1)
+	}
 	if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.FlushRequest) *milvuspb.FlushResponse); ok {
 		r0 = rf(_a0, _a1)
 	} else {
@@ -1119,7 +1417,6 @@ func (_m *MilvusServiceServer) Flush(_a0 context.Context, _a1 *milvuspb.FlushReq
 		}
 	}
 
-	var r1 error
 	if rf, ok := ret.Get(1).(func(context.Context, *milvuspb.FlushRequest) error); ok {
 		r1 = rf(_a0, _a1)
 	} else {
@@ -1135,8 +1432,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)}
 }
@@ -1153,11 +1450,20 @@ func (_c *MilvusServiceServer_Flush_Call) Return(_a0 *milvuspb.FlushResponse, _a
 	return _c
 }
 
+func (_c *MilvusServiceServer_Flush_Call) RunAndReturn(run func(context.Context, *milvuspb.FlushRequest) (*milvuspb.FlushResponse, error)) *MilvusServiceServer_Flush_Call {
+	_c.Call.Return(run)
+	return _c
+}
+
 // FlushAll provides a mock function with given fields: _a0, _a1
 func (_m *MilvusServiceServer) FlushAll(_a0 context.Context, _a1 *milvuspb.FlushAllRequest) (*milvuspb.FlushAllResponse, error) {
 	ret := _m.Called(_a0, _a1)
 
 	var r0 *milvuspb.FlushAllResponse
+	var r1 error
+	if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.FlushAllRequest) (*milvuspb.FlushAllResponse, error)); ok {
+		return rf(_a0, _a1)
+	}
 	if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.FlushAllRequest) *milvuspb.FlushAllResponse); ok {
 		r0 = rf(_a0, _a1)
 	} else {
@@ -1166,7 +1472,6 @@ func (_m *MilvusServiceServer) FlushAll(_a0 context.Context, _a1 *milvuspb.Flush
 		}
 	}
 
-	var r1 error
 	if rf, ok := ret.Get(1).(func(context.Context, *milvuspb.FlushAllRequest) error); ok {
 		r1 = rf(_a0, _a1)
 	} else {
@@ -1182,8 +1487,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)}
 }
@@ -1200,11 +1505,20 @@ func (_c *MilvusServiceServer_FlushAll_Call) Return(_a0 *milvuspb.FlushAllRespon
 	return _c
 }
 
+func (_c *MilvusServiceServer_FlushAll_Call) RunAndReturn(run func(context.Context, *milvuspb.FlushAllRequest) (*milvuspb.FlushAllResponse, error)) *MilvusServiceServer_FlushAll_Call {
+	_c.Call.Return(run)
+	return _c
+}
+
 // GetCollectionStatistics provides a mock function with given fields: _a0, _a1
 func (_m *MilvusServiceServer) GetCollectionStatistics(_a0 context.Context, _a1 *milvuspb.GetCollectionStatisticsRequest) (*milvuspb.GetCollectionStatisticsResponse, error) {
 	ret := _m.Called(_a0, _a1)
 
 	var r0 *milvuspb.GetCollectionStatisticsResponse
+	var r1 error
+	if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.GetCollectionStatisticsRequest) (*milvuspb.GetCollectionStatisticsResponse, error)); ok {
+		return rf(_a0, _a1)
+	}
 	if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.GetCollectionStatisticsRequest) *milvuspb.GetCollectionStatisticsResponse); ok {
 		r0 = rf(_a0, _a1)
 	} else {
@@ -1213,7 +1527,6 @@ func (_m *MilvusServiceServer) GetCollectionStatistics(_a0 context.Context, _a1
 		}
 	}
 
-	var r1 error
 	if rf, ok := ret.Get(1).(func(context.Context, *milvuspb.GetCollectionStatisticsRequest) error); ok {
 		r1 = rf(_a0, _a1)
 	} else {
@@ -1229,8 +1542,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)}
 }
@@ -1247,11 +1560,20 @@ func (_c *MilvusServiceServer_GetCollectionStatistics_Call) Return(_a0 *milvuspb
 	return _c
 }
 
+func (_c *MilvusServiceServer_GetCollectionStatistics_Call) RunAndReturn(run func(context.Context, *milvuspb.GetCollectionStatisticsRequest) (*milvuspb.GetCollectionStatisticsResponse, error)) *MilvusServiceServer_GetCollectionStatistics_Call {
+	_c.Call.Return(run)
+	return _c
+}
+
 // GetCompactionState provides a mock function with given fields: _a0, _a1
 func (_m *MilvusServiceServer) GetCompactionState(_a0 context.Context, _a1 *milvuspb.GetCompactionStateRequest) (*milvuspb.GetCompactionStateResponse, error) {
 	ret := _m.Called(_a0, _a1)
 
 	var r0 *milvuspb.GetCompactionStateResponse
+	var r1 error
+	if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.GetCompactionStateRequest) (*milvuspb.GetCompactionStateResponse, error)); ok {
+		return rf(_a0, _a1)
+	}
 	if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.GetCompactionStateRequest) *milvuspb.GetCompactionStateResponse); ok {
 		r0 = rf(_a0, _a1)
 	} else {
@@ -1260,7 +1582,6 @@ func (_m *MilvusServiceServer) GetCompactionState(_a0 context.Context, _a1 *milv
 		}
 	}
 
-	var r1 error
 	if rf, ok := ret.Get(1).(func(context.Context, *milvuspb.GetCompactionStateRequest) error); ok {
 		r1 = rf(_a0, _a1)
 	} else {
@@ -1276,8 +1597,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)}
 }
@@ -1294,11 +1615,20 @@ func (_c *MilvusServiceServer_GetCompactionState_Call) Return(_a0 *milvuspb.GetC
 	return _c
 }
 
+func (_c *MilvusServiceServer_GetCompactionState_Call) RunAndReturn(run func(context.Context, *milvuspb.GetCompactionStateRequest) (*milvuspb.GetCompactionStateResponse, error)) *MilvusServiceServer_GetCompactionState_Call {
+	_c.Call.Return(run)
+	return _c
+}
+
 // GetCompactionStateWithPlans provides a mock function with given fields: _a0, _a1
 func (_m *MilvusServiceServer) GetCompactionStateWithPlans(_a0 context.Context, _a1 *milvuspb.GetCompactionPlansRequest) (*milvuspb.GetCompactionPlansResponse, error) {
 	ret := _m.Called(_a0, _a1)
 
 	var r0 *milvuspb.GetCompactionPlansResponse
+	var r1 error
+	if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.GetCompactionPlansRequest) (*milvuspb.GetCompactionPlansResponse, error)); ok {
+		return rf(_a0, _a1)
+	}
 	if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.GetCompactionPlansRequest) *milvuspb.GetCompactionPlansResponse); ok {
 		r0 = rf(_a0, _a1)
 	} else {
@@ -1307,7 +1637,6 @@ func (_m *MilvusServiceServer) GetCompactionStateWithPlans(_a0 context.Context,
 		}
 	}
 
-	var r1 error
 	if rf, ok := ret.Get(1).(func(context.Context, *milvuspb.GetCompactionPlansRequest) error); ok {
 		r1 = rf(_a0, _a1)
 	} else {
@@ -1323,8 +1652,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)}
 }
@@ -1341,11 +1670,20 @@ func (_c *MilvusServiceServer_GetCompactionStateWithPlans_Call) Return(_a0 *milv
 	return _c
 }
 
+func (_c *MilvusServiceServer_GetCompactionStateWithPlans_Call) RunAndReturn(run func(context.Context, *milvuspb.GetCompactionPlansRequest) (*milvuspb.GetCompactionPlansResponse, error)) *MilvusServiceServer_GetCompactionStateWithPlans_Call {
+	_c.Call.Return(run)
+	return _c
+}
+
 // GetComponentStates provides a mock function with given fields: _a0, _a1
 func (_m *MilvusServiceServer) GetComponentStates(_a0 context.Context, _a1 *milvuspb.GetComponentStatesRequest) (*milvuspb.ComponentStates, error) {
 	ret := _m.Called(_a0, _a1)
 
 	var r0 *milvuspb.ComponentStates
+	var r1 error
+	if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.GetComponentStatesRequest) (*milvuspb.ComponentStates, error)); ok {
+		return rf(_a0, _a1)
+	}
 	if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.GetComponentStatesRequest) *milvuspb.ComponentStates); ok {
 		r0 = rf(_a0, _a1)
 	} else {
@@ -1354,7 +1692,6 @@ func (_m *MilvusServiceServer) GetComponentStates(_a0 context.Context, _a1 *milv
 		}
 	}
 
-	var r1 error
 	if rf, ok := ret.Get(1).(func(context.Context, *milvuspb.GetComponentStatesRequest) error); ok {
 		r1 = rf(_a0, _a1)
 	} else {
@@ -1370,8 +1707,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)}
 }
@@ -1388,11 +1725,20 @@ func (_c *MilvusServiceServer_GetComponentStates_Call) Return(_a0 *milvuspb.Comp
 	return _c
 }
 
+func (_c *MilvusServiceServer_GetComponentStates_Call) RunAndReturn(run func(context.Context, *milvuspb.GetComponentStatesRequest) (*milvuspb.ComponentStates, error)) *MilvusServiceServer_GetComponentStates_Call {
+	_c.Call.Return(run)
+	return _c
+}
+
 // GetFlushAllState provides a mock function with given fields: _a0, _a1
 func (_m *MilvusServiceServer) GetFlushAllState(_a0 context.Context, _a1 *milvuspb.GetFlushAllStateRequest) (*milvuspb.GetFlushAllStateResponse, error) {
 	ret := _m.Called(_a0, _a1)
 
 	var r0 *milvuspb.GetFlushAllStateResponse
+	var r1 error
+	if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.GetFlushAllStateRequest) (*milvuspb.GetFlushAllStateResponse, error)); ok {
+		return rf(_a0, _a1)
+	}
 	if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.GetFlushAllStateRequest) *milvuspb.GetFlushAllStateResponse); ok {
 		r0 = rf(_a0, _a1)
 	} else {
@@ -1401,7 +1747,6 @@ func (_m *MilvusServiceServer) GetFlushAllState(_a0 context.Context, _a1 *milvus
 		}
 	}
 
-	var r1 error
 	if rf, ok := ret.Get(1).(func(context.Context, *milvuspb.GetFlushAllStateRequest) error); ok {
 		r1 = rf(_a0, _a1)
 	} else {
@@ -1417,8 +1762,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)}
 }
@@ -1435,11 +1780,20 @@ func (_c *MilvusServiceServer_GetFlushAllState_Call) Return(_a0 *milvuspb.GetFlu
 	return _c
 }
 
+func (_c *MilvusServiceServer_GetFlushAllState_Call) RunAndReturn(run func(context.Context, *milvuspb.GetFlushAllStateRequest) (*milvuspb.GetFlushAllStateResponse, error)) *MilvusServiceServer_GetFlushAllState_Call {
+	_c.Call.Return(run)
+	return _c
+}
+
 // GetFlushState provides a mock function with given fields: _a0, _a1
 func (_m *MilvusServiceServer) GetFlushState(_a0 context.Context, _a1 *milvuspb.GetFlushStateRequest) (*milvuspb.GetFlushStateResponse, error) {
 	ret := _m.Called(_a0, _a1)
 
 	var r0 *milvuspb.GetFlushStateResponse
+	var r1 error
+	if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.GetFlushStateRequest) (*milvuspb.GetFlushStateResponse, error)); ok {
+		return rf(_a0, _a1)
+	}
 	if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.GetFlushStateRequest) *milvuspb.GetFlushStateResponse); ok {
 		r0 = rf(_a0, _a1)
 	} else {
@@ -1448,7 +1802,6 @@ func (_m *MilvusServiceServer) GetFlushState(_a0 context.Context, _a1 *milvuspb.
 		}
 	}
 
-	var r1 error
 	if rf, ok := ret.Get(1).(func(context.Context, *milvuspb.GetFlushStateRequest) error); ok {
 		r1 = rf(_a0, _a1)
 	} else {
@@ -1464,8 +1817,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)}
 }
@@ -1482,11 +1835,20 @@ func (_c *MilvusServiceServer_GetFlushState_Call) Return(_a0 *milvuspb.GetFlushS
 	return _c
 }
 
+func (_c *MilvusServiceServer_GetFlushState_Call) RunAndReturn(run func(context.Context, *milvuspb.GetFlushStateRequest) (*milvuspb.GetFlushStateResponse, error)) *MilvusServiceServer_GetFlushState_Call {
+	_c.Call.Return(run)
+	return _c
+}
+
 // GetImportState provides a mock function with given fields: _a0, _a1
 func (_m *MilvusServiceServer) GetImportState(_a0 context.Context, _a1 *milvuspb.GetImportStateRequest) (*milvuspb.GetImportStateResponse, error) {
 	ret := _m.Called(_a0, _a1)
 
 	var r0 *milvuspb.GetImportStateResponse
+	var r1 error
+	if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.GetImportStateRequest) (*milvuspb.GetImportStateResponse, error)); ok {
+		return rf(_a0, _a1)
+	}
 	if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.GetImportStateRequest) *milvuspb.GetImportStateResponse); ok {
 		r0 = rf(_a0, _a1)
 	} else {
@@ -1495,7 +1857,6 @@ func (_m *MilvusServiceServer) GetImportState(_a0 context.Context, _a1 *milvuspb
 		}
 	}
 
-	var r1 error
 	if rf, ok := ret.Get(1).(func(context.Context, *milvuspb.GetImportStateRequest) error); ok {
 		r1 = rf(_a0, _a1)
 	} else {
@@ -1511,8 +1872,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)}
 }
@@ -1529,11 +1890,20 @@ func (_c *MilvusServiceServer_GetImportState_Call) Return(_a0 *milvuspb.GetImpor
 	return _c
 }
 
+func (_c *MilvusServiceServer_GetImportState_Call) RunAndReturn(run func(context.Context, *milvuspb.GetImportStateRequest) (*milvuspb.GetImportStateResponse, error)) *MilvusServiceServer_GetImportState_Call {
+	_c.Call.Return(run)
+	return _c
+}
+
 // GetIndexBuildProgress provides a mock function with given fields: _a0, _a1
 func (_m *MilvusServiceServer) GetIndexBuildProgress(_a0 context.Context, _a1 *milvuspb.GetIndexBuildProgressRequest) (*milvuspb.GetIndexBuildProgressResponse, error) {
 	ret := _m.Called(_a0, _a1)
 
 	var r0 *milvuspb.GetIndexBuildProgressResponse
+	var r1 error
+	if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.GetIndexBuildProgressRequest) (*milvuspb.GetIndexBuildProgressResponse, error)); ok {
+		return rf(_a0, _a1)
+	}
 	if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.GetIndexBuildProgressRequest) *milvuspb.GetIndexBuildProgressResponse); ok {
 		r0 = rf(_a0, _a1)
 	} else {
@@ -1542,7 +1912,6 @@ func (_m *MilvusServiceServer) GetIndexBuildProgress(_a0 context.Context, _a1 *m
 		}
 	}
 
-	var r1 error
 	if rf, ok := ret.Get(1).(func(context.Context, *milvuspb.GetIndexBuildProgressRequest) error); ok {
 		r1 = rf(_a0, _a1)
 	} else {
@@ -1558,8 +1927,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)}
 }
@@ -1576,11 +1945,20 @@ func (_c *MilvusServiceServer_GetIndexBuildProgress_Call) Return(_a0 *milvuspb.G
 	return _c
 }
 
+func (_c *MilvusServiceServer_GetIndexBuildProgress_Call) RunAndReturn(run func(context.Context, *milvuspb.GetIndexBuildProgressRequest) (*milvuspb.GetIndexBuildProgressResponse, error)) *MilvusServiceServer_GetIndexBuildProgress_Call {
+	_c.Call.Return(run)
+	return _c
+}
+
 // GetIndexState provides a mock function with given fields: _a0, _a1
 func (_m *MilvusServiceServer) GetIndexState(_a0 context.Context, _a1 *milvuspb.GetIndexStateRequest) (*milvuspb.GetIndexStateResponse, error) {
 	ret := _m.Called(_a0, _a1)
 
 	var r0 *milvuspb.GetIndexStateResponse
+	var r1 error
+	if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.GetIndexStateRequest) (*milvuspb.GetIndexStateResponse, error)); ok {
+		return rf(_a0, _a1)
+	}
 	if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.GetIndexStateRequest) *milvuspb.GetIndexStateResponse); ok {
 		r0 = rf(_a0, _a1)
 	} else {
@@ -1589,7 +1967,6 @@ func (_m *MilvusServiceServer) GetIndexState(_a0 context.Context, _a1 *milvuspb.
 		}
 	}
 
-	var r1 error
 	if rf, ok := ret.Get(1).(func(context.Context, *milvuspb.GetIndexStateRequest) error); ok {
 		r1 = rf(_a0, _a1)
 	} else {
@@ -1605,8 +1982,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)}
 }
@@ -1623,11 +2000,20 @@ func (_c *MilvusServiceServer_GetIndexState_Call) Return(_a0 *milvuspb.GetIndexS
 	return _c
 }
 
+func (_c *MilvusServiceServer_GetIndexState_Call) RunAndReturn(run func(context.Context, *milvuspb.GetIndexStateRequest) (*milvuspb.GetIndexStateResponse, error)) *MilvusServiceServer_GetIndexState_Call {
+	_c.Call.Return(run)
+	return _c
+}
+
 // GetLoadState provides a mock function with given fields: _a0, _a1
 func (_m *MilvusServiceServer) GetLoadState(_a0 context.Context, _a1 *milvuspb.GetLoadStateRequest) (*milvuspb.GetLoadStateResponse, error) {
 	ret := _m.Called(_a0, _a1)
 
 	var r0 *milvuspb.GetLoadStateResponse
+	var r1 error
+	if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.GetLoadStateRequest) (*milvuspb.GetLoadStateResponse, error)); ok {
+		return rf(_a0, _a1)
+	}
 	if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.GetLoadStateRequest) *milvuspb.GetLoadStateResponse); ok {
 		r0 = rf(_a0, _a1)
 	} else {
@@ -1636,7 +2022,6 @@ func (_m *MilvusServiceServer) GetLoadState(_a0 context.Context, _a1 *milvuspb.G
 		}
 	}
 
-	var r1 error
 	if rf, ok := ret.Get(1).(func(context.Context, *milvuspb.GetLoadStateRequest) error); ok {
 		r1 = rf(_a0, _a1)
 	} else {
@@ -1652,8 +2037,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)}
 }
@@ -1670,11 +2055,20 @@ func (_c *MilvusServiceServer_GetLoadState_Call) Return(_a0 *milvuspb.GetLoadSta
 	return _c
 }
 
+func (_c *MilvusServiceServer_GetLoadState_Call) RunAndReturn(run func(context.Context, *milvuspb.GetLoadStateRequest) (*milvuspb.GetLoadStateResponse, error)) *MilvusServiceServer_GetLoadState_Call {
+	_c.Call.Return(run)
+	return _c
+}
+
 // GetLoadingProgress provides a mock function with given fields: _a0, _a1
 func (_m *MilvusServiceServer) GetLoadingProgress(_a0 context.Context, _a1 *milvuspb.GetLoadingProgressRequest) (*milvuspb.GetLoadingProgressResponse, error) {
 	ret := _m.Called(_a0, _a1)
 
 	var r0 *milvuspb.GetLoadingProgressResponse
+	var r1 error
+	if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.GetLoadingProgressRequest) (*milvuspb.GetLoadingProgressResponse, error)); ok {
+		return rf(_a0, _a1)
+	}
 	if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.GetLoadingProgressRequest) *milvuspb.GetLoadingProgressResponse); ok {
 		r0 = rf(_a0, _a1)
 	} else {
@@ -1683,7 +2077,6 @@ func (_m *MilvusServiceServer) GetLoadingProgress(_a0 context.Context, _a1 *milv
 		}
 	}
 
-	var r1 error
 	if rf, ok := ret.Get(1).(func(context.Context, *milvuspb.GetLoadingProgressRequest) error); ok {
 		r1 = rf(_a0, _a1)
 	} else {
@@ -1699,8 +2092,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)}
 }
@@ -1717,11 +2110,20 @@ func (_c *MilvusServiceServer_GetLoadingProgress_Call) Return(_a0 *milvuspb.GetL
 	return _c
 }
 
+func (_c *MilvusServiceServer_GetLoadingProgress_Call) RunAndReturn(run func(context.Context, *milvuspb.GetLoadingProgressRequest) (*milvuspb.GetLoadingProgressResponse, error)) *MilvusServiceServer_GetLoadingProgress_Call {
+	_c.Call.Return(run)
+	return _c
+}
+
 // GetMetrics provides a mock function with given fields: _a0, _a1
 func (_m *MilvusServiceServer) GetMetrics(_a0 context.Context, _a1 *milvuspb.GetMetricsRequest) (*milvuspb.GetMetricsResponse, error) {
 	ret := _m.Called(_a0, _a1)
 
 	var r0 *milvuspb.GetMetricsResponse
+	var r1 error
+	if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.GetMetricsRequest) (*milvuspb.GetMetricsResponse, error)); ok {
+		return rf(_a0, _a1)
+	}
 	if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.GetMetricsRequest) *milvuspb.GetMetricsResponse); ok {
 		r0 = rf(_a0, _a1)
 	} else {
@@ -1730,7 +2132,6 @@ func (_m *MilvusServiceServer) GetMetrics(_a0 context.Context, _a1 *milvuspb.Get
 		}
 	}
 
-	var r1 error
 	if rf, ok := ret.Get(1).(func(context.Context, *milvuspb.GetMetricsRequest) error); ok {
 		r1 = rf(_a0, _a1)
 	} else {
@@ -1746,8 +2147,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)}
 }
@@ -1764,11 +2165,20 @@ func (_c *MilvusServiceServer_GetMetrics_Call) Return(_a0 *milvuspb.GetMetricsRe
 	return _c
 }
 
+func (_c *MilvusServiceServer_GetMetrics_Call) RunAndReturn(run func(context.Context, *milvuspb.GetMetricsRequest) (*milvuspb.GetMetricsResponse, error)) *MilvusServiceServer_GetMetrics_Call {
+	_c.Call.Return(run)
+	return _c
+}
+
 // GetPartitionStatistics provides a mock function with given fields: _a0, _a1
 func (_m *MilvusServiceServer) GetPartitionStatistics(_a0 context.Context, _a1 *milvuspb.GetPartitionStatisticsRequest) (*milvuspb.GetPartitionStatisticsResponse, error) {
 	ret := _m.Called(_a0, _a1)
 
 	var r0 *milvuspb.GetPartitionStatisticsResponse
+	var r1 error
+	if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.GetPartitionStatisticsRequest) (*milvuspb.GetPartitionStatisticsResponse, error)); ok {
+		return rf(_a0, _a1)
+	}
 	if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.GetPartitionStatisticsRequest) *milvuspb.GetPartitionStatisticsResponse); ok {
 		r0 = rf(_a0, _a1)
 	} else {
@@ -1777,7 +2187,6 @@ func (_m *MilvusServiceServer) GetPartitionStatistics(_a0 context.Context, _a1 *
 		}
 	}
 
-	var r1 error
 	if rf, ok := ret.Get(1).(func(context.Context, *milvuspb.GetPartitionStatisticsRequest) error); ok {
 		r1 = rf(_a0, _a1)
 	} else {
@@ -1793,8 +2202,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)}
 }
@@ -1811,11 +2220,20 @@ func (_c *MilvusServiceServer_GetPartitionStatistics_Call) Return(_a0 *milvuspb.
 	return _c
 }
 
+func (_c *MilvusServiceServer_GetPartitionStatistics_Call) RunAndReturn(run func(context.Context, *milvuspb.GetPartitionStatisticsRequest) (*milvuspb.GetPartitionStatisticsResponse, error)) *MilvusServiceServer_GetPartitionStatistics_Call {
+	_c.Call.Return(run)
+	return _c
+}
+
 // GetPersistentSegmentInfo provides a mock function with given fields: _a0, _a1
 func (_m *MilvusServiceServer) GetPersistentSegmentInfo(_a0 context.Context, _a1 *milvuspb.GetPersistentSegmentInfoRequest) (*milvuspb.GetPersistentSegmentInfoResponse, error) {
 	ret := _m.Called(_a0, _a1)
 
 	var r0 *milvuspb.GetPersistentSegmentInfoResponse
+	var r1 error
+	if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.GetPersistentSegmentInfoRequest) (*milvuspb.GetPersistentSegmentInfoResponse, error)); ok {
+		return rf(_a0, _a1)
+	}
 	if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.GetPersistentSegmentInfoRequest) *milvuspb.GetPersistentSegmentInfoResponse); ok {
 		r0 = rf(_a0, _a1)
 	} else {
@@ -1824,7 +2242,6 @@ func (_m *MilvusServiceServer) GetPersistentSegmentInfo(_a0 context.Context, _a1
 		}
 	}
 
-	var r1 error
 	if rf, ok := ret.Get(1).(func(context.Context, *milvuspb.GetPersistentSegmentInfoRequest) error); ok {
 		r1 = rf(_a0, _a1)
 	} else {
@@ -1840,8 +2257,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)}
 }
@@ -1858,11 +2275,20 @@ func (_c *MilvusServiceServer_GetPersistentSegmentInfo_Call) Return(_a0 *milvusp
 	return _c
 }
 
+func (_c *MilvusServiceServer_GetPersistentSegmentInfo_Call) RunAndReturn(run func(context.Context, *milvuspb.GetPersistentSegmentInfoRequest) (*milvuspb.GetPersistentSegmentInfoResponse, error)) *MilvusServiceServer_GetPersistentSegmentInfo_Call {
+	_c.Call.Return(run)
+	return _c
+}
+
 // GetQuerySegmentInfo provides a mock function with given fields: _a0, _a1
 func (_m *MilvusServiceServer) GetQuerySegmentInfo(_a0 context.Context, _a1 *milvuspb.GetQuerySegmentInfoRequest) (*milvuspb.GetQuerySegmentInfoResponse, error) {
 	ret := _m.Called(_a0, _a1)
 
 	var r0 *milvuspb.GetQuerySegmentInfoResponse
+	var r1 error
+	if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.GetQuerySegmentInfoRequest) (*milvuspb.GetQuerySegmentInfoResponse, error)); ok {
+		return rf(_a0, _a1)
+	}
 	if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.GetQuerySegmentInfoRequest) *milvuspb.GetQuerySegmentInfoResponse); ok {
 		r0 = rf(_a0, _a1)
 	} else {
@@ -1871,7 +2297,6 @@ func (_m *MilvusServiceServer) GetQuerySegmentInfo(_a0 context.Context, _a1 *mil
 		}
 	}
 
-	var r1 error
 	if rf, ok := ret.Get(1).(func(context.Context, *milvuspb.GetQuerySegmentInfoRequest) error); ok {
 		r1 = rf(_a0, _a1)
 	} else {
@@ -1887,8 +2312,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)}
 }
@@ -1905,11 +2330,20 @@ func (_c *MilvusServiceServer_GetQuerySegmentInfo_Call) Return(_a0 *milvuspb.Get
 	return _c
 }
 
+func (_c *MilvusServiceServer_GetQuerySegmentInfo_Call) RunAndReturn(run func(context.Context, *milvuspb.GetQuerySegmentInfoRequest) (*milvuspb.GetQuerySegmentInfoResponse, error)) *MilvusServiceServer_GetQuerySegmentInfo_Call {
+	_c.Call.Return(run)
+	return _c
+}
+
 // GetReplicas provides a mock function with given fields: _a0, _a1
 func (_m *MilvusServiceServer) GetReplicas(_a0 context.Context, _a1 *milvuspb.GetReplicasRequest) (*milvuspb.GetReplicasResponse, error) {
 	ret := _m.Called(_a0, _a1)
 
 	var r0 *milvuspb.GetReplicasResponse
+	var r1 error
+	if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.GetReplicasRequest) (*milvuspb.GetReplicasResponse, error)); ok {
+		return rf(_a0, _a1)
+	}
 	if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.GetReplicasRequest) *milvuspb.GetReplicasResponse); ok {
 		r0 = rf(_a0, _a1)
 	} else {
@@ -1918,7 +2352,6 @@ func (_m *MilvusServiceServer) GetReplicas(_a0 context.Context, _a1 *milvuspb.Ge
 		}
 	}
 
-	var r1 error
 	if rf, ok := ret.Get(1).(func(context.Context, *milvuspb.GetReplicasRequest) error); ok {
 		r1 = rf(_a0, _a1)
 	} else {
@@ -1934,8 +2367,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)}
 }
@@ -1952,11 +2385,20 @@ func (_c *MilvusServiceServer_GetReplicas_Call) Return(_a0 *milvuspb.GetReplicas
 	return _c
 }
 
+func (_c *MilvusServiceServer_GetReplicas_Call) RunAndReturn(run func(context.Context, *milvuspb.GetReplicasRequest) (*milvuspb.GetReplicasResponse, error)) *MilvusServiceServer_GetReplicas_Call {
+	_c.Call.Return(run)
+	return _c
+}
+
 // GetVersion provides a mock function with given fields: _a0, _a1
 func (_m *MilvusServiceServer) GetVersion(_a0 context.Context, _a1 *milvuspb.GetVersionRequest) (*milvuspb.GetVersionResponse, error) {
 	ret := _m.Called(_a0, _a1)
 
 	var r0 *milvuspb.GetVersionResponse
+	var r1 error
+	if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.GetVersionRequest) (*milvuspb.GetVersionResponse, error)); ok {
+		return rf(_a0, _a1)
+	}
 	if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.GetVersionRequest) *milvuspb.GetVersionResponse); ok {
 		r0 = rf(_a0, _a1)
 	} else {
@@ -1965,7 +2407,6 @@ func (_m *MilvusServiceServer) GetVersion(_a0 context.Context, _a1 *milvuspb.Get
 		}
 	}
 
-	var r1 error
 	if rf, ok := ret.Get(1).(func(context.Context, *milvuspb.GetVersionRequest) error); ok {
 		r1 = rf(_a0, _a1)
 	} else {
@@ -1981,8 +2422,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)}
 }
@@ -1999,11 +2440,20 @@ func (_c *MilvusServiceServer_GetVersion_Call) Return(_a0 *milvuspb.GetVersionRe
 	return _c
 }
 
+func (_c *MilvusServiceServer_GetVersion_Call) RunAndReturn(run func(context.Context, *milvuspb.GetVersionRequest) (*milvuspb.GetVersionResponse, error)) *MilvusServiceServer_GetVersion_Call {
+	_c.Call.Return(run)
+	return _c
+}
+
 // HasCollection provides a mock function with given fields: _a0, _a1
 func (_m *MilvusServiceServer) HasCollection(_a0 context.Context, _a1 *milvuspb.HasCollectionRequest) (*milvuspb.BoolResponse, error) {
 	ret := _m.Called(_a0, _a1)
 
 	var r0 *milvuspb.BoolResponse
+	var r1 error
+	if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.HasCollectionRequest) (*milvuspb.BoolResponse, error)); ok {
+		return rf(_a0, _a1)
+	}
 	if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.HasCollectionRequest) *milvuspb.BoolResponse); ok {
 		r0 = rf(_a0, _a1)
 	} else {
@@ -2012,7 +2462,6 @@ func (_m *MilvusServiceServer) HasCollection(_a0 context.Context, _a1 *milvuspb.
 		}
 	}
 
-	var r1 error
 	if rf, ok := ret.Get(1).(func(context.Context, *milvuspb.HasCollectionRequest) error); ok {
 		r1 = rf(_a0, _a1)
 	} else {
@@ -2028,8 +2477,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)}
 }
@@ -2046,11 +2495,20 @@ func (_c *MilvusServiceServer_HasCollection_Call) Return(_a0 *milvuspb.BoolRespo
 	return _c
 }
 
+func (_c *MilvusServiceServer_HasCollection_Call) RunAndReturn(run func(context.Context, *milvuspb.HasCollectionRequest) (*milvuspb.BoolResponse, error)) *MilvusServiceServer_HasCollection_Call {
+	_c.Call.Return(run)
+	return _c
+}
+
 // HasPartition provides a mock function with given fields: _a0, _a1
 func (_m *MilvusServiceServer) HasPartition(_a0 context.Context, _a1 *milvuspb.HasPartitionRequest) (*milvuspb.BoolResponse, error) {
 	ret := _m.Called(_a0, _a1)
 
 	var r0 *milvuspb.BoolResponse
+	var r1 error
+	if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.HasPartitionRequest) (*milvuspb.BoolResponse, error)); ok {
+		return rf(_a0, _a1)
+	}
 	if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.HasPartitionRequest) *milvuspb.BoolResponse); ok {
 		r0 = rf(_a0, _a1)
 	} else {
@@ -2059,7 +2517,6 @@ func (_m *MilvusServiceServer) HasPartition(_a0 context.Context, _a1 *milvuspb.H
 		}
 	}
 
-	var r1 error
 	if rf, ok := ret.Get(1).(func(context.Context, *milvuspb.HasPartitionRequest) error); ok {
 		r1 = rf(_a0, _a1)
 	} else {
@@ -2075,8 +2532,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)}
 }
@@ -2093,11 +2550,20 @@ func (_c *MilvusServiceServer_HasPartition_Call) Return(_a0 *milvuspb.BoolRespon
 	return _c
 }
 
+func (_c *MilvusServiceServer_HasPartition_Call) RunAndReturn(run func(context.Context, *milvuspb.HasPartitionRequest) (*milvuspb.BoolResponse, error)) *MilvusServiceServer_HasPartition_Call {
+	_c.Call.Return(run)
+	return _c
+}
+
 // Import provides a mock function with given fields: _a0, _a1
 func (_m *MilvusServiceServer) Import(_a0 context.Context, _a1 *milvuspb.ImportRequest) (*milvuspb.ImportResponse, error) {
 	ret := _m.Called(_a0, _a1)
 
 	var r0 *milvuspb.ImportResponse
+	var r1 error
+	if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.ImportRequest) (*milvuspb.ImportResponse, error)); ok {
+		return rf(_a0, _a1)
+	}
 	if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.ImportRequest) *milvuspb.ImportResponse); ok {
 		r0 = rf(_a0, _a1)
 	} else {
@@ -2106,7 +2572,6 @@ func (_m *MilvusServiceServer) Import(_a0 context.Context, _a1 *milvuspb.ImportR
 		}
 	}
 
-	var r1 error
 	if rf, ok := ret.Get(1).(func(context.Context, *milvuspb.ImportRequest) error); ok {
 		r1 = rf(_a0, _a1)
 	} else {
@@ -2122,8 +2587,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)}
 }
@@ -2140,11 +2605,20 @@ func (_c *MilvusServiceServer_Import_Call) Return(_a0 *milvuspb.ImportResponse,
 	return _c
 }
 
+func (_c *MilvusServiceServer_Import_Call) RunAndReturn(run func(context.Context, *milvuspb.ImportRequest) (*milvuspb.ImportResponse, error)) *MilvusServiceServer_Import_Call {
+	_c.Call.Return(run)
+	return _c
+}
+
 // Insert provides a mock function with given fields: _a0, _a1
 func (_m *MilvusServiceServer) Insert(_a0 context.Context, _a1 *milvuspb.InsertRequest) (*milvuspb.MutationResult, error) {
 	ret := _m.Called(_a0, _a1)
 
 	var r0 *milvuspb.MutationResult
+	var r1 error
+	if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.InsertRequest) (*milvuspb.MutationResult, error)); ok {
+		return rf(_a0, _a1)
+	}
 	if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.InsertRequest) *milvuspb.MutationResult); ok {
 		r0 = rf(_a0, _a1)
 	} else {
@@ -2153,7 +2627,6 @@ func (_m *MilvusServiceServer) Insert(_a0 context.Context, _a1 *milvuspb.InsertR
 		}
 	}
 
-	var r1 error
 	if rf, ok := ret.Get(1).(func(context.Context, *milvuspb.InsertRequest) error); ok {
 		r1 = rf(_a0, _a1)
 	} else {
@@ -2169,8 +2642,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)}
 }
@@ -2187,11 +2660,20 @@ func (_c *MilvusServiceServer_Insert_Call) Return(_a0 *milvuspb.MutationResult,
 	return _c
 }
 
+func (_c *MilvusServiceServer_Insert_Call) RunAndReturn(run func(context.Context, *milvuspb.InsertRequest) (*milvuspb.MutationResult, error)) *MilvusServiceServer_Insert_Call {
+	_c.Call.Return(run)
+	return _c
+}
+
 // ListCredUsers provides a mock function with given fields: _a0, _a1
 func (_m *MilvusServiceServer) ListCredUsers(_a0 context.Context, _a1 *milvuspb.ListCredUsersRequest) (*milvuspb.ListCredUsersResponse, error) {
 	ret := _m.Called(_a0, _a1)
 
 	var r0 *milvuspb.ListCredUsersResponse
+	var r1 error
+	if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.ListCredUsersRequest) (*milvuspb.ListCredUsersResponse, error)); ok {
+		return rf(_a0, _a1)
+	}
 	if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.ListCredUsersRequest) *milvuspb.ListCredUsersResponse); ok {
 		r0 = rf(_a0, _a1)
 	} else {
@@ -2200,7 +2682,6 @@ func (_m *MilvusServiceServer) ListCredUsers(_a0 context.Context, _a1 *milvuspb.
 		}
 	}
 
-	var r1 error
 	if rf, ok := ret.Get(1).(func(context.Context, *milvuspb.ListCredUsersRequest) error); ok {
 		r1 = rf(_a0, _a1)
 	} else {
@@ -2216,8 +2697,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)}
 }
@@ -2234,11 +2715,75 @@ func (_c *MilvusServiceServer_ListCredUsers_Call) Return(_a0 *milvuspb.ListCredU
 	return _c
 }
 
+func (_c *MilvusServiceServer_ListCredUsers_Call) RunAndReturn(run func(context.Context, *milvuspb.ListCredUsersRequest) (*milvuspb.ListCredUsersResponse, error)) *MilvusServiceServer_ListCredUsers_Call {
+	_c.Call.Return(run)
+	return _c
+}
+
+// ListDatabases provides a mock function with given fields: _a0, _a1
+func (_m *MilvusServiceServer) ListDatabases(_a0 context.Context, _a1 *milvuspb.ListDatabasesRequest) (*milvuspb.ListDatabasesResponse, error) {
+	ret := _m.Called(_a0, _a1)
+
+	var r0 *milvuspb.ListDatabasesResponse
+	var r1 error
+	if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.ListDatabasesRequest) (*milvuspb.ListDatabasesResponse, error)); ok {
+		return rf(_a0, _a1)
+	}
+	if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.ListDatabasesRequest) *milvuspb.ListDatabasesResponse); ok {
+		r0 = rf(_a0, _a1)
+	} else {
+		if ret.Get(0) != nil {
+			r0 = ret.Get(0).(*milvuspb.ListDatabasesResponse)
+		}
+	}
+
+	if rf, ok := ret.Get(1).(func(context.Context, *milvuspb.ListDatabasesRequest) error); ok {
+		r1 = rf(_a0, _a1)
+	} else {
+		r1 = ret.Error(1)
+	}
+
+	return r0, r1
+}
+
+// MilvusServiceServer_ListDatabases_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListDatabases'
+type MilvusServiceServer_ListDatabases_Call struct {
+	*mock.Call
+}
+
+// ListDatabases is a helper method to define mock.On call
+//   - _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)}
+}
+
+func (_c *MilvusServiceServer_ListDatabases_Call) Run(run func(_a0 context.Context, _a1 *milvuspb.ListDatabasesRequest)) *MilvusServiceServer_ListDatabases_Call {
+	_c.Call.Run(func(args mock.Arguments) {
+		run(args[0].(context.Context), args[1].(*milvuspb.ListDatabasesRequest))
+	})
+	return _c
+}
+
+func (_c *MilvusServiceServer_ListDatabases_Call) Return(_a0 *milvuspb.ListDatabasesResponse, _a1 error) *MilvusServiceServer_ListDatabases_Call {
+	_c.Call.Return(_a0, _a1)
+	return _c
+}
+
+func (_c *MilvusServiceServer_ListDatabases_Call) RunAndReturn(run func(context.Context, *milvuspb.ListDatabasesRequest) (*milvuspb.ListDatabasesResponse, error)) *MilvusServiceServer_ListDatabases_Call {
+	_c.Call.Return(run)
+	return _c
+}
+
 // ListImportTasks provides a mock function with given fields: _a0, _a1
 func (_m *MilvusServiceServer) ListImportTasks(_a0 context.Context, _a1 *milvuspb.ListImportTasksRequest) (*milvuspb.ListImportTasksResponse, error) {
 	ret := _m.Called(_a0, _a1)
 
 	var r0 *milvuspb.ListImportTasksResponse
+	var r1 error
+	if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.ListImportTasksRequest) (*milvuspb.ListImportTasksResponse, error)); ok {
+		return rf(_a0, _a1)
+	}
 	if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.ListImportTasksRequest) *milvuspb.ListImportTasksResponse); ok {
 		r0 = rf(_a0, _a1)
 	} else {
@@ -2247,7 +2792,6 @@ func (_m *MilvusServiceServer) ListImportTasks(_a0 context.Context, _a1 *milvusp
 		}
 	}
 
-	var r1 error
 	if rf, ok := ret.Get(1).(func(context.Context, *milvuspb.ListImportTasksRequest) error); ok {
 		r1 = rf(_a0, _a1)
 	} else {
@@ -2263,8 +2807,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)}
 }
@@ -2281,11 +2825,20 @@ func (_c *MilvusServiceServer_ListImportTasks_Call) Return(_a0 *milvuspb.ListImp
 	return _c
 }
 
+func (_c *MilvusServiceServer_ListImportTasks_Call) RunAndReturn(run func(context.Context, *milvuspb.ListImportTasksRequest) (*milvuspb.ListImportTasksResponse, error)) *MilvusServiceServer_ListImportTasks_Call {
+	_c.Call.Return(run)
+	return _c
+}
+
 // ListResourceGroups provides a mock function with given fields: _a0, _a1
 func (_m *MilvusServiceServer) ListResourceGroups(_a0 context.Context, _a1 *milvuspb.ListResourceGroupsRequest) (*milvuspb.ListResourceGroupsResponse, error) {
 	ret := _m.Called(_a0, _a1)
 
 	var r0 *milvuspb.ListResourceGroupsResponse
+	var r1 error
+	if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.ListResourceGroupsRequest) (*milvuspb.ListResourceGroupsResponse, error)); ok {
+		return rf(_a0, _a1)
+	}
 	if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.ListResourceGroupsRequest) *milvuspb.ListResourceGroupsResponse); ok {
 		r0 = rf(_a0, _a1)
 	} else {
@@ -2294,7 +2847,6 @@ func (_m *MilvusServiceServer) ListResourceGroups(_a0 context.Context, _a1 *milv
 		}
 	}
 
-	var r1 error
 	if rf, ok := ret.Get(1).(func(context.Context, *milvuspb.ListResourceGroupsRequest) error); ok {
 		r1 = rf(_a0, _a1)
 	} else {
@@ -2310,8 +2862,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)}
 }
@@ -2328,11 +2880,20 @@ func (_c *MilvusServiceServer_ListResourceGroups_Call) Return(_a0 *milvuspb.List
 	return _c
 }
 
+func (_c *MilvusServiceServer_ListResourceGroups_Call) RunAndReturn(run func(context.Context, *milvuspb.ListResourceGroupsRequest) (*milvuspb.ListResourceGroupsResponse, error)) *MilvusServiceServer_ListResourceGroups_Call {
+	_c.Call.Return(run)
+	return _c
+}
+
 // LoadBalance provides a mock function with given fields: _a0, _a1
 func (_m *MilvusServiceServer) LoadBalance(_a0 context.Context, _a1 *milvuspb.LoadBalanceRequest) (*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.LoadBalanceRequest) (*commonpb.Status, error)); ok {
+		return rf(_a0, _a1)
+	}
 	if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.LoadBalanceRequest) *commonpb.Status); ok {
 		r0 = rf(_a0, _a1)
 	} else {
@@ -2341,7 +2902,6 @@ func (_m *MilvusServiceServer) LoadBalance(_a0 context.Context, _a1 *milvuspb.Lo
 		}
 	}
 
-	var r1 error
 	if rf, ok := ret.Get(1).(func(context.Context, *milvuspb.LoadBalanceRequest) error); ok {
 		r1 = rf(_a0, _a1)
 	} else {
@@ -2357,8 +2917,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)}
 }
@@ -2375,11 +2935,20 @@ func (_c *MilvusServiceServer_LoadBalance_Call) Return(_a0 *commonpb.Status, _a1
 	return _c
 }
 
+func (_c *MilvusServiceServer_LoadBalance_Call) RunAndReturn(run func(context.Context, *milvuspb.LoadBalanceRequest) (*commonpb.Status, error)) *MilvusServiceServer_LoadBalance_Call {
+	_c.Call.Return(run)
+	return _c
+}
+
 // LoadCollection provides a mock function with given fields: _a0, _a1
 func (_m *MilvusServiceServer) LoadCollection(_a0 context.Context, _a1 *milvuspb.LoadCollectionRequest) (*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.LoadCollectionRequest) (*commonpb.Status, error)); ok {
+		return rf(_a0, _a1)
+	}
 	if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.LoadCollectionRequest) *commonpb.Status); ok {
 		r0 = rf(_a0, _a1)
 	} else {
@@ -2388,7 +2957,6 @@ func (_m *MilvusServiceServer) LoadCollection(_a0 context.Context, _a1 *milvuspb
 		}
 	}
 
-	var r1 error
 	if rf, ok := ret.Get(1).(func(context.Context, *milvuspb.LoadCollectionRequest) error); ok {
 		r1 = rf(_a0, _a1)
 	} else {
@@ -2404,8 +2972,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)}
 }
@@ -2422,11 +2990,20 @@ func (_c *MilvusServiceServer_LoadCollection_Call) Return(_a0 *commonpb.Status,
 	return _c
 }
 
+func (_c *MilvusServiceServer_LoadCollection_Call) RunAndReturn(run func(context.Context, *milvuspb.LoadCollectionRequest) (*commonpb.Status, error)) *MilvusServiceServer_LoadCollection_Call {
+	_c.Call.Return(run)
+	return _c
+}
+
 // LoadPartitions provides a mock function with given fields: _a0, _a1
 func (_m *MilvusServiceServer) LoadPartitions(_a0 context.Context, _a1 *milvuspb.LoadPartitionsRequest) (*commonpb.Status, error) {
 	ret := _m.Called(_a0, _a1)
 
 	var r0 *commonpb.Status
+	var r1 error
+	if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.LoadPartitionsRequest) (*commonpb.Status, error)); ok {
+		return rf(_a0, _a1)
+	}
 	if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.LoadPartitionsRequest) *commonpb.Status); ok {
 		r0 = rf(_a0, _a1)
 	} else {
@@ -2435,7 +3012,6 @@ func (_m *MilvusServiceServer) LoadPartitions(_a0 context.Context, _a1 *milvuspb
 		}
 	}
 
-	var r1 error
 	if rf, ok := ret.Get(1).(func(context.Context, *milvuspb.LoadPartitionsRequest) error); ok {
 		r1 = rf(_a0, _a1)
 	} else {
@@ -2451,8 +3027,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)}
 }
@@ -2469,11 +3045,20 @@ func (_c *MilvusServiceServer_LoadPartitions_Call) Return(_a0 *commonpb.Status,
 	return _c
 }
 
+func (_c *MilvusServiceServer_LoadPartitions_Call) RunAndReturn(run func(context.Context, *milvuspb.LoadPartitionsRequest) (*commonpb.Status, error)) *MilvusServiceServer_LoadPartitions_Call {
+	_c.Call.Return(run)
+	return _c
+}
+
 // ManualCompaction provides a mock function with given fields: _a0, _a1
 func (_m *MilvusServiceServer) ManualCompaction(_a0 context.Context, _a1 *milvuspb.ManualCompactionRequest) (*milvuspb.ManualCompactionResponse, error) {
 	ret := _m.Called(_a0, _a1)
 
 	var r0 *milvuspb.ManualCompactionResponse
+	var r1 error
+	if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.ManualCompactionRequest) (*milvuspb.ManualCompactionResponse, error)); ok {
+		return rf(_a0, _a1)
+	}
 	if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.ManualCompactionRequest) *milvuspb.ManualCompactionResponse); ok {
 		r0 = rf(_a0, _a1)
 	} else {
@@ -2482,7 +3067,6 @@ func (_m *MilvusServiceServer) ManualCompaction(_a0 context.Context, _a1 *milvus
 		}
 	}
 
-	var r1 error
 	if rf, ok := ret.Get(1).(func(context.Context, *milvuspb.ManualCompactionRequest) error); ok {
 		r1 = rf(_a0, _a1)
 	} else {
@@ -2498,8 +3082,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)}
 }
@@ -2516,11 +3100,20 @@ func (_c *MilvusServiceServer_ManualCompaction_Call) Return(_a0 *milvuspb.Manual
 	return _c
 }
 
+func (_c *MilvusServiceServer_ManualCompaction_Call) RunAndReturn(run func(context.Context, *milvuspb.ManualCompactionRequest) (*milvuspb.ManualCompactionResponse, error)) *MilvusServiceServer_ManualCompaction_Call {
+	_c.Call.Return(run)
+	return _c
+}
+
 // OperatePrivilege provides a mock function with given fields: _a0, _a1
 func (_m *MilvusServiceServer) OperatePrivilege(_a0 context.Context, _a1 *milvuspb.OperatePrivilegeRequest) (*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.OperatePrivilegeRequest) (*commonpb.Status, error)); ok {
+		return rf(_a0, _a1)
+	}
 	if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.OperatePrivilegeRequest) *commonpb.Status); ok {
 		r0 = rf(_a0, _a1)
 	} else {
@@ -2529,7 +3122,6 @@ func (_m *MilvusServiceServer) OperatePrivilege(_a0 context.Context, _a1 *milvus
 		}
 	}
 
-	var r1 error
 	if rf, ok := ret.Get(1).(func(context.Context, *milvuspb.OperatePrivilegeRequest) error); ok {
 		r1 = rf(_a0, _a1)
 	} else {
@@ -2545,8 +3137,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)}
 }
@@ -2563,11 +3155,20 @@ func (_c *MilvusServiceServer_OperatePrivilege_Call) Return(_a0 *commonpb.Status
 	return _c
 }
 
+func (_c *MilvusServiceServer_OperatePrivilege_Call) RunAndReturn(run func(context.Context, *milvuspb.OperatePrivilegeRequest) (*commonpb.Status, error)) *MilvusServiceServer_OperatePrivilege_Call {
+	_c.Call.Return(run)
+	return _c
+}
+
 // OperateUserRole provides a mock function with given fields: _a0, _a1
 func (_m *MilvusServiceServer) OperateUserRole(_a0 context.Context, _a1 *milvuspb.OperateUserRoleRequest) (*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.OperateUserRoleRequest) (*commonpb.Status, error)); ok {
+		return rf(_a0, _a1)
+	}
 	if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.OperateUserRoleRequest) *commonpb.Status); ok {
 		r0 = rf(_a0, _a1)
 	} else {
@@ -2576,7 +3177,6 @@ func (_m *MilvusServiceServer) OperateUserRole(_a0 context.Context, _a1 *milvusp
 		}
 	}
 
-	var r1 error
 	if rf, ok := ret.Get(1).(func(context.Context, *milvuspb.OperateUserRoleRequest) error); ok {
 		r1 = rf(_a0, _a1)
 	} else {
@@ -2592,8 +3192,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)}
 }
@@ -2610,11 +3210,20 @@ func (_c *MilvusServiceServer_OperateUserRole_Call) Return(_a0 *commonpb.Status,
 	return _c
 }
 
+func (_c *MilvusServiceServer_OperateUserRole_Call) RunAndReturn(run func(context.Context, *milvuspb.OperateUserRoleRequest) (*commonpb.Status, error)) *MilvusServiceServer_OperateUserRole_Call {
+	_c.Call.Return(run)
+	return _c
+}
+
 // Query provides a mock function with given fields: _a0, _a1
 func (_m *MilvusServiceServer) Query(_a0 context.Context, _a1 *milvuspb.QueryRequest) (*milvuspb.QueryResults, error) {
 	ret := _m.Called(_a0, _a1)
 
 	var r0 *milvuspb.QueryResults
+	var r1 error
+	if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.QueryRequest) (*milvuspb.QueryResults, error)); ok {
+		return rf(_a0, _a1)
+	}
 	if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.QueryRequest) *milvuspb.QueryResults); ok {
 		r0 = rf(_a0, _a1)
 	} else {
@@ -2623,7 +3232,6 @@ func (_m *MilvusServiceServer) Query(_a0 context.Context, _a1 *milvuspb.QueryReq
 		}
 	}
 
-	var r1 error
 	if rf, ok := ret.Get(1).(func(context.Context, *milvuspb.QueryRequest) error); ok {
 		r1 = rf(_a0, _a1)
 	} else {
@@ -2639,8 +3247,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)}
 }
@@ -2657,11 +3265,20 @@ func (_c *MilvusServiceServer_Query_Call) Return(_a0 *milvuspb.QueryResults, _a1
 	return _c
 }
 
+func (_c *MilvusServiceServer_Query_Call) RunAndReturn(run func(context.Context, *milvuspb.QueryRequest) (*milvuspb.QueryResults, error)) *MilvusServiceServer_Query_Call {
+	_c.Call.Return(run)
+	return _c
+}
+
 // RegisterLink provides a mock function with given fields: _a0, _a1
 func (_m *MilvusServiceServer) RegisterLink(_a0 context.Context, _a1 *milvuspb.RegisterLinkRequest) (*milvuspb.RegisterLinkResponse, error) {
 	ret := _m.Called(_a0, _a1)
 
 	var r0 *milvuspb.RegisterLinkResponse
+	var r1 error
+	if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.RegisterLinkRequest) (*milvuspb.RegisterLinkResponse, error)); ok {
+		return rf(_a0, _a1)
+	}
 	if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.RegisterLinkRequest) *milvuspb.RegisterLinkResponse); ok {
 		r0 = rf(_a0, _a1)
 	} else {
@@ -2670,7 +3287,6 @@ func (_m *MilvusServiceServer) RegisterLink(_a0 context.Context, _a1 *milvuspb.R
 		}
 	}
 
-	var r1 error
 	if rf, ok := ret.Get(1).(func(context.Context, *milvuspb.RegisterLinkRequest) error); ok {
 		r1 = rf(_a0, _a1)
 	} else {
@@ -2686,8 +3302,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)}
 }
@@ -2704,11 +3320,20 @@ func (_c *MilvusServiceServer_RegisterLink_Call) Return(_a0 *milvuspb.RegisterLi
 	return _c
 }
 
+func (_c *MilvusServiceServer_RegisterLink_Call) RunAndReturn(run func(context.Context, *milvuspb.RegisterLinkRequest) (*milvuspb.RegisterLinkResponse, error)) *MilvusServiceServer_RegisterLink_Call {
+	_c.Call.Return(run)
+	return _c
+}
+
 // ReleaseCollection provides a mock function with given fields: _a0, _a1
 func (_m *MilvusServiceServer) ReleaseCollection(_a0 context.Context, _a1 *milvuspb.ReleaseCollectionRequest) (*commonpb.Status, error) {
 	ret := _m.Called(_a0, _a1)
 
 	var r0 *commonpb.Status
+	var r1 error
+	if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.ReleaseCollectionRequest) (*commonpb.Status, error)); ok {
+		return rf(_a0, _a1)
+	}
 	if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.ReleaseCollectionRequest) *commonpb.Status); ok {
 		r0 = rf(_a0, _a1)
 	} else {
@@ -2717,7 +3342,6 @@ func (_m *MilvusServiceServer) ReleaseCollection(_a0 context.Context, _a1 *milvu
 		}
 	}
 
-	var r1 error
 	if rf, ok := ret.Get(1).(func(context.Context, *milvuspb.ReleaseCollectionRequest) error); ok {
 		r1 = rf(_a0, _a1)
 	} else {
@@ -2733,8 +3357,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)}
 }
@@ -2751,11 +3375,20 @@ func (_c *MilvusServiceServer_ReleaseCollection_Call) Return(_a0 *commonpb.Statu
 	return _c
 }
 
+func (_c *MilvusServiceServer_ReleaseCollection_Call) RunAndReturn(run func(context.Context, *milvuspb.ReleaseCollectionRequest) (*commonpb.Status, error)) *MilvusServiceServer_ReleaseCollection_Call {
+	_c.Call.Return(run)
+	return _c
+}
+
 // ReleasePartitions provides a mock function with given fields: _a0, _a1
 func (_m *MilvusServiceServer) ReleasePartitions(_a0 context.Context, _a1 *milvuspb.ReleasePartitionsRequest) (*commonpb.Status, error) {
 	ret := _m.Called(_a0, _a1)
 
 	var r0 *commonpb.Status
+	var r1 error
+	if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.ReleasePartitionsRequest) (*commonpb.Status, error)); ok {
+		return rf(_a0, _a1)
+	}
 	if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.ReleasePartitionsRequest) *commonpb.Status); ok {
 		r0 = rf(_a0, _a1)
 	} else {
@@ -2764,7 +3397,6 @@ func (_m *MilvusServiceServer) ReleasePartitions(_a0 context.Context, _a1 *milvu
 		}
 	}
 
-	var r1 error
 	if rf, ok := ret.Get(1).(func(context.Context, *milvuspb.ReleasePartitionsRequest) error); ok {
 		r1 = rf(_a0, _a1)
 	} else {
@@ -2780,8 +3412,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)}
 }
@@ -2798,11 +3430,20 @@ func (_c *MilvusServiceServer_ReleasePartitions_Call) Return(_a0 *commonpb.Statu
 	return _c
 }
 
+func (_c *MilvusServiceServer_ReleasePartitions_Call) RunAndReturn(run func(context.Context, *milvuspb.ReleasePartitionsRequest) (*commonpb.Status, error)) *MilvusServiceServer_ReleasePartitions_Call {
+	_c.Call.Return(run)
+	return _c
+}
+
 // RenameCollection provides a mock function with given fields: _a0, _a1
 func (_m *MilvusServiceServer) RenameCollection(_a0 context.Context, _a1 *milvuspb.RenameCollectionRequest) (*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.RenameCollectionRequest) (*commonpb.Status, error)); ok {
+		return rf(_a0, _a1)
+	}
 	if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.RenameCollectionRequest) *commonpb.Status); ok {
 		r0 = rf(_a0, _a1)
 	} else {
@@ -2811,7 +3452,6 @@ func (_m *MilvusServiceServer) RenameCollection(_a0 context.Context, _a1 *milvus
 		}
 	}
 
-	var r1 error
 	if rf, ok := ret.Get(1).(func(context.Context, *milvuspb.RenameCollectionRequest) error); ok {
 		r1 = rf(_a0, _a1)
 	} else {
@@ -2827,8 +3467,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)}
 }
@@ -2845,11 +3485,20 @@ func (_c *MilvusServiceServer_RenameCollection_Call) Return(_a0 *commonpb.Status
 	return _c
 }
 
+func (_c *MilvusServiceServer_RenameCollection_Call) RunAndReturn(run func(context.Context, *milvuspb.RenameCollectionRequest) (*commonpb.Status, error)) *MilvusServiceServer_RenameCollection_Call {
+	_c.Call.Return(run)
+	return _c
+}
+
 // Search provides a mock function with given fields: _a0, _a1
 func (_m *MilvusServiceServer) Search(_a0 context.Context, _a1 *milvuspb.SearchRequest) (*milvuspb.SearchResults, error) {
 	ret := _m.Called(_a0, _a1)
 
 	var r0 *milvuspb.SearchResults
+	var r1 error
+	if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.SearchRequest) (*milvuspb.SearchResults, error)); ok {
+		return rf(_a0, _a1)
+	}
 	if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.SearchRequest) *milvuspb.SearchResults); ok {
 		r0 = rf(_a0, _a1)
 	} else {
@@ -2858,7 +3507,6 @@ func (_m *MilvusServiceServer) Search(_a0 context.Context, _a1 *milvuspb.SearchR
 		}
 	}
 
-	var r1 error
 	if rf, ok := ret.Get(1).(func(context.Context, *milvuspb.SearchRequest) error); ok {
 		r1 = rf(_a0, _a1)
 	} else {
@@ -2874,8 +3522,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)}
 }
@@ -2892,11 +3540,20 @@ func (_c *MilvusServiceServer_Search_Call) Return(_a0 *milvuspb.SearchResults, _
 	return _c
 }
 
+func (_c *MilvusServiceServer_Search_Call) RunAndReturn(run func(context.Context, *milvuspb.SearchRequest) (*milvuspb.SearchResults, error)) *MilvusServiceServer_Search_Call {
+	_c.Call.Return(run)
+	return _c
+}
+
 // SelectGrant provides a mock function with given fields: _a0, _a1
 func (_m *MilvusServiceServer) SelectGrant(_a0 context.Context, _a1 *milvuspb.SelectGrantRequest) (*milvuspb.SelectGrantResponse, error) {
 	ret := _m.Called(_a0, _a1)
 
 	var r0 *milvuspb.SelectGrantResponse
+	var r1 error
+	if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.SelectGrantRequest) (*milvuspb.SelectGrantResponse, error)); ok {
+		return rf(_a0, _a1)
+	}
 	if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.SelectGrantRequest) *milvuspb.SelectGrantResponse); ok {
 		r0 = rf(_a0, _a1)
 	} else {
@@ -2905,7 +3562,6 @@ func (_m *MilvusServiceServer) SelectGrant(_a0 context.Context, _a1 *milvuspb.Se
 		}
 	}
 
-	var r1 error
 	if rf, ok := ret.Get(1).(func(context.Context, *milvuspb.SelectGrantRequest) error); ok {
 		r1 = rf(_a0, _a1)
 	} else {
@@ -2921,8 +3577,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)}
 }
@@ -2939,11 +3595,20 @@ func (_c *MilvusServiceServer_SelectGrant_Call) Return(_a0 *milvuspb.SelectGrant
 	return _c
 }
 
+func (_c *MilvusServiceServer_SelectGrant_Call) RunAndReturn(run func(context.Context, *milvuspb.SelectGrantRequest) (*milvuspb.SelectGrantResponse, error)) *MilvusServiceServer_SelectGrant_Call {
+	_c.Call.Return(run)
+	return _c
+}
+
 // SelectRole provides a mock function with given fields: _a0, _a1
 func (_m *MilvusServiceServer) SelectRole(_a0 context.Context, _a1 *milvuspb.SelectRoleRequest) (*milvuspb.SelectRoleResponse, error) {
 	ret := _m.Called(_a0, _a1)
 
 	var r0 *milvuspb.SelectRoleResponse
+	var r1 error
+	if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.SelectRoleRequest) (*milvuspb.SelectRoleResponse, error)); ok {
+		return rf(_a0, _a1)
+	}
 	if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.SelectRoleRequest) *milvuspb.SelectRoleResponse); ok {
 		r0 = rf(_a0, _a1)
 	} else {
@@ -2952,7 +3617,6 @@ func (_m *MilvusServiceServer) SelectRole(_a0 context.Context, _a1 *milvuspb.Sel
 		}
 	}
 
-	var r1 error
 	if rf, ok := ret.Get(1).(func(context.Context, *milvuspb.SelectRoleRequest) error); ok {
 		r1 = rf(_a0, _a1)
 	} else {
@@ -2968,8 +3632,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)}
 }
@@ -2986,11 +3650,20 @@ func (_c *MilvusServiceServer_SelectRole_Call) Return(_a0 *milvuspb.SelectRoleRe
 	return _c
 }
 
+func (_c *MilvusServiceServer_SelectRole_Call) RunAndReturn(run func(context.Context, *milvuspb.SelectRoleRequest) (*milvuspb.SelectRoleResponse, error)) *MilvusServiceServer_SelectRole_Call {
+	_c.Call.Return(run)
+	return _c
+}
+
 // SelectUser provides a mock function with given fields: _a0, _a1
 func (_m *MilvusServiceServer) SelectUser(_a0 context.Context, _a1 *milvuspb.SelectUserRequest) (*milvuspb.SelectUserResponse, error) {
 	ret := _m.Called(_a0, _a1)
 
 	var r0 *milvuspb.SelectUserResponse
+	var r1 error
+	if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.SelectUserRequest) (*milvuspb.SelectUserResponse, error)); ok {
+		return rf(_a0, _a1)
+	}
 	if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.SelectUserRequest) *milvuspb.SelectUserResponse); ok {
 		r0 = rf(_a0, _a1)
 	} else {
@@ -2999,7 +3672,6 @@ func (_m *MilvusServiceServer) SelectUser(_a0 context.Context, _a1 *milvuspb.Sel
 		}
 	}
 
-	var r1 error
 	if rf, ok := ret.Get(1).(func(context.Context, *milvuspb.SelectUserRequest) error); ok {
 		r1 = rf(_a0, _a1)
 	} else {
@@ -3015,8 +3687,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)}
 }
@@ -3033,11 +3705,20 @@ func (_c *MilvusServiceServer_SelectUser_Call) Return(_a0 *milvuspb.SelectUserRe
 	return _c
 }
 
+func (_c *MilvusServiceServer_SelectUser_Call) RunAndReturn(run func(context.Context, *milvuspb.SelectUserRequest) (*milvuspb.SelectUserResponse, error)) *MilvusServiceServer_SelectUser_Call {
+	_c.Call.Return(run)
+	return _c
+}
+
 // ShowCollections provides a mock function with given fields: _a0, _a1
 func (_m *MilvusServiceServer) ShowCollections(_a0 context.Context, _a1 *milvuspb.ShowCollectionsRequest) (*milvuspb.ShowCollectionsResponse, error) {
 	ret := _m.Called(_a0, _a1)
 
 	var r0 *milvuspb.ShowCollectionsResponse
+	var r1 error
+	if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.ShowCollectionsRequest) (*milvuspb.ShowCollectionsResponse, error)); ok {
+		return rf(_a0, _a1)
+	}
 	if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.ShowCollectionsRequest) *milvuspb.ShowCollectionsResponse); ok {
 		r0 = rf(_a0, _a1)
 	} else {
@@ -3046,7 +3727,6 @@ func (_m *MilvusServiceServer) ShowCollections(_a0 context.Context, _a1 *milvusp
 		}
 	}
 
-	var r1 error
 	if rf, ok := ret.Get(1).(func(context.Context, *milvuspb.ShowCollectionsRequest) error); ok {
 		r1 = rf(_a0, _a1)
 	} else {
@@ -3062,8 +3742,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)}
 }
@@ -3080,11 +3760,20 @@ func (_c *MilvusServiceServer_ShowCollections_Call) Return(_a0 *milvuspb.ShowCol
 	return _c
 }
 
+func (_c *MilvusServiceServer_ShowCollections_Call) RunAndReturn(run func(context.Context, *milvuspb.ShowCollectionsRequest) (*milvuspb.ShowCollectionsResponse, error)) *MilvusServiceServer_ShowCollections_Call {
+	_c.Call.Return(run)
+	return _c
+}
+
 // ShowPartitions provides a mock function with given fields: _a0, _a1
 func (_m *MilvusServiceServer) ShowPartitions(_a0 context.Context, _a1 *milvuspb.ShowPartitionsRequest) (*milvuspb.ShowPartitionsResponse, error) {
 	ret := _m.Called(_a0, _a1)
 
 	var r0 *milvuspb.ShowPartitionsResponse
+	var r1 error
+	if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.ShowPartitionsRequest) (*milvuspb.ShowPartitionsResponse, error)); ok {
+		return rf(_a0, _a1)
+	}
 	if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.ShowPartitionsRequest) *milvuspb.ShowPartitionsResponse); ok {
 		r0 = rf(_a0, _a1)
 	} else {
@@ -3093,7 +3782,6 @@ func (_m *MilvusServiceServer) ShowPartitions(_a0 context.Context, _a1 *milvuspb
 		}
 	}
 
-	var r1 error
 	if rf, ok := ret.Get(1).(func(context.Context, *milvuspb.ShowPartitionsRequest) error); ok {
 		r1 = rf(_a0, _a1)
 	} else {
@@ -3109,8 +3797,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)}
 }
@@ -3127,11 +3815,20 @@ func (_c *MilvusServiceServer_ShowPartitions_Call) Return(_a0 *milvuspb.ShowPart
 	return _c
 }
 
+func (_c *MilvusServiceServer_ShowPartitions_Call) RunAndReturn(run func(context.Context, *milvuspb.ShowPartitionsRequest) (*milvuspb.ShowPartitionsResponse, error)) *MilvusServiceServer_ShowPartitions_Call {
+	_c.Call.Return(run)
+	return _c
+}
+
 // TransferNode provides a mock function with given fields: _a0, _a1
 func (_m *MilvusServiceServer) TransferNode(_a0 context.Context, _a1 *milvuspb.TransferNodeRequest) (*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.TransferNodeRequest) (*commonpb.Status, error)); ok {
+		return rf(_a0, _a1)
+	}
 	if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.TransferNodeRequest) *commonpb.Status); ok {
 		r0 = rf(_a0, _a1)
 	} else {
@@ -3140,7 +3837,6 @@ func (_m *MilvusServiceServer) TransferNode(_a0 context.Context, _a1 *milvuspb.T
 		}
 	}
 
-	var r1 error
 	if rf, ok := ret.Get(1).(func(context.Context, *milvuspb.TransferNodeRequest) error); ok {
 		r1 = rf(_a0, _a1)
 	} else {
@@ -3156,8 +3852,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)}
 }
@@ -3174,11 +3870,20 @@ func (_c *MilvusServiceServer_TransferNode_Call) Return(_a0 *commonpb.Status, _a
 	return _c
 }
 
+func (_c *MilvusServiceServer_TransferNode_Call) RunAndReturn(run func(context.Context, *milvuspb.TransferNodeRequest) (*commonpb.Status, error)) *MilvusServiceServer_TransferNode_Call {
+	_c.Call.Return(run)
+	return _c
+}
+
 // TransferReplica provides a mock function with given fields: _a0, _a1
 func (_m *MilvusServiceServer) TransferReplica(_a0 context.Context, _a1 *milvuspb.TransferReplicaRequest) (*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.TransferReplicaRequest) (*commonpb.Status, error)); ok {
+		return rf(_a0, _a1)
+	}
 	if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.TransferReplicaRequest) *commonpb.Status); ok {
 		r0 = rf(_a0, _a1)
 	} else {
@@ -3187,7 +3892,6 @@ func (_m *MilvusServiceServer) TransferReplica(_a0 context.Context, _a1 *milvusp
 		}
 	}
 
-	var r1 error
 	if rf, ok := ret.Get(1).(func(context.Context, *milvuspb.TransferReplicaRequest) error); ok {
 		r1 = rf(_a0, _a1)
 	} else {
@@ -3203,8 +3907,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)}
 }
@@ -3221,11 +3925,20 @@ func (_c *MilvusServiceServer_TransferReplica_Call) Return(_a0 *commonpb.Status,
 	return _c
 }
 
+func (_c *MilvusServiceServer_TransferReplica_Call) RunAndReturn(run func(context.Context, *milvuspb.TransferReplicaRequest) (*commonpb.Status, error)) *MilvusServiceServer_TransferReplica_Call {
+	_c.Call.Return(run)
+	return _c
+}
+
 // UpdateCredential provides a mock function with given fields: _a0, _a1
 func (_m *MilvusServiceServer) UpdateCredential(_a0 context.Context, _a1 *milvuspb.UpdateCredentialRequest) (*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.UpdateCredentialRequest) (*commonpb.Status, error)); ok {
+		return rf(_a0, _a1)
+	}
 	if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.UpdateCredentialRequest) *commonpb.Status); ok {
 		r0 = rf(_a0, _a1)
 	} else {
@@ -3234,7 +3947,6 @@ func (_m *MilvusServiceServer) UpdateCredential(_a0 context.Context, _a1 *milvus
 		}
 	}
 
-	var r1 error
 	if rf, ok := ret.Get(1).(func(context.Context, *milvuspb.UpdateCredentialRequest) error); ok {
 		r1 = rf(_a0, _a1)
 	} else {
@@ -3250,8 +3962,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)}
 }
@@ -3268,6 +3980,11 @@ func (_c *MilvusServiceServer_UpdateCredential_Call) Return(_a0 *commonpb.Status
 	return _c
 }
 
+func (_c *MilvusServiceServer_UpdateCredential_Call) RunAndReturn(run func(context.Context, *milvuspb.UpdateCredentialRequest) (*commonpb.Status, error)) *MilvusServiceServer_UpdateCredential_Call {
+	_c.Call.Return(run)
+	return _c
+}
+
 type mockConstructorTestingTNewMilvusServiceServer interface {
 	mock.TestingT
 	Cleanup(func())


Test patch:
diff --git a/client/client_grpc_database_test.go b/client/client_grpc_database_test.go
new file mode 100644
index 0000000..09c1f8d
--- /dev/null
+++ b/client/client_grpc_database_test.go
@@ -0,0 +1,60 @@
+package client
+
+import (
+	"context"
+	"testing"
+
+	"github.com/go-faker/faker/v4"
+	"github.com/go-faker/faker/v4/pkg/options"
+	"github.com/golang/protobuf/proto"
+	server "github.com/milvus-io/milvus-proto/go-api/milvuspb"
+	"github.com/stretchr/testify/assert"
+)
+
+func TestGrpcClientListDatabases(t *testing.T) {
+	ctx := context.Background()
+	c := testClient(ctx, t)
+
+	type testCase struct {
+		DBName []string
+	}
+	caseList := []testCase{}
+	faker.FakeData(&caseList, options.WithRandomMapAndSliceMaxSize(25))
+
+	for _, singleCase := range caseList {
+		mockServer.SetInjection(MListDatabase, func(ctx context.Context, m proto.Message) (proto.Message, error) {
+			s, err := SuccessStatus()
+			resp := &server.ListDatabasesResponse{
+				Status:  s,
+				DbNames: singleCase.DBName,
+			}
+			return resp, err
+		})
+		dbNames, err := c.ListDatabases(ctx)
+		assert.Nil(t, err)
+		assert.Equal(t, len(singleCase.DBName), len(dbNames))
+		for i, db := range singleCase.DBName {
+			assert.Equal(t, db, dbNames[i].Name)
+		}
+	}
+}
+
+func TestGrpcClientCreateDatabase(t *testing.T) {
+	ctx := context.Background()
+	c := testClient(ctx, t)
+	mockServer.SetInjection(MCreateDatabase, func(ctx context.Context, m proto.Message) (proto.Message, error) {
+		return SuccessStatus()
+	})
+	err := c.CreateDatabase(ctx, "a")
+	assert.Nil(t, err)
+}
+
+func TestGrpcClientDropDatabase(t *testing.T) {
+	ctx := context.Background()
+	c := testClient(ctx, t)
+	mockServer.SetInjection(MDropDatabase, func(ctx context.Context, m proto.Message) (proto.Message, error) {
+		return SuccessStatus()
+	})
+	err := c.DropDatabase(ctx, "a")
+	assert.Nil(t, err)
+}
diff --git a/client/client_grpc_rbac_test.go b/client/client_grpc_rbac_test.go
index 8ca9f1a..dc344fb 100644
--- a/client/client_grpc_rbac_test.go
+++ b/client/client_grpc_rbac_test.go
@@ -54,11 +54,14 @@ func (s *RBACSuite) mockDialer(context.Context, string) (net.Conn, error) {
 }
 
 func (s *RBACSuite) SetupTest() {
-	c, err := NewGrpcClient(context.Background(), "bufnet2",
-		grpc.WithBlock(),
-		grpc.WithInsecure(),
-		grpc.WithContextDialer(s.mockDialer),
-	)
+	c, err := NewClient(context.Background(), Config{
+		Address: "bufnet2",
+		DialOptions: []grpc.DialOption{
+			grpc.WithBlock(),
+			grpc.WithInsecure(),
+			grpc.WithContextDialer(s.mockDialer),
+		},
+	})
 	s.Require().NoError(err)
 
 	s.client = c
diff --git a/client/client_mock_test.go b/client/client_mock_test.go
index ba44ed0..ac5b2d4 100644
--- a/client/client_mock_test.go
+++ b/client/client_mock_test.go
@@ -52,11 +52,14 @@ func (s *MockSuiteBase) mockDialer(context.Context, string) (net.Conn, error) {
 }
 
 func (s *MockSuiteBase) SetupTest() {
-	c, err := NewGrpcClient(context.Background(), "bufnet2",
-		grpc.WithBlock(),
-		grpc.WithInsecure(),
-		grpc.WithContextDialer(s.mockDialer),
-	)
+	c, err := NewClient(context.Background(), Config{
+		Address: "bufnet2",
+		DialOptions: []grpc.DialOption{
+			grpc.WithBlock(),
+			grpc.WithInsecure(),
+			grpc.WithContextDialer(s.mockDialer),
+		},
+	})
 	s.Require().NoError(err)
 
 	s.client = c
@@ -87,9 +90,7 @@ func (s *MockSuiteBase) setupHasCollection(collName string) {
 
 // ref https://stackoverflow.com/questions/42102496/testing-a-grpc-service
 
-var (
-	errNotImplemented = errors.New("not implemented")
-)
+var errNotImplemented = errors.New("not implemented")
 
 // type alias for Service method
 type ServiceMethod int
@@ -149,6 +150,10 @@ const (
 	MGetComponentStates ServiceMethod = 900
 	MGetVersion         ServiceMethod = 901
 	MCheckHealth        ServiceMethod = 902
+
+	MListDatabase   ServiceMethod = 1000
+	MCreateDatabase ServiceMethod = 1001
+	MDropDatabase   ServiceMethod = 1002
 )
 
 // injection function definition
@@ -186,6 +191,40 @@ func (m *MockServer) DelInjection(n ServiceMethod) {
 	delete(m.Injections, n)
 }
 
+// -- database --
+// ListDatabases list all database in milvus cluster.
+func (m *MockServer) ListDatabases(ctx context.Context, req *server.ListDatabasesRequest) (*server.ListDatabasesResponse, error) {
+	f := m.GetInjection(MListDatabase)
+	if f != nil {
+		r, err := f(ctx, req)
+		return r.(*server.ListDatabasesResponse), err
+	}
+	r := &server.ListDatabasesResponse{}
+	s, err := SuccessStatus()
+	r.Status = s
+	return r, err
+}
+
+// CreateDatabase create database with the given name.
+func (m *MockServer) CreateDatabase(ctx context.Context, req *server.CreateDatabaseRequest) (*common.Status, error) {
+	f := m.GetInjection(MCreateDatabase)
+	if f != nil {
+		r, err := f(ctx, req)
+		return r.(*common.Status), err
+	}
+	return SuccessStatus()
+}
+
+// DropDatabase drop database with the given db name.
+func (m *MockServer) DropDatabase(ctx context.Context, req *server.DropDatabaseRequest) (*common.Status, error) {
+	f := m.GetInjection(MDropDatabase)
+	if f != nil {
+		r, err := f(ctx, req)
+		return r.(*common.Status), err
+	}
+	return SuccessStatus()
+}
+
 func (m *MockServer) CreateCollection(ctx context.Context, req *server.CreateCollectionRequest) (*common.Status, error) {
 	f := m.GetInjection(MCreateCollection)
 	if f != nil {
@@ -283,7 +322,6 @@ func (m *MockServer) CreatePartition(ctx context.Context, req *server.CreatePart
 		return r.(*common.Status), err
 	}
 	return SuccessStatus()
-
 }
 
 func (m *MockServer) DropPartition(ctx context.Context, req *server.DropPartitionRequest) (*common.Status, error) {
@@ -384,7 +422,6 @@ func (m *MockServer) GetIndexState(ctx context.Context, req *server.GetIndexStat
 	}
 	s, err := SuccessStatus()
 	return &server.GetIndexStateResponse{Status: s}, err
-
 }
 
 func (m *MockServer) GetIndexBuildProgress(ctx context.Context, req *server.GetIndexBuildProgressRequest) (*server.GetIndexBuildProgressResponse, error) {
@@ -395,7 +432,6 @@ func (m *MockServer) GetIndexBuildProgress(ctx context.Context, req *server.GetI
 	}
 	s, err := SuccessStatus()
 	return &server.GetIndexBuildProgressResponse{Status: s}, err
-
 }
 
 func (m *MockServer) DropIndex(ctx context.Context, req *server.DropIndexRequest) (*common.Status, error) {
diff --git a/client/client_test.go b/client/client_test.go
index 42c547d..9314c51 100644
--- a/client/client_test.go
+++ b/client/client_test.go
@@ -107,7 +107,6 @@ func (r defaultRow) Collection() string {
 
 // TestMain establishes mock grpc server to testing client behavior
 func TestMain(m *testing.M) {
-
 	rand.Seed(time.Now().Unix())
 	lis = bufconn.Listen(bufSize)
 	s := grpc.NewServer()
@@ -130,8 +129,15 @@ func bufDialer(context.Context, string) (net.Conn, error) {
 }
 
 func testClient(ctx context.Context, t *testing.T) Client {
-	c, err := NewGrpcClient(ctx, "bufnet", grpc.WithBlock(),
-		grpc.WithInsecure(), grpc.WithContextDialer(bufDialer))
+	c, err := NewClient(ctx,
+		Config{
+			Address: "bufnet",
+			DialOptions: []grpc.DialOption{
+				grpc.WithBlock(),
+				grpc.WithInsecure(),
+				grpc.WithContextDialer(bufDialer),
+			},
+		})
 
 	if !assert.Nil(t, err) || !assert.NotNil(t, c) {
 		t.FailNow()
@@ -177,6 +183,7 @@ func TestGrpcClientNil(t *testing.T) {
 		t.Run(fmt.Sprintf("TestGrpcClientNil_%s", m.Name), func(t *testing.T) {
 			mt := m.Type                                   // type of function
 			if m.Name == "Close" || m.Name == "Connect" || // skip connect & close
+				m.Name == "UsingDatabase" || // skip use database
 				m.Name == "Search" || // type alias MetricType treated as string
 				m.Name == "CalcDistance" ||
 				m.Name == "ManualCompaction" || // time.Duration hard to detect in reflect
@@ -186,7 +193,7 @@ func TestGrpcClientNil(t *testing.T) {
 			ins := make([]reflect.Value, 0, mt.NumIn())
 			for j := 1; j < mt.NumIn(); j++ { // idx == 0, is the receiver v
 				if j == 1 {
-					//non-general solution, hard code context!
+					// non-general solution, hard code context!
 					ins = append(ins, reflect.ValueOf(ctx))
 					continue
 				}
@@ -237,7 +244,6 @@ func TestGrpcClientNil(t *testing.T) {
 				assert.True(t, len(outs) > 0)
 				assert.False(t, outs[len(outs)-1].IsNil())
 			}
-
 		})
 	}
 }
@@ -246,13 +252,21 @@ func TestGrpcClientConnect(t *testing.T) {
 	ctx := context.Background()
 
 	t.Run("Use bufconn dailer, testing case", func(t *testing.T) {
-		c, err := NewGrpcClient(ctx, "bufnet", grpc.WithBlock(), grpc.WithInsecure(), grpc.WithContextDialer(bufDialer)) // uses in memory buf connection
+		c, err := NewClient(ctx,
+			Config{
+				Address: "bufnet",
+				DialOptions: []grpc.DialOption{
+					grpc.WithBlock(), grpc.WithInsecure(), grpc.WithContextDialer(bufDialer),
+				},
+			})
 		assert.Nil(t, err)
 		assert.NotNil(t, c)
 	})
 
 	t.Run("Test empty addr, using default timeout", func(t *testing.T) {
-		c, err := NewGrpcClient(ctx, "")
+		c, err := NewClient(ctx, Config{
+			Address: "",
+		})
 		assert.NotNil(t, err)
 		assert.Nil(t, c)
 	})
@@ -297,11 +311,11 @@ func TestGrpcClientRetryPolicy(t *testing.T) {
 	if err != nil {
 		log.Fatalf("failed to listen: %v", err)
 	}
-	var kaep = keepalive.EnforcementPolicy{
+	kaep := keepalive.EnforcementPolicy{
 		MinTime:             5 * time.Second,
 		PermitWithoutStream: true,
 	}
-	var kasp = keepalive.ServerParameters{
+	kasp := keepalive.ServerParameters{
 		Time:    60 * time.Second,
 		Timeout: 60 * time.Second,
 	}
@@ -320,7 +334,7 @@ func TestGrpcClientRetryPolicy(t *testing.T) {
 	}()
 	defer s.Stop()
 
-	client, err := NewGrpcClient(context.TODO(), address)
+	client, err := NewClient(context.TODO(), Config{Address: address})
 	assert.Nil(t, err)
 	defer client.Close()
 
@@ -332,16 +346,6 @@ func TestGrpcClientRetryPolicy(t *testing.T) {
 	assert.Equal(t, res.Message, strings.ToUpper(name))
 }
 
-func TestClient_getDefaultAuthOpts(t *testing.T) {
-	username := "u"
-	password := "pwd"
-	defaultOpts := getDefaultAuthOpts(username, password, true)
-	assert.True(t, len(defaultOpts) == 6)
-
-	defaultOpts = getDefaultAuthOpts(username, password, false)
-	assert.True(t, len(defaultOpts) == 6)
-}
-
 func TestClient_NewDefaultGrpcClientWithURI(t *testing.T) {
 	username := "u"
 	password := "p"
@@ -354,48 +358,6 @@ func TestClient_NewDefaultGrpcClientWithURI(t *testing.T) {
 	})
 }
 
-func TestClient_parseURI(t *testing.T) {
-	t.Run("https uri parse ok", func(t *testing.T) {
-		uri := "https://localhost:8080"
-		addr, inSecure, err := parseURI(uri)
-		assert.Equal(t, "localhost:8080", addr)
-		assert.True(t, inSecure)
-		assert.Nil(t, err)
-	})
-
-	t.Run("https uri parse fail", func(t *testing.T) {
-		uri := "https://localhost:port"
-		addr, inSecure, err := parseURI(uri)
-		assert.Equal(t, "", addr)
-		assert.True(t, inSecure)
-		assert.NotNil(t, err)
-	})
-
-	t.Run("http uri parse ok", func(t *testing.T) {
-		uri := "http://localhost:8080"
-		addr, inSecure, err := parseURI(uri)
-		assert.Equal(t, "localhost:8080", addr)
-		assert.False(t, inSecure)
-		assert.Nil(t, err)
-	})
-
-	t.Run("http uri parse fail", func(t *testing.T) {
-		uri := "http://localhost:port"
-		addr, inSecure, err := parseURI(uri)
-		assert.Equal(t, "", addr)
-		assert.False(t, inSecure)
-		assert.NotNil(t, err)
-	})
-
-	t.Run("no prefix uri parse ok", func(t *testing.T) {
-		uri := "localhost:8080"
-		addr, inSecure, err := parseURI(uri)
-		assert.Equal(t, "localhost:8080", addr)
-		assert.False(t, inSecure)
-		assert.Nil(t, err)
-	})
-}
-
 var letters = []rune("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ")
 
 func randStr(n int) string {
diff --git a/client/config_test.go b/client/config_test.go
new file mode 100644
index 0000000..77b9527
--- /dev/null
+++ b/client/config_test.go
@@ -0,0 +1,130 @@
+package client
+
+import (
+	"testing"
+
+	"github.com/stretchr/testify/assert"
+)
+
+func TestClientConfig(t *testing.T) {
+	// empty config.
+	assertConfig(
+		t,
+		&Config{},
+		"", "", false, true,
+	)
+	// local host
+	assertConfig(
+		t,
+		&Config{
+			Address: "localhost:19540",
+		},
+		"localhost:19540", "", false, false,
+	)
+	// local secure host
+	assertConfig(
+		t,
+		&Config{
+			Address:       "localhost:19540",
+			EnableTLSAuth: true,
+		},
+		"localhost:19540", "", true, false,
+	)
+	// local http host
+	assertConfig(
+		t,
+		&Config{
+			Address: "http://localhost:19540",
+		},
+		"localhost:19540", "", false, false,
+	)
+	// local https host
+	assertConfig(
+		t,
+		&Config{
+			Address: "https://localhost:19540",
+		},
+		"localhost:19540", "", true, false,
+	)
+	// remote https host
+	assertConfig(
+		t,
+		&Config{
+			Address: "https://xxxx-xxxx-xxxxx.com",
+		},
+		"xxxx-xxxx-xxxxx.com", "", true, false,
+	)
+	// remote https host with dbname
+	assertConfig(
+		t,
+		&Config{
+			Address: "https://xxxx-xxxxxxxxxxxxxx-xxxxxx.aws-us-west-2.vectordb-sit.zillizcloud.com:19530/database_name",
+		},
+		"xxxx-xxxxxxxxxxxxxx-xxxxxx.aws-us-west-2.vectordb-sit.zillizcloud.com:19530", "database_name", true, false,
+	)
+
+	// local secure host
+	assertConfig(
+		t,
+		&Config{
+			Address: "https://localhost:19540",
+		},
+		"localhost:19540", "", true, false,
+	)
+
+	assertConfig(
+		t,
+		&Config{
+			Address: "https://localhost:8080",
+		},
+		"localhost:8080", "", true, false,
+	)
+	assertConfig(
+		t,
+		&Config{
+			Address: "https://localhost:port",
+		},
+		"", "", false, true,
+	)
+	assertConfig(
+		t,
+		&Config{
+			Address: "http://localhost:8080",
+		},
+		"localhost:8080", "", false, false,
+	)
+	assertConfig(
+		t,
+		&Config{
+			Address: "http://localhost:port",
+		},
+		"", "", false, true,
+	)
+	assertConfig(
+		t,
+		&Config{
+			Address: "localhost:8080",
+		},
+		"localhost:8080", "", false, false,
+	)
+	assertConfig(
+		t,
+		&Config{
+			Address: "localhost:8080",
+			DBName:  "test_db",
+		},
+		"localhost:8080", "test_db", false, false,
+	)
+}
+
+func assertConfig(t *testing.T, c *Config, host string, db string, secure bool, isErr bool) {
+	err := c.parse()
+	if isErr {
+		assert.NotNil(t, err)
+		return
+	}
+	assert.Nil(t, err)
+	assert.Equal(t, c.EnableTLSAuth, secure)
+	assert.Equal(t, c.DBName, db)
+	assert.Equal(t, c.getParsedAddress(), host)
+}
diff --git a/client/interceptor_test.go b/client/interceptor_test.go
index e9bb982..0847719 100644
--- a/client/interceptor_test.go
+++ b/client/interceptor_test.go
@@ -11,16 +11,24 @@ import (
 )
 
 const (
-	TestUsername = "TestUsername"
-	TestPassword = "TestPassword"
+	testDBName = "TestDBName"
 )
 
 func TestAuthenticationInterceptor(t *testing.T) {
 	ctx := context.Background()
-	ctx = AuthenticationInterceptor(ctx, TestUsername, TestPassword)
+	ctx = authenticationInterceptor(ctx, testUsername, testPassword)
 	md, ok := metadata.FromOutgoingContext(ctx)
-	value := crypto.Base64Encode(fmt.Sprintf("%s:%s", TestUsername, TestPassword))
+	value := crypto.Base64Encode(fmt.Sprintf("%s:%s", testUsername, testPassword))
 	assert.True(t, ok)
 	assert.Equal(t, 1, len(md["authorization"]))
 	assert.Equal(t, value, md["authorization"][0])
 }
+
+func TestDBNameInterceptor(t *testing.T) {
+	ctx := context.Background()
+	ctx = databaseNameInterceptor(ctx, func() string { return testDBName })
+	md, ok := metadata.FromOutgoingContext(ctx)
+	assert.True(t, ok)
+	assert.Equal(t, 1, len(md["dbname"]))
+	assert.Equal(t, testDBName, md["dbname"][0])
+}
diff --git a/test/base/milvus_client.go b/test/base/milvus_client.go
index ab0f64a..7f0e42c 100644
--- a/test/base/milvus_client.go
+++ b/test/base/milvus_client.go
@@ -7,8 +7,6 @@ import (
 
 	"github.com/milvus-io/milvus-sdk-go/v2/client"
 	"github.com/milvus-io/milvus-sdk-go/v2/entity"
-
-	"google.golang.org/grpc"
 )
 
 func preRequest(funcName string, args ...interface{}) {
@@ -21,17 +19,16 @@ func postResponse(funcName string, err error, res ...interface{}) {
 	} else {
 		log.Printf("(ApiResponse): func [%s], results: %v\n", funcName, res)
 	}
-
 }
 
 type MilvusClient struct {
 	mClient client.Client
 }
 
-func NewMilvusClient(ctx context.Context, addr string, dialOptions ...grpc.DialOption) (*MilvusClient, error) {
-	preRequest("NewGrpcClient", ctx, addr, dialOptions)
-	mClient, err := client.NewGrpcClient(ctx, addr, dialOptions...)
-	postResponse("NewGrpcClient", err, mClient)
+func NewMilvusClient(ctx context.Context, cfg client.Config) (*MilvusClient, error) {
+	preRequest("NewClient", ctx, cfg)
+	mClient, err := client.NewClient(ctx, cfg)
+	postResponse("NewClient", err, mClient)
 	return &MilvusClient{
 		mClient,
 	}, err
@@ -80,6 +77,44 @@ func (mc *MilvusClient) Close() error {
 	return err
 }
 
+// -- database --
+// UsingDatabase for database operation after this function call.
+// All request in any goroutine will be applied to new database on the same client. e.g.
+// 1. goroutine A access DB1.
+// 2. goroutine B call UsingDatabase(ctx, "DB2").
+// 3. goroutine A access DB2 after 2.
+func (mc *MilvusClient) UsingDatabase(ctx context.Context, dbName string) {
+	preRequest("UsingDatabase", ctx, dbName)
+	mc.mClient.UsingDatabase(ctx, dbName)
+	postResponse("UsingDatabase", nil)
+}
+
+// -- database --
+
+// ListDatabases list all database in milvus cluster.
+func (mc *MilvusClient) ListDatabases(ctx context.Context) ([]entity.Database, error) {
+	preRequest("ListDatabases", ctx)
+	dbs, err := mc.mClient.ListDatabases(ctx)
+	postResponse("ListDatabases", err, dbs)
+	return dbs, err
+}
+
+// CreateDatabase create database with the given name.
+func (mc *MilvusClient) CreateDatabase(ctx context.Context, dbName string) error {
+	preRequest("CreateDatabase", ctx)
+	err := mc.mClient.CreateDatabase(ctx, dbName)
+	postResponse("CreateDatabase", err)
+	return err
+}
+
+// DropDatabase drop database with the given db name.
+func (mc *MilvusClient) DropDatabase(ctx context.Context, dbName string) error {
+	preRequest("DropDatabase", ctx)
+	err := mc.mClient.DropDatabase(ctx, dbName)
+	postResponse("DropDatabase", err)
+	return err
+}
+
 // -- collection --
 
 // Create Collection
@@ -128,7 +163,7 @@ func (mc *MilvusClient) GetCollectionStatistics(ctx context.Context, collName st
 
 // Load Collection
 func (mc *MilvusClient) LoadCollection(ctx context.Context, collName string, async bool, opts ...client.LoadCollectionOption) error {
-	var funcName = "LoadCollection"
+	funcName := "LoadCollection"
 	preRequest(funcName, ctx, collName, opts)
 	err := mc.mClient.LoadCollection(ctx, collName, async, opts...)
 	postResponse(funcName, err)
@@ -337,8 +372,9 @@ func (mc *MilvusClient) DeleteByPks(ctx context.Context, collName string, partit
 
 // Search
 func (mc *MilvusClient) Search(ctx context.Context, collName string, partitions []string, expr string,
-	outputFields []string, vectors []entity.Vector, vectorField string, metricType entity.MetricType, topK int, sp entity.SearchParam, opts ...client.SearchQueryOptionFunc) ([]client.SearchResult, error) {
-	var funcName = "Search"
+	outputFields []string, vectors []entity.Vector, vectorField string, metricType entity.MetricType, topK int, sp entity.SearchParam, opts ...client.SearchQueryOptionFunc,
+) ([]client.SearchResult, error) {
+	funcName := "Search"
 	preRequest(funcName, ctx, collName, partitions, expr, outputFields, vectors, vectorField, metricType, topK, sp, opts)
 
 	searchResult, err := mc.mClient.Search(ctx, collName, partitions, expr, outputFields, vectors, vectorField, metricType, topK, sp, opts...)
@@ -349,8 +385,9 @@ func (mc *MilvusClient) Search(ctx context.Context, collName string, partitions
 
 // Query
 func (mc *MilvusClient) Query(ctx context.Context, collName string, partitions []string, ids entity.Column,
-	outputFields []string, opts ...client.SearchQueryOptionFunc) ([]entity.Column, error) {
-	var funcName = "QueryByPks"
+	outputFields []string, opts ...client.SearchQueryOptionFunc,
+) ([]entity.Column, error) {
+	funcName := "QueryByPks"
 	preRequest(funcName, ctx, collName, partitions, ids, outputFields, opts)
 
 	queryResults, err := mc.mClient.QueryByPks(ctx, collName, partitions, ids, outputFields, opts...)
diff --git a/test/testcases/database_test.go b/test/testcases/database_test.go
new file mode 100644
index 0000000..4b405db
--- /dev/null
+++ b/test/testcases/database_test.go
@@ -0,0 +1,82 @@
+package testcases
+
+import (
+	"context"
+	"testing"
+	"time"
+
+	"github.com/milvus-io/milvus-sdk-go/v2/client"
+	"github.com/milvus-io/milvus-sdk-go/v2/test/common"
+)
+
+func TestDatabase(t *testing.T) {
+	ctx, cancel := context.WithTimeout(context.Background(), 30*time.Second)
+	defer cancel()
+
+	clientDefault := createMilvusClient(ctx, t)
+	defer clientDefault.Close()
+
+	err := clientDefault.CreateDatabase(ctx, "db1")
+	common.CheckErr(t, err, true)
+
+	dbs, err := clientDefault.ListDatabases(ctx)
+	common.CheckErr(t, err, true)
+	if len(dbs) != 2 {
+		t.Fatalf("unexpected db number, %d, %+v", len(dbs), dbs)
+	}
+	clientDB1 := createMilvusClient(ctx, t, client.Config{
+		DBName: "db1",
+	})
+	defer clientDB1.Close()
+	db1Col1, _ := createCollectionAllFields(ctx, t, clientDB1, common.DefaultNb, 0)
+	db1Col2, _ := createCollectionAllFields(ctx, t, clientDB1, common.DefaultNb, 0)
+	collections, err := clientDB1.ListCollections(ctx)
+	common.CheckErr(t, err, true)
+	if len(collections) != 2 {
+		t.Fatalf("unexpected count of db1, %d", len(collections))
+	}
+
+	clientDefault.CreateDatabase(ctx, "db2")
+	common.CheckErr(t, err, true)
+	dbs, err = clientDefault.ListDatabases(ctx)
+	common.CheckErr(t, err, true)
+	if len(dbs) != 3 {
+		t.Fatalf("unexpected db number, %d, %+v", len(dbs), dbs)
+	}
+
+	clientDefault.UsingDatabase(ctx, "db2")
+	db2Col1, _ := createCollectionAllFields(ctx, t, clientDefault, common.DefaultNb, 0)
+	err = clientDefault.DropCollection(ctx, db2Col1)
+	common.CheckErr(t, err, true)
+
+	clientDefault.UsingDatabase(ctx, "")
+	err = clientDefault.DropDatabase(ctx, "db2")
+	common.CheckErr(t, err, true)
+
+	dbs, err = clientDefault.ListDatabases(ctx)
+	common.CheckErr(t, err, true)
+	if len(dbs) != 2 {
+		t.Fatalf("unexpected db number, %d, %+v", len(dbs), dbs)
+	}
+
+	err = clientDB1.DropDatabase(ctx, "db1")
+	common.CheckErr(t, err, false, "must drop all collections before drop database")
+
+	err = clientDB1.DropCollection(ctx, db1Col1)
+	common.CheckErr(t, err, true)
+
+	err = clientDB1.DropCollection(ctx, db1Col2)
+	common.CheckErr(t, err, true)
+
+	err = clientDB1.DropDatabase(ctx, "db1")
+	common.CheckErr(t, err, true)
+
+	err = clientDefault.DropDatabase(ctx, "default")
+	common.CheckErr(t, err, false, "can not drop default database")
+
+	dbs, err = clientDefault.ListDatabases(ctx)
+	common.CheckErr(t, err, true)
+	if len(dbs) != 1 {
+		t.Fatalf("unexpected db number, %d, %+v", len(dbs), dbs)
+	}
+}
diff --git a/test/testcases/index_test.go b/test/testcases/index_test.go
index b48c450..357070e 100644
--- a/test/testcases/index_test.go
+++ b/test/testcases/index_test.go
@@ -217,7 +217,7 @@ func TestCreateIndexInvalidParams(t *testing.T) {
 	// TODO unclear error message
 	idxInvalidm, _ := entity.NewIndexIvfPQ(entity.L2, 128, 7, 8)
 	errm := mc.CreateIndex(ctx, collName, common.DefaultFloatVecFieldName, idxInvalidm, false)
-	common.CheckErr(t, errm, false, "invalid index params")
+	common.CheckErr(t, errm, false, "dimension must")
 
 	// invalid Hnsw M [4, 64], efConstruction [8, 512]
 	_, errHnswM := entity.NewIndexHNSW(entity.L2, 3, 96)
@@ -239,7 +239,7 @@ func TestCreateIndexInvalidParams(t *testing.T) {
 	// TODO unclear error message
 	idx, _ := entity.NewIndexFlat(entity.JACCARD)
 	errMetricType := mc.CreateIndex(ctx, collName, common.DefaultFloatVecFieldName, idx, false)
-	common.CheckErr(t, errMetricType, false, "invalid index params")
+	common.CheckErr(t, errMetricType, false, "metric type not found or not supported")
 }
 
 // test create index with nil index
diff --git a/test/testcases/main_test.go b/test/testcases/main_test.go
index 5275155..aa8888a 100644
--- a/test/testcases/main_test.go
+++ b/test/testcases/main_test.go
@@ -37,7 +37,6 @@ func teardown() {
 	defer mc.Close()
 }
 
-//
 func createContext(t *testing.T, timeout time.Duration) context.Context {
 	ctx, cancel := context.WithTimeout(context.Background(), timeout)
 	t.Cleanup(func() {
@@ -47,10 +46,19 @@ func createContext(t *testing.T, timeout time.Duration) context.Context {
 }
 
 // create connect
-func createMilvusClient(ctx context.Context, t *testing.T) *base.MilvusClient {
+func createMilvusClient(ctx context.Context, t *testing.T, cfg ...client.Config) *base.MilvusClient {
 	t.Helper()
 
-	mc, err := base.NewDefaultMilvusClient(ctx, *addr)
+	var (
+		mc  *base.MilvusClient
+		err error
+	)
+	if len(cfg) == 0 {
+		mc, err = base.NewDefaultMilvusClient(ctx, *addr)
+	} else {
+		cfg[0].Address = *addr
+		mc, err = base.NewMilvusClient(ctx, cfg[0])
+	}
 	common.CheckErr(t, err, true)
 
 	t.Cleanup(func() {
@@ -96,7 +104,7 @@ func createDefaultBinaryCollection(ctx context.Context, t *testing.T, mc *base.M
 	// close connect and drop collection after each case
 	t.Cleanup(func() {
 		mc.DropCollection(ctx, collName)
-		//mc.Close()
+		// mc.Close()
 	})
 	return collName
 }
@@ -117,7 +125,7 @@ func createDefaultVarcharCollection(ctx context.Context, t *testing.T, mc *base.
 	// close connect and drop collection after each case
 	t.Cleanup(func() {
 		mc.DropCollection(ctx, collName)
-		//mc.Close()
+		// mc.Close()
 	})
 	return collName
 }