transport

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: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewCalculatorClient

func NewCalculatorClient(transportFactory CalculatorTransportFactory, instancer sd.Instancer, logger kit_log.Logger) *cli_endpoint.CalculatorEndpoints

NewCalculatorClient 创建计算器客户端 这一步集成服务发现、负载均衡、失败重试

func NewHealthClient

func NewHealthClient(transportFactory HealthTransportFactory, instancer sd.Instancer, logger kit_log.Logger) *cli_endpoint.HealthEndpoints

NewHealthClient 创建健康检查客户端 这一步集成服务发现、负载均衡、失败重试

Types

type CalculatorTransport

type CalculatorTransport interface {
	io.Closer
	NewAddEndpoint() endpoint.Endpoint
	NewSubEndpoint() endpoint.Endpoint
	NewMulEndpoint() endpoint.Endpoint
	NewDivEndpoint() endpoint.Endpoint
}

CalculatorTransport 传输层传输层客户端接口

type CalculatorTransportFactory

type CalculatorTransportFactory func(ctx context.Context, target string) (CalculatorTransport, error)

CalculatorTransportFactory 健康检查传输层客户端factory

type HealthTransport

type HealthTransport interface {
	io.Closer
	NewCheckEndpoint() endpoint.Endpoint
}

HealthTransport 健康检查传输层客户端接口

type HealthTransportFactory

type HealthTransportFactory func(ctx context.Context, target string) (HealthTransport, error)

HealthTransportFactory 健康检查传输层客户端factory

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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