Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Parseconfig ¶
func Parseconfig(filepath string, out interface{})
Parseconfig parse json config out must be pointer
Types ¶
type BaseCfg ¶
type BaseCfg struct {
Etcd EtcdCfg `json:"etcdCfg"`
Zipkin ZipkinCfg `json:"zipkinCfg"`
Staff StaffCfg `json:"staffCfg"`
}
BaseCfg 服务基础配置
type EtcdCfg ¶
type EtcdCfg struct {
EndPoints []string `json:"endpoints" yaml:"endpoints"`
User string `json:"user" yaml:"user"`
Psw string `json:"psw" yaml:"psw"`
Timeout time.Duration `json:"timeout" yaml:"timeout"`
}
EtcdCfg 对应配置文件中关于etcd配置内容
type MysqlCfg ¶
type MysqlCfg struct {
Host struct {
Read string `json:"read"`
Write string `json:"write"`
} `json:"Host"`
Port int `json:"Port"`
User string `json:"User"`
Psw string `json:"Psw"`
DbName string `json:"DbName"`
}
MysqlCfg mysql config
Click to show internal directories.
Click to hide internal directories.