deployed

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Dec 18, 2020 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var AntsPool, _ = ants.NewPool(500000)

AntsPool ants pool instance

View Source
var AppConfig = new(Application)

Functions

func IsModeDebug

func IsModeDebug() bool

func IsModeDev

func IsModeDev() bool

func IsModeProd

func IsModeProd() bool

func LoadConfig

func LoadConfig(filename string) error

如果filename为空,将使用config.yaml配置文件,并在当前文件搜索

func RegisterViperDefault

func RegisterViperDefault(f ...func())

RegisterViperDefaultFunc 增加设置viper默认值回调

func SetupConfig

func SetupConfig(path string)

载入配置文件

func SetupLogger

func SetupLogger()

func ViperGops

func ViperGops() agent.Options

func ViperInitDefault

func ViperInitDefault()

ViperInitDefault 运行注册了的初始化viper默认值的所有回调

func ViperLogger

func ViperLogger() izap.Config

func ViperLoggerDefault

func ViperLoggerDefault()

Types

type Application

type Application struct {
	Mode          string // 工作模式
	Name          string // 应用名称
	Host          string // 主机名
	Port          string // 端口
	ReadTimeout   int    // 读超时
	WriterTimeout int    // 写超时
}

func ViperApplication

func ViperApplication() *Application

func (Application) Addr

func (sf Application) Addr() string

Jump to

Keyboard shortcuts

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