http

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Apr 3, 2021 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Inject added in v1.0.0

func Inject(container *dig.Container)

Types

type Config added in v1.0.0

type Config struct {
	Port int
	// jwt的key
	JwtSignKey []byte
	// trace header key
	TraceHeader string
	// 是否开启pprof
	Pprof bool
	// 是否开启swagger文档
	Swagger bool
}

type Server

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

Server Web服务管理器

func NewServer

func NewServer(conf *Config) *Server

NewServer 获取Server示例

func (*Server) Close added in v1.0.0

func (server *Server) Close()

Close 平滑重启

func (*Server) Serve added in v1.0.0

func (server *Server) Serve()

Run run http server

Directories

Path Synopsis
r 基于gin的Context,实现响应数据结构体 集成全局traceID
r 基于gin的Context,实现响应数据结构体 集成全局traceID

Jump to

Keyboard shortcuts

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