agent_api/config_manager/config.go
2017-04-27 20:30:39 +09:00

54 lines
1.2 KiB
Go

package config_manager
type Connection struct {
Ip string `json:"ip"`
Port string `json:"port"`
PortType string `json:"portType"`
SSL bool `json:"ssl"`
}
type Target struct {
Auth map[string]interface{} `json:"auth"`
Connection Connection `json:"connection"`
}
type Schedule struct {
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 {
Keys []Keys `json:"keys"`
QueryInfo QueryInfo `json:"queryInfo"`
MappingInfo MappingInfo `json:"mappingInfo"`
}
type Crawler struct {
Name string `json:"name"`
Container string `json:"container"`
}
type Config struct {
Id string `json:"id"`
Target Target `json:"target"`
Schedule Schedule `json:"schedule"`
Crawler Crawler `json:"crawler"`
Items []Item `json:"items"`
}