Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { App *App `json:"app" toml:"app"` // [mysql] MongoDB *mongodb `json:"mysql" toml:"mysql"` // [http] Http *Http `json:"http" toml:"http"` // [grpc] Grpc *Grpc `json:"grpc" toml:"grpc"` // [kafka] Kafka *Kafka `json:"kafka" toml:"kafka"` }
程序的配置对象 config --> object
func DefaultConfig ¶
func DefaultConfig() *Config
func LoadConfigFromEnv ¶
func LoadConfigFromToml ¶
type Grpc ¶
type Grpc struct { Host string `json:"host" toml:"host" env:"GRPC_HOST"` Port int `json:"port" toml:"port" env:"GRPC_PORT"` }
func NewDefaultGrpc ¶
func NewDefaultGrpc() *Grpc
Click to show internal directories.
Click to hide internal directories.