Documentation ¶
Index ¶
- type Client
- func (c *Client) Close()
- func (c *Client) DeregisterInstance(instance *apiservice.Instance) error
- func (c *Client) Discover(drt apiservice.DiscoverRequest_DiscoverRequestType, ...) error
- func (c *Client) DiscoverRequest(request *apiservice.DiscoverRequest) (*apiservice.DiscoverResponse, error)
- func (c *Client) GetConfigFile(ctx context.Context, in *apiconfig.ClientConfigFileInfo) (*apiconfig.ConfigClientResponse, error)
- func (c *Client) Heartbeat(instance *apiservice.Instance) error
- func (c *Client) RegisterInstance(instance *apiservice.Instance) error
- func (c *Client) ReportClient(client *apiservice.Client) error
- func (c *Client) WatchConfigFiles(ctx context.Context, in *apiconfig.ClientWatchConfigFileRequest) (*apiconfig.ConfigClientResponse, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct { Conn *grpc.ClientConn ConfigConn *grpc.ClientConn Worker apiservice.PolarisGRPCClient ConfigWorker apiconfig.PolarisConfigGRPCClient }
Client GRPC客户端
func (*Client) DeregisterInstance ¶
func (c *Client) DeregisterInstance(instance *apiservice.Instance) error
DeregisterInstance 反注册服务实例
func (*Client) Discover ¶
func (c *Client) Discover(drt apiservice.DiscoverRequest_DiscoverRequestType, service *apiservice.Service, hook func(resp *apiservice.DiscoverResponse)) error
Discover 统一发现函数
func (*Client) DiscoverRequest ¶
func (c *Client) DiscoverRequest(request *apiservice.DiscoverRequest) (*apiservice.DiscoverResponse, error)
DiscoverRequest 统一发现函数
func (*Client) GetConfigFile ¶
func (c *Client) GetConfigFile(ctx context.Context, in *apiconfig.ClientConfigFileInfo) (*apiconfig.ConfigClientResponse, error)
func (*Client) Heartbeat ¶
func (c *Client) Heartbeat(instance *apiservice.Instance) error
Heartbeat 上报心跳
func (*Client) RegisterInstance ¶
func (c *Client) RegisterInstance(instance *apiservice.Instance) error
RegisterInstance 注册服务实例
func (*Client) ReportClient ¶
func (c *Client) ReportClient(client *apiservice.Client) error
ReportClient 上报客户端信息
func (*Client) WatchConfigFiles ¶
func (c *Client) WatchConfigFiles(ctx context.Context, in *apiconfig.ClientWatchConfigFileRequest) (*apiconfig.ConfigClientResponse, error)
订阅配置变更
Click to show internal directories.
Click to hide internal directories.