grpc

package
v0.0.0-...-5d8c97e Latest Latest
Warning

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

Go to latest
Published: Aug 6, 2019 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Encoder = copier.NewCopier("protobuf.name", "form")

	Decoder = copier.NewCopier("reply", "protobuf.name")
)

Functions

This section is empty.

Types

type CalculatorGRPCClient

type CalculatorGRPCClient struct {
	// contains filtered or unexported fields
}

CalculatorGRPCClient 计算器GRPC传输层客户端

func NewCalculatorGRPCClient

func NewCalculatorGRPCClient(ctx context.Context, target string) (*CalculatorGRPCClient, error)

NewCalculatorGRPCClient 创建计算器GRPC传输层客户端

func (*CalculatorGRPCClient) Close

func (client *CalculatorGRPCClient) Close() error

func (*CalculatorGRPCClient) NewAddEndpoint

func (client *CalculatorGRPCClient) NewAddEndpoint() endpoint.Endpoint

func (*CalculatorGRPCClient) NewDivEndpoint

func (client *CalculatorGRPCClient) NewDivEndpoint() endpoint.Endpoint

func (*CalculatorGRPCClient) NewMulEndpoint

func (client *CalculatorGRPCClient) NewMulEndpoint() endpoint.Endpoint

func (*CalculatorGRPCClient) NewSubEndpoint

func (client *CalculatorGRPCClient) NewSubEndpoint() endpoint.Endpoint

type HealthGRPCClient

type HealthGRPCClient struct {
	// contains filtered or unexported fields
}

HealthGRPCClient 健康检查传输层客户端

func NewHealthGRPCClient

func NewHealthGRPCClient(ctx context.Context, target string) (*HealthGRPCClient, error)

NewHealthGRPCClient 创建健康检查GRPC传输层客户端

func (*HealthGRPCClient) Close

func (client *HealthGRPCClient) Close() error

Close 关闭连接 需要确保客户端对象创建的endpoint全部使用完毕 实际由负载均衡逻辑调用Close

func (*HealthGRPCClient) NewCheckEndpoint

func (client *HealthGRPCClient) NewCheckEndpoint() endpoint.Endpoint

Jump to

Keyboard shortcuts

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