2017-04-27 05:58:34 +00:00
|
|
|
package config_manager
|
|
|
|
|
|
|
|
/* global config 예제
|
2017-04-27 07:44:35 +00:00
|
|
|
central:
|
|
|
|
address: "http://localhost:9090"
|
|
|
|
port: 443
|
|
|
|
log_Path: "./bin/log.xml"
|
|
|
|
paths:
|
|
|
|
rootFolder : "/home/cm2/"
|
|
|
|
configFolder : "config/"
|
|
|
|
binaryFolder : "container/"
|
|
|
|
pidFolder : "pids/"
|
|
|
|
scriptFile : "start"
|
|
|
|
intervalSecond: 10
|
2017-04-27 05:58:34 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
type GlobalConfig struct {
|
|
|
|
Central struct {
|
2017-04-27 11:16:19 +00:00
|
|
|
Address string `yaml:"address"`
|
|
|
|
Port int `yaml:"port"`
|
2017-04-27 05:58:34 +00:00
|
|
|
}
|
2017-04-27 11:16:19 +00:00
|
|
|
LogPath string `yaml:"logPath"`
|
|
|
|
Paths struct {
|
|
|
|
RootFolder string `yaml:"rootFolder"`
|
|
|
|
ConfigFolder string `yaml:"configFolder"`
|
|
|
|
BinaryFolder string `yaml:"binaryFolder"`
|
|
|
|
PidFolder string `yaml:"pidFolder"`
|
|
|
|
ScriptFile string `yaml:"scriptFile"`
|
2017-04-27 07:04:12 +00:00
|
|
|
}
|
2017-04-27 11:16:19 +00:00
|
|
|
IntervalSecond int `yaml:"intervalSecond"`
|
|
|
|
}
|
|
|
|
|
|
|
|
|