endpoint

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewCalculatorAddEndpoint

func NewCalculatorAddEndpoint(service CalculatorService) endpoint.Endpoint

NewCalculatorAddEndpoint 创建计算器加法方法endpoint

func NewCalculatorDivEndpoint

func NewCalculatorDivEndpoint(service CalculatorService) endpoint.Endpoint

NewCalculatorDivEndpoint 创建计算器除法方法endpoint

func NewCalculatorMulEndpoint

func NewCalculatorMulEndpoint(service CalculatorService) endpoint.Endpoint

NewCalculatorMulEndpoint 创建计算器乘法方法endpoint

func NewCalculatorSubEndpoint

func NewCalculatorSubEndpoint(service CalculatorService) endpoint.Endpoint

NewCalculatorSubEndpoint 创建计算器减法方法endpoint

func NewHealthCheckEndpoint

func NewHealthCheckEndpoint(service HealthService) endpoint.Endpoint

NewHealthCheckEndpoint 创建健康检查endpoint

Types

type CalculatorService

type CalculatorService interface {
	Add(ctx context.Context, a, b int32) (int32, error)

	Sub(ctx context.Context, c, d int32) (int32, error)

	Mul(ctx context.Context, e, f int32) (int32, error)

	Div(ctx context.Context, m, n int32) (float32, error)
}

CalculatorService 计算器服务接口

type HealthService

type HealthService interface {
	Check(ctx context.Context, serviceName string) (protocol.HealthServiceStatus, error)
}

HealthService 健康检查服务接口

Jump to

Keyboard shortcuts

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