github.com/milvus-io/milvus-sdk-go/v2@v2.4.1/docs/new_client.md (about) 1 # New Client 2 3 This is the "Constructor" method set (only one for current release) to obtain `Client` instance. 4 5 ## Parameters 6 7 | Parameter | Description | Type | 8 | ------------ | ------------------------------------------------------------ | ------------------------ | 9 | `ctx` | Context to control API invocation process | context.Context | 10 | `addr` | Address of the Milvus instance | String | 11 12 13 ## Response 14 - Milvus client instance. 15 - `err`: connection error (if any). 16 17 ## Example 18 19 ```go 20 ctx := context.Background() 21 cli, err := client.NewClient(context.Background(), client.Config{ 22 Address: "localhost:19530", 23 }) 24 ```