完成获取系统基准线损率功能

This commit is contained in:
2023-07-26 10:03:01 +08:00
parent 251c44049a
commit 39e404451e
4 changed files with 38 additions and 0 deletions

View File

@@ -36,12 +36,18 @@ type ServiceSetting struct {
HostSerial int64
}
//读取基准线损率
type BaseLossSetting struct {
Base string
}
// 定义全局变量
var (
ServerSettings *ServerSetting
DatabaseSettings *DatabaseSetting
RedisSettings *RedisSetting
ServiceSettings *ServiceSetting
BaseLoss *BaseLossSetting
)
// 读取配置到全局变量
@@ -69,5 +75,10 @@ func SetupSetting() error {
if err != nil {
return err
}
err = s.ReadSection("BaselineLineLossRatio", &BaseLoss)
if err != nil {
return err
}
return nil
}