snake

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Feb 26, 2021 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// ModeDebug debug mode
	ModeDebug string = "debug"
	// ModeRelease release mode
	ModeRelease string = "release"
	// ModeTest test mode
	ModeTest string = "test"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Application

type Application struct {
	Conf        *conf.Config
	DB          *gorm.DB
	RedisClient redis.UniversalClient
	Router      *gin.Engine
	BizService  *service.Service
	RPCServer   *grpc.Server
	Debug       bool
}

Application a container for your application.

var App *Application

App is singleton

func New

func New(cfg *conf.Config) *Application

New create a app

func (*Application) GracefulStop added in v1.3.0

func (a *Application) GracefulStop(httpSrv *http.Server)

GracefulStop 优雅退出

func (*Application) Run

func (a *Application) Run()

Run start a app

Jump to

Keyboard shortcuts

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