[skip ci] Add comment for grpcclient.ClientBase (#12966)

Signed-off-by: shaoyue.chen <shaoyue.chen@zilliz.com>
pull/12975/head
shaoyue 2021-12-08 15:15:42 +08:00 committed by GitHub
parent 5045ba208e
commit 8f2c630434
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 0 deletions

View File

@ -33,6 +33,7 @@ type GrpcClient interface {
Close() error
}
// ClientBase is a base of grpc client
type ClientBase struct {
getAddrFunc func() (string, error)
newGrpcClient func(cc *grpc.ClientConn) interface{}
@ -45,10 +46,12 @@ type ClientBase struct {
ClientMaxRecvSize int
}
// SetRole sets role of client
func (c *ClientBase) SetRole(role string) {
c.role = role
}
// GetRole returns role of client
func (c *ClientBase) GetRole() string {
return c.role
}