实现定时采集
This commit is contained in:
		| @@ -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 { | ||||
| 	// 默认值可以在这里设置,但我们优先使用配置文件中的值 | ||||
|   | ||||
		Reference in New Issue
	
	Block a user