实现全量采集系统计划

This commit is contained in:
2025-10-29 17:10:48 +08:00
parent 5050f76066
commit 85bd5254c1
6 changed files with 225 additions and 134 deletions

View File

@@ -200,13 +200,18 @@ type LarkConfig struct {
// CollectionConfig 代表定时采集配置
type CollectionConfig struct {
// Interval 采集间隔(分钟), 默认 1
Interval int `yaml:"interval"`
}
// NewConfig 创建并返回一个新的配置实例
func NewConfig() *Config {
// 默认值可以在这里设置,但我们优先使用配置文件中的值
return &Config{}
return &Config{
Collection: CollectionConfig{
Interval: 1, // 默认为1分钟
},
}
}
// Load 从指定路径加载配置文件