DescribeReplica()
This operation provides detailed information about the replicas of a specific collection.
func (c *Client) DescribeReplica(ctx context.Context, opt DescribeReplicaOption, callOptions ...grpc.CallOption) ([]*entity.ReplicaInfo, error)
Request Parameters
Parameter |
Description |
Type |
---|---|---|
|
Context for the current call to work. |
|
|
Optional parameters of the methods. |
|
|
Optional parameters for calling the methods. |
|
DescribeReplicaOption
This is an interface type. The describeReplicaOption
struct type implements this interface type. You can use NewDescribeReplicaOption
to get its concrete implementation.
NewDescribeReplicaOption
This method prepares the options for DescribeReplica()
. The signature of this method is as follows:
func NewDescribeReplicaOption(collectionName string) *describeReplicaOption
Parameter |
Description |
Type |
---|---|---|
|
The target collection of this operation. |
|
entity.ReplicaInfo
The entity.ReplicaInfo
struct type is as follows:
type ReplicaInfo struct {
ReplicaID int64
Shards []*Shard
Nodes []int64
ResourceGroupName string
NumOutboundNode map[string]int32
}
The struct type that appears in the entity.ReplicaInfo
struct type is as follows:
entity.Shard
The entity.Shard
struct type is as follows:
type Shard struct {
ChannelName string
ShardNodes []int64
ShardLeader int64
}
Return
[]*entity.ReplicaInfo
Example