messages config_manager

This commit is contained in:
jackdaw@loafle.com 2017-04-27 20:16:19 +09:00
parent 8cd1755134
commit ec9c04abed
2 changed files with 36 additions and 18 deletions

View File

@ -1,26 +1,42 @@
package config_manager package config_manager
type Auth struct {
}
type Connection struct { type Connection struct {
Ip string `json:"ip"` Ip string `json:"ip"`
Port string `json:"port"` Port string `json:"port"`
PortType string `json:"portType"` PortType string `json:"portType"`
SSL bool `json:"ssl"` SSL bool `json:"ssl"`
} }
type Target struct { type Target struct {
Auth Auth //Auth map[string]interface{} `json:"auth"`
Connection Connection Connection Connection `json:"connection"`
} }
type Schedule struct { type Schedule struct {
Interval string `json:"interval"` Interval string `json:"interval"`
} }
type Keys struct {
Metric string `json:"metric"`
key string `json:"key"`
}
type QueryInfo struct {
Query string `json:"query"`
//Extend map[string]interface{} `json:"extend"`
}
type MappingInfo struct {
ParseDirection string `json:"parseDirection"`
ArrayColumns []string `json:"arrayColumns"`
KeyColumns []string `json:"keyColumns"`
ValueColumn string `json:"valueColumn"`
}
type Item struct { type Item struct {
Keys []Keys `json:"keys"`
QueryInfo QueryInfo `json:"queryInfo"`
MappingInfo MappingInfo `json:"mappingInfo"`
} }
type Crawler struct { type Crawler struct {

View File

@ -16,16 +16,18 @@ intervalSecond: 10
type GlobalConfig struct { type GlobalConfig struct {
Central struct { Central struct {
Address string Address string `yaml:"address"`
Port int Port int `yaml:"port"`
} }
Log_Path string LogPath string `yaml:"logPath"`
Paths struct { Paths struct {
RootFolder string RootFolder string `yaml:"rootFolder"`
ConfigFolder string ConfigFolder string `yaml:"configFolder"`
BinaryFolder string BinaryFolder string `yaml:"binaryFolder"`
PidFolder string PidFolder string `yaml:"pidFolder"`
ScriptFile string ScriptFile string `yaml:"scriptFile"`
} }
IntervalSecond int IntervalSecond int `yaml:"intervalSecond"`
} }