config

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Oct 13, 2022 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Load

func Load()

Load 导入配置和参数

Types

type AppConfig

type AppConfig struct {
	Server *ServerConfig `yaml:"server"`
	Rpc    *RpcConfig    `yaml:"rpc"`
}
var AppCfg *AppConfig

type RpcConfig

type RpcConfig struct {
	Addr        string `yaml:"addr"`
	Initial     int    `yaml:"initial"`
	MaxOpen     int    `yaml:"max-open"`
	MaxIdle     int    `yaml:"max-idle"`
	MaxLifeTime int    `yaml:"max-life-time"`
	MaxIdleTime int    `yaml:"max-idle-time"`
}

type ServerConfig

type ServerConfig struct {
	Host string `yaml:"host"`
	Port int    `yaml:"port"`
}

Jump to

Keyboard shortcuts

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