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

Documentation

Index

Constants

This section is empty.

Variables

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

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

Functions

func UnaryErrorInterceptor

func UnaryErrorInterceptor(ctx context.Context, req interface{}, info *grpc.UnaryServerInfo, handler grpc.UnaryHandler) (resp interface{}, err error)

UnaryErrorInterceptor 错误拦截器。将error转为grpc错误

Types

type CalculatorGRPCServer

type CalculatorGRPCServer struct {
	AddServer transport.Handler
	SubServer transport.Handler
	MulServer transport.Handler
	DivServer transport.Handler
}

CalculatorGRPCServer 计算器GRPC服务

func NewCalculatorGRPCServer

func NewCalculatorGRPCServer(service cmd_endpoint.CalculatorService, middlewares endpoint.Middleware, options ...transport.ServerOption) *CalculatorGRPCServer

NewCalculatorGRPCServer 创建计算器GRPC服务

func (*CalculatorGRPCServer) Add

func (*CalculatorGRPCServer) Div

func (*CalculatorGRPCServer) Mul

func (*CalculatorGRPCServer) Sub

type HealthGRPCServer

type HealthGRPCServer struct {
	CheckServer transport.Handler
}

HealthGRPCServer 健康检查GRPC服务

func NewHealthGRPCServer

func NewHealthGRPCServer(service cmd_endpoint.HealthService, middlewares endpoint.Middleware, options ...transport.ServerOption) *HealthGRPCServer

NewHealthGRPCServer 创建健康检查GRPC服务

func (*HealthGRPCServer) Check

Check 检查指定服务的健康状态

func (*HealthGRPCServer) Watch

Watch 观察指定服务的健康状态。未实现

Jump to

Keyboard shortcuts

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