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 |
---|---|---|
|
Context for the current call to work. |
|
|
Optional parameters of the methods. |
|
|
Optional parameters for calling the methods. |
|
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 |
---|---|---|
|
Name of the collection whose replicas will be transferred. |
|
|
Name of the source resource group of this operation. |
|
|
Name of the target resource group of this operation. |
|
|
Number of replicas to transfer. |
|
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
}