Documentation ¶
Index ¶
- Variables
- type CalculatorGRPCClient
- func (client *CalculatorGRPCClient) Close() error
- func (client *CalculatorGRPCClient) NewAddEndpoint() endpoint.Endpoint
- func (client *CalculatorGRPCClient) NewDivEndpoint() endpoint.Endpoint
- func (client *CalculatorGRPCClient) NewMulEndpoint() endpoint.Endpoint
- func (client *CalculatorGRPCClient) NewSubEndpoint() endpoint.Endpoint
- type HealthGRPCClient
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
Click to show internal directories.
Click to hide internal directories.