configx

package
v1.7.7 Latest Latest
Warning

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

Go to latest
Published: Sep 14, 2023 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"`
	DfsPort     string `json:"dfs_port"`
	StreamPort  string `json:"stream_port"`
	MqUserName  string `json:"mq_user_name"`
	MqPassword  string `json:"mq_password"`
	Redis       string `json:"redis"`
	TracingAddr string `json:"tracing_addr"`

	RedisPassword string `json:"redis_password"`
	UdpPort       int32  `json:"udp_port"`
}

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"`
	Env                          string `json:"env"`
	Server                       string `json:"server"`
	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