跳到主要内容
版本:v2.5.x

DescribeResourceGroup()

This method describes a resource group in detail.

Go
func (c *Client) DescribeResourceGroup(ctx context.Context, opt DescribeResourceGroupOption, callOptions ...grpc.CallOption) (*entity.ResourceGroup, error)

Request Parameters

Parameter

Description

Type

ctx

Context for the current call to work.

context.Context

opt

Optional parameters of the methods.

DescribeResourceGroupOption

callOptions

Optional parameters for calling the methods.

grpc.CallOption

DescribeResourceGroupOption

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

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

NewDescribeResourceGroupOption

The signature of this method is as follows:

Go
func NewDescribeResourceGroupOption(name string) *describeResourceGroupOption

Parameter

Description

Type

name

Name of the target resource group.

string

entity.ResourceGroup

The entity.ResourceGroup struct type is as follows:

Go
type ResourceGroup struct {
Name string
Capacity int32
NumAvailableNode int32
NumLoadedReplica map[string]int32
NumOutgoingNode map[string]int32
NumIncomingNode map[string]int32
Config *ResourceGroupConfig
Nodes []NodeInfo
}

entity.ResourceGroupConfig

The entity.ResourceGroupConfig struct type is as follows:

Go
type ResourceGroupConfig struct {
Requests ResourceGroupLimit
Limits ResourceGroupLimit
TransferFrom []*ResourceGroupTransfer
TransferTo []*ResourceGroupTransfer
NodeFilter ResourceGroupNodeFilter
}

entity.ResourceGroupLimit

The entity.ResourceGroupLimit struct type is as follows:

Go
type ResourceGroupLimit struct {
NodeNum int32
}

entity.ResourceGroupNodeFilter

The entity.ResourceGroupNodeFilter struct type is as follows:

Go
type ResourceGroupNodeFilter struct {
NodeLabels map[string]string
}

entity.ResourceGroupTransfer

The entity.ResourceGroupTransfer struct type is as follows:

Go
type ResourceGroupTransfer struct {
ResourceGroup string
}

Return

*entity.ResourceGroup

Example

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

rg, err := cli.DescribeResourceGroup(ctx, milvusclient.NewDescribeResourceGroupOption("my_rg"))
if err != nil {
// handle error
}
fmt.Println(rg)