transport

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: May 9, 2019 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrBadRouting = errors.New("inconsistent mapping between route and handler")
)

自定义错误类型

Functions

func GRPCToContext

func GRPCToContext() grpctransport.ServerRequestFunc

GRPCToContext 将GRPC中的metadata信息转换为上下文信息

func HTTPToContext

func HTTPToContext() httptransport.RequestFunc

HTTPToContext 将HTTP中的header信息转换为上下文信息

func NewGRPCServer

func NewGRPCServer(endpoints endpoint.Set, logger log.Logger) pb.SayServiceServer

NewGRPCServer 新建GRPC服务器方法

func NewHTTPHandler

func NewHTTPHandler(endpoints endpoint.Set, logger log.Logger) http.Handler

NewHTTPHandler 新建HTTP服务器方法

Types

This section is empty.

Jump to

Keyboard shortcuts

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