Skip to main content

DescribeAlias()

This method describes an alias by providing detailed information about its associated collection.

func (c *Client) DescribeAlias(ctx context.Context, option DescribeAliasOption, callOptions ...grpc.CallOption) (*entity.Alias, error)

Request Parameters

Parameter

Description

Type

ctx

Context for the current call to work.

context.Context

option

Optional parameters of the methods.

DescribeAliasOption

callOpts

Optional parameters for calling the methods.

grpc.CallOption

DescribeAliasOption

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

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

NewDescribeAliasOption

The signature of this method is as follows:

func NewDescribeAliasOption(alias string) *describeAliasOption

Parameter

Description

Type

alias

Alias to be described.

string

entity.Alias

The entity.Alias struct type is as follows:

type Alias struct {
DbName string
Alias string
CollectionName string
}

Return

*entity.Alias

Example

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

alias, err := cli.DescribeAlias(ctx, milvusclient.NewDescribeAliasOption("bob"))
if err != nil {
// handle error
}
fmt.Println(alias)