Close()
This method closes the currently connected Milvus deployment.
func (c *Client) Close(ctx context.Context) error
Request Parameters
Parameter | Description | Type |
---|---|---|
| Context for the current call to work. |
|
Return
Null
Example
import (
"context"
"github.com/milvus-io/milvus/v2/milvusclient"
)
// user cluster username and password
mclient, err := client.New(context.Background(), client.Config{
Address: "YOUR_CLUSTER_ENDPOINT",
Username: "YOUR_USERNAME",
Password: "YOUR_PASSWORD"
})
// or use an API key with appropriate permissions
// client, err := client.New(context.Background(), client.Config{
// Address: "YOUR_CLUSTER_ENDPOINT",
// APIKey: "YOUR_API_KEY",
// EnableTLSAuth: true,
// })
mclient.close()