|
@@ -30,10 +30,12 @@ type hostStruct struct {
|
|
|
Topics []string `yaml:"topics"`
|
|
|
Rosbag rosbagStruct `yaml:"rosbag"`
|
|
|
}
|
|
|
+
|
|
|
type ros struct {
|
|
|
MasterAddress string `yaml:"master-address"`
|
|
|
Nodes []string `yaml:"nodes"`
|
|
|
}
|
|
|
+
|
|
|
type disk struct {
|
|
|
Name string `yaml:"name"`
|
|
|
Used uint64 `yaml:"used"`
|
|
@@ -72,7 +74,7 @@ var (
|
|
|
CloudConfigMutex sync.RWMutex
|
|
|
)
|
|
|
|
|
|
-// 初始化业务配置
|
|
|
+// InitCloudConfig 初始化业务配置
|
|
|
func InitCloudConfig() {
|
|
|
c_log.GlobalLogger.Info("初始化OSS配置文件 - 开始。")
|
|
|
var content []byte // cloud.yaml 内容
|
|
@@ -162,7 +164,7 @@ func InitCloudConfig() {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
-// 刷新配置文件
|
|
|
+// refreshCloudConfig 刷新配置文件
|
|
|
func refreshCloudConfig() {
|
|
|
// 获取文件的目录
|
|
|
_ = util.CreateParentDir(LocalConfig.CloudConfigLocalPath)
|
|
@@ -221,7 +223,7 @@ func RefreshCloudConfig() {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
-// CheckConfig 校验 cfg.yaml 文件
|
|
|
+// checkConfig 校验 cfg.yaml 文件
|
|
|
func checkConfig(check CloudConfigStruct) bool {
|
|
|
if len(check.Hosts) != 2 {
|
|
|
c_log.GlobalLogger.Error("cloud-config.yaml中配置的hosts必须为2。")
|