实现定时采集

This commit is contained in:
2025-10-26 15:10:38 +08:00
parent 5c83c19bce
commit 6a8e8f1f7d
7 changed files with 176 additions and 14 deletions

View File

@@ -44,6 +44,9 @@ type Config struct {
// Notify 通知服务配置
Notify NotifyConfig `yaml:"notify"`
// Collection 定时采集配置
Collection CollectionConfig `yaml:"collection"`
}
// AppConfig 代表应用基础配置
@@ -195,6 +198,11 @@ type LarkConfig struct {
AppSecret string `yaml:"appSecret"`
}
// CollectionConfig 代表定时采集配置
type CollectionConfig struct {
Interval int `yaml:"interval"`
}
// NewConfig 创建并返回一个新的配置实例
func NewConfig() *Config {
// 默认值可以在这里设置,但我们优先使用配置文件中的值