handler

package
v0.0.0-...-d1e7c79 Latest Latest
Warning

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

Go to latest
Published: Dec 29, 2024 License: MIT Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

GrpcServerSet grpc服务端

LoggerSet 全局日志

View Source
var RegisterByEtcdSet = wire.NewSet(byEtcd.NewRegister, NewEtcdClient, wire.Value(30))

RegisterByEtcdSet etcd注册中心

Functions

func GetGrpcServerOptions

func GetGrpcServerOptions(r registry.Registry, l *logs.ZapLogger) []myGrpc.Options

GetGrpcServerOptions grpc服务配置

func GinLogger

func GinLogger(log *logs.ZapLogger) gin.HandlerFunc

GinLogger 接收gin框架默认的日志

func GinRecovery

func GinRecovery(stack bool, log *logs.ZapLogger) gin.HandlerFunc

GinRecovery recover掉项目可能出现的panic,并使用zap记录相关日志

func NewEtcdClient

func NewEtcdClient(conf *viper.Viper) (*clientv3.Client, error)

NewEtcdClient etcd客户端

Types

This section is empty.

Jump to

Keyboard shortcuts

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