ldgin

package
v0.0.0-...-ffa5e5f Latest Latest
Warning

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

Go to latest
Published: Oct 3, 2019 License: Apache-2.0 Imports: 9 Imported by: 0

README

####项目简介 Gin封装, 参考B站GO框架

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Engine

type Engine struct {
	Engine *gin.Engine
	// contains filtered or unexported fields
}

func DefaultServer

func DefaultServer(conf *ServerConfig) *Engine

func (*Engine) LoadServer

func (e *Engine) LoadServer() *http.Server

func (*Engine) RunServer

func (e *Engine) RunServer(server *http.Server, listen net.Listener) (err error)

func (*Engine) Shutdown

func (e *Engine) Shutdown(cxt context.Context) error

func (*Engine) Start

func (e *Engine) Start() error

type ServerConfig

type ServerConfig struct {
	Network      string
	Addr         string
	Mode         string
	ReadTimeout  time.Duration
	WriteTimeout time.Duration
}

Jump to

Keyboard shortcuts

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