setting

package
v0.0.0-...-4705fdb Latest Latest
Warning

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

Go to latest
Published: Dec 20, 2021 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	HTTPAddr     string
	ReadTimeout  time.Duration
	WriteTimeout time.Duration

	RdsDsn  string
	RdbOpts *redis.Options

	SentryDsn string
	LoggerCfg *LogConf
)

Functions

func LoadApp

func LoadApp(cfg *ini.File) error

func LoadLogger

func LoadLogger(cfg *ini.File) error

func LoadRdb

func LoadRdb(cfg *ini.File) error

func LoadRds

func LoadRds(cfg *ini.File) error

func LoadSentry

func LoadSentry(cfg *ini.File) error

func LoadServer

func LoadServer(cfg *ini.File) error

func Open

func Open(filename string) error

Types

type LogConf

type LogConf struct {
	Filename   string // 日志文件路径
	Level      int8   // 日志级别
	MaxSize    int    // 每个日志文件保存的最大尺寸 单位:M
	MaxBackups int    // 日志文件最多保存多少个备份
	MaxAge     int    // 文件最多保存多少天
	Compress   bool   // 是否压缩
}

Jump to

Keyboard shortcuts

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