创建PlanNameAlarmNotification 计划

This commit is contained in:
2025-11-08 18:33:07 +08:00
parent 362ed5ad9d
commit 2ad1ae4f40
4 changed files with 119 additions and 47 deletions

View File

@@ -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 {
// 读取配置文件