Add initial interface to proxy service client

Signed-off-by: dragondriver <jiquan.long@zilliz.com>
pull/4973/head^2
dragondriver 2021-01-26 15:09:31 +08:00 committed by yefu.chen
parent d972b75aaa
commit ad244dc4e8
1 changed files with 16 additions and 0 deletions

View File

@ -3,6 +3,10 @@ package grpcproxyservice
import (
"context"
"github.com/zilliztech/milvus-distributed/internal/proto/internalpb2"
"github.com/zilliztech/milvus-distributed/internal/proto/commonpb"
"google.golang.org/grpc"
"github.com/zilliztech/milvus-distributed/internal/proto/proxypb"
@ -44,6 +48,18 @@ func (c *Client) InvalidateCollectionMetaCache(request *proxypb.InvalidateCollMe
return err
}
func (c *Client) GetTimeTickChannel() (string, error) {
response, err := c.proxyServiceClient.GetTimeTickChannel(c.ctx, &commonpb.Empty{})
if err != nil {
return "", err
}
return response.Value, nil
}
func (c *Client) GetComponentStates() (*internalpb2.ComponentStates, error) {
return c.proxyServiceClient.GetComponentStates(c.ctx, &commonpb.Empty{})
}
func NewClient(address string) *Client {
return &Client{
address: address,