[skip ci]Fix golint error in proxy (#10864)

Signed-off-by: zhenshan.cao <zhenshan.cao@zilliz.com>
pull/10865/head
zhenshan.cao 2021-10-29 00:00:41 +08:00 committed by GitHub
parent c0ea7ee780
commit 690dcb8b39
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 0 deletions

View File

@ -37,6 +37,7 @@ import (
"google.golang.org/grpc/codes"
)
// Client is the grpc client for Proxy
type Client struct {
ctx context.Context
cancel context.CancelFunc
@ -90,6 +91,7 @@ func (c *Client) resetConnection() {
c.grpcClient = nil
}
// NewClient creates a new client instance
func NewClient(ctx context.Context, addr string) (*Client, error) {
if addr == "" {
return nil, fmt.Errorf("address is empty")
@ -106,6 +108,7 @@ func NewClient(ctx context.Context, addr string) (*Client, error) {
return client, nil
}
// Init initializes Proxy's grpc client.
func (c *Client) Init() error {
Params.Init()
return c.connect(retry.Attempts(20))