实现全量采集系统计划
This commit is contained in:
@@ -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 从指定路径加载配置文件
|
||||
|
||||
Reference in New Issue
Block a user