🚀 Try Zilliz Cloud, the fully managed Milvus, for free—experience 10x faster performance! Try Now>>

Milvus
Zilliz
< Docs
  • Go

TransferReplica()

This method updates the configuration of a resource group.

func (c *Client) TransferReplica(ctx context.Context, opt TransferReplicaOption, callOptions ...grpc.CallOption) error

Request Parameters

Parameter

Description

Type

ctx

Context for the current call to work.

context.Context

opt

Optional parameters of the methods.

TransferReplicaOption

callOptions

Optional parameters for calling the methods.

grpc.CallOption

TransferReplicaOption

This is an interface type. The transferReplicaOption struct type implements this interface type.

You can use the NewTransferReplicaOption() function to get the concrete implementation.

NewTransferReplicaOption

The signature of this method is as follows:

func NewTransferReplicaOption(collectionName, sourceGroup, targetGroup string, replicaNum int64) *transferReplicaOption

Parameter

Description

Type

collectionName

Name of the collection whose replicas will be transferred.

string

sourceGroup

Name of the source resource group of this operation.

string

targetGroup

Name of the target resource group of this operation.

string

replicaNum

Number of replicas to transfer.

int64

Return

Null

Example

import (
        "context"
        "github.com/milvus-io/milvus/client/v2/milvusclient"
)

err = cli.TransferReplica(ctx, milvusclient.NewTransferReplicaOption("quick_setup", "rg_1", "rg_2", 1))
if err != nil {
    // handle error
}

Try Managed Milvus for Free

Zilliz Cloud is hassle-free, powered by Milvus and 10x faster.

Get Started
Feedback

Was this page helpful?