Skip to main content

DropAlias()

This method drops an alias.

func (c *Client) DropAlias(ctx context.Context, option DropAliasOption, callOptions ...grpc.CallOption) error

Request Parameters

Parameter

Description

Type

ctx

Context for the current call to work.

context.Context

option

Optional parameters of the methods.

DropAliasOption

callOpts

Optional parameters for calling the methods.

grpc.CallOption

DropAliasOption

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

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

NewDropCollectionOption

The signature of this method is as follows:

func NewDropAliasOption(alias string) *dropAliasOption

Parameter

Description

Type

alias

Name of the alias to drop.

string

Return

Null

Example

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

err = cli.DropAlias(ctx, milvusclient.NewDropAliasOption("alice"))
if err != nil {
// handle error
}