config

package
v0.0.0-...-11e63cd Latest Latest
Warning

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

Go to latest
Published: Jun 23, 2022 License: MulanPSL-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (

	// AllowMaxNumHosts 系统允许管理的最大主机数量
	AllowMaxNumHosts = 100

	// Cfg 程序运行时的配置
	Cfg = &Config{
		HTTPListeningOnAddr: "0.0.0.0:8016",
		Debug:               false,
	}
)

Functions

func MustLoadConfig

func MustLoadConfig()

MustLoadConfig 加载配置文件

Types

type Config

type Config struct {
	// HTTPListeningOnAddr HTTP监听地址
	HTTPListeningOnAddr string `toml:"http_listening_on_addr" comment:"HTTP服务监听的地址"`

	// Debug 详细日志会输出到文件
	Debug bool `toml:"debug" comment:"设置为 true 则会输出详细日志到 ./debug.log 文件"`
}

Config

Jump to

Keyboard shortcuts

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