grpc

package
v1.14.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 27, 2023 License: Apache-2.0, BSD-2-Clause, BSD-3-Clause, + 3 more Imports: 9 Imported by: 0

Documentation

Index

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 NewClient

func NewClient(address string) (*Client, error)

NewClient 创建GRPC客户端

func (*Client) Close

func (c *Client) Close()

Close 关闭连接

func (*Client) DeregisterInstance

func (c *Client) DeregisterInstance(instance *apiservice.Instance) error

DeregisterInstance 反注册服务实例

func (*Client) Discover

Discover 统一发现函数

func (*Client) DiscoverRequest

func (c *Client) DiscoverRequest(request *apiservice.DiscoverRequest) (*apiservice.DiscoverResponse, error)

DiscoverRequest 统一发现函数

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

订阅配置变更

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL