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

Milvus
Zilliz
< Docs
  • Go

CreateResourceGroup()

This method creates a resource group.

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

notes

A Milvus instance begins with a default resource group that includes all available query nodes.

To optimize resource utilization, you can create additional resource groups, reassign specific query nodes from the default group, and load collections into these newly configured groups.

This approach ensures that collections are allocated dedicated query nodes, enabling efficient and isolated search services.

For details about resource groups, refer to Manage Resource Group.

Request Parameters

Parameter

Description

Type

ctx

Context for the current call to work.

context.Context

opt

Optional parameters of the methods.

CreateResourceGroupOption

callOptions

Optional parameters for calling the methods.

grpc.CallOption

CreateResourceGroupOption

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

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

NewCreateResourceGroupOption

The signature of this method is as follows:

func NewCreateResourceGroupOption(name string) *createResourceGroupOption

Parameter

Description

Type

name

Name of the target resource group.

string

Return

Null

Example

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

err = cli.CreateResourceGroup(ctx, milvusclient.NewCreateResourceGroupOption("my_rg"))
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?