|
@@ -9,43 +9,46 @@ import (
|
|
"time"
|
|
"time"
|
|
)
|
|
)
|
|
|
|
|
|
-type Platform struct {
|
|
|
|
|
|
+type platform struct {
|
|
UrlDeviceAuth string `yaml:"url-device-auth"`
|
|
UrlDeviceAuth string `yaml:"url-device-auth"`
|
|
UrlTaskPoll string `yaml:"url-task-poll"`
|
|
UrlTaskPoll string `yaml:"url-task-poll"`
|
|
UrlTask string `yaml:"url-task"`
|
|
UrlTask string `yaml:"url-task"`
|
|
}
|
|
}
|
|
|
|
|
|
-type Host struct {
|
|
|
|
|
|
+type host struct {
|
|
Name string `yaml:"name"`
|
|
Name string `yaml:"name"`
|
|
Ip string `yaml:"ip"`
|
|
Ip string `yaml:"ip"`
|
|
Topics []string `yaml:"topics"`
|
|
Topics []string `yaml:"topics"`
|
|
}
|
|
}
|
|
-type Ros struct {
|
|
|
|
|
|
+type ros struct {
|
|
MasterAddress string `yaml:"master-address"`
|
|
MasterAddress string `yaml:"master-address"`
|
|
Nodes []string `yaml:"nodes"`
|
|
Nodes []string `yaml:"nodes"`
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+type disk struct {
|
|
|
|
+ Name string `yaml:"name"`
|
|
|
|
+ Used uint64 `yaml:"used"`
|
|
|
|
+}
|
|
|
|
+type trigger struct {
|
|
|
|
+ Label string `yaml:"label"`
|
|
|
|
+ Topics []string `yaml:"topics"`
|
|
|
|
+}
|
|
type cloudConfig struct {
|
|
type cloudConfig struct {
|
|
FullCollect bool `yaml:"full-collect"`
|
|
FullCollect bool `yaml:"full-collect"`
|
|
ConfigRefreshInterval int `yaml:"config-refresh-interval"` // 配置刷新时间间隔
|
|
ConfigRefreshInterval int `yaml:"config-refresh-interval"` // 配置刷新时间间隔
|
|
BagNumber int `yaml:"bag-number"`
|
|
BagNumber int `yaml:"bag-number"`
|
|
TimeWindowSendGap int `yaml:"time-window-send-gap"` // 主节点向从节点发送窗口的最小时间间隔
|
|
TimeWindowSendGap int `yaml:"time-window-send-gap"` // 主节点向从节点发送窗口的最小时间间隔
|
|
- DiskUsage float64 `yaml:"disk-usage"`
|
|
|
|
TimeToLabelJsonPath string `yaml:"time-to-label-json-path"`
|
|
TimeToLabelJsonPath string `yaml:"time-to-label-json-path"`
|
|
BagDataDir string `yaml:"bag-data-dir"`
|
|
BagDataDir string `yaml:"bag-data-dir"`
|
|
BagCopyDir string `yaml:"bag-copy-dir"`
|
|
BagCopyDir string `yaml:"bag-copy-dir"`
|
|
TriggersDir string `yaml:"triggers-dir"`
|
|
TriggersDir string `yaml:"triggers-dir"`
|
|
TcpPort string `yaml:"tcp-port"`
|
|
TcpPort string `yaml:"tcp-port"`
|
|
RpcPort string `yaml:"rpc-port"`
|
|
RpcPort string `yaml:"rpc-port"`
|
|
- Triggers []Trigger `yaml:"triggers"`
|
|
|
|
- Hosts []Host `yaml:"hosts"`
|
|
|
|
- Ros Ros `yaml:"ros"`
|
|
|
|
- Platform Platform `yaml:"platform"`
|
|
|
|
-}
|
|
|
|
-
|
|
|
|
-type Trigger struct {
|
|
|
|
- Label string `yaml:"label"`
|
|
|
|
- Topics []string `yaml:"topics"`
|
|
|
|
|
|
+ Triggers []trigger `yaml:"triggers"`
|
|
|
|
+ Hosts []host `yaml:"hosts"`
|
|
|
|
+ Ros ros `yaml:"ros"`
|
|
|
|
+ Platform platform `yaml:"platform"`
|
|
|
|
+ Disk disk `yaml:"disk"`
|
|
}
|
|
}
|
|
|
|
|
|
var (
|
|
var (
|