创建PlanNameAlarmNotification 计划
This commit is contained in:
@@ -230,6 +230,16 @@ type AlarmNotificationConfig struct {
|
||||
NotificationIntervals NotificationIntervalsConfig `yaml:"notification_intervals"`
|
||||
}
|
||||
|
||||
// NewConfig 创建并返回一个新的配置实例
|
||||
func NewConfig() *Config {
|
||||
// 默认值可以在这里设置,但我们优先使用配置文件中的值
|
||||
return &Config{
|
||||
Collection: CollectionConfig{
|
||||
Interval: 1, // 默认为1分钟
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
// Load 从指定路径加载配置文件
|
||||
func (c *Config) Load(path string) error {
|
||||
// 读取配置文件
|
||||
|
||||
Reference in New Issue
Block a user