configx

package
v1.2.9 Latest Latest
Warning

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

Go to latest
Published: Oct 29, 2022 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BaseConfig

type BaseConfig struct {
	sync.RWMutex
	Database      string `json:"database"`
	CenterAddr    string `json:"center_addr"`
	UdpPort       int    `json:"udp_port"`
	Redis         string `json:"redis"`
	RedisPassword string `json:"redis_password"`
}

type Config

type Config struct {
	Name                         string `json:"name"`
	Version                      string `json:"version"`
	Host                         string `json:"host"`
	DataRoot                     string `json:"data_root"`
	RelativeShutdownInfoFilePath string `json:"relative_shutdown_info_file_path"`
	RelativeLogPath              string `json:"relative_log_path"`
	Jwt                          *jwtx.JwtMould
}

func Default

func Default() *Config

func (*Config) InitLog

func (c *Config) InitLog(level zapcore.Level)

func (*Config) Listener

func (c *Config) Listener()

func (*Config) WriteShutdownPort

func (c *Config) WriteShutdownPort(port int) error

type ConfigAll

type ConfigAll struct {
	Config
	BaseConfig
}

ConfigAll 包含全部配置信息

Jump to

Keyboard shortcuts

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