transport

package
v0.0.0-...-31e44ea Latest Latest
Warning

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

Go to latest
Published: Jan 22, 2022 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewGRPCServer

func NewGRPCServer(endpoint endpoint.EndPointServer, log *zap.Logger) proto.UserServer

NewGRPCServer 创建GRPC服务 @param endpoint 端点服务对象 @param log 日志对象 @return proto.UserServer 用户服务对象

func RequestGrpcLogin

func RequestGrpcLogin(_ context.Context, grpcReq interface{}) (interface{}, error)

RequestGrpcLogin 处理客户端的登录请求

func ResponseGrpcLogin

func ResponseGrpcLogin(_ context.Context, response interface{}) (interface{}, error)

ResponseGrpcLogin 处理服务器登录响应

Types

type LogErrorHandler

type LogErrorHandler struct {
	// contains filtered or unexported fields
}

LogErrorHandler 错误日志处理器

func NewZapLogErrorHandler

func NewZapLogErrorHandler(logger *zap.Logger) *LogErrorHandler

NewZapLogErrorHandler 创建错误日志处理器对象

func (*LogErrorHandler) Handle

func (h *LogErrorHandler) Handle(ctx context.Context, err error)

Handle 处理错误的方法

Jump to

Keyboard shortcuts

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