service

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

Documentation

Index

Constants

View Source
const ContextReqUUid = "req_uuid"

ContextReqUUid 请求上下文uuid

Variables

This section is empty.

Functions

This section is empty.

Types

type NewMiddlewareServer

type NewMiddlewareServer func(Service) Service

NewMiddlewareServer 创建服务中间件

func NewLogMiddlewareServer

func NewLogMiddlewareServer(log *zap.Logger) NewMiddlewareServer

NewLogMiddlewareServer 创建日志中间件 @param log 日志对象

type Service

type Service interface {
	// Login 登录方法
	// @param ctx 协程上下文
	// @param in 登录请求
	// @return ack 登录响应
	Login(ctx context.Context, in *proto.Login) (ack *proto.LoginAck, err error)
}

Service 服务接口

func NewService

func NewService(log *zap.Logger) Service

NewService 创建服务 @param log 日志对象

Jump to

Keyboard shortcuts

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