DescribeResourceGroup()
This method describes a resource group in detail.
func (c *Client) DescribeResourceGroup(ctx context.Context, opt DescribeResourceGroupOption, callOptions ...grpc.CallOption) (*entity.ResourceGroup, error)
Request Parameters
Parameter |
Description |
Type |
---|---|---|
|
Context for the current call to work. |
|
|
Optional parameters of the methods. |
|
|
Optional parameters for calling the methods. |
|
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:
func NewDescribeResourceGroupOption(name string) *describeResourceGroupOption
Parameter |
Description |
Type |
---|---|---|
|
Name of the target resource group. |
|
entity.ResourceGroup
The entity.ResourceGroup
struct type is as follows:
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:
type ResourceGroupConfig struct {
Requests ResourceGroupLimit
Limits ResourceGroupLimit
TransferFrom []*ResourceGroupTransfer
TransferTo []*ResourceGroupTransfer
NodeFilter ResourceGroupNodeFilter
}
entity.ResourceGroupLimit
The entity.ResourceGroupLimit
struct type is as follows:
type ResourceGroupLimit struct {
NodeNum int32
}
entity.ResourceGroupNodeFilter
The entity.ResourceGroupNodeFilter
struct type is as follows:
type ResourceGroupNodeFilter struct {
NodeLabels map[string]string
}
entity.ResourceGroupTransfer
The entity.ResourceGroupTransfer
struct type is as follows:
type ResourceGroupTransfer struct {
ResourceGroup string
}
Return
*entity.ResourceGroup
Example
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)