ota升级超时检查任务
This commit is contained in:
@@ -54,6 +54,9 @@ type Config struct {
|
||||
|
||||
// AI AI服务配置
|
||||
AI AIConfig `yaml:"ai"`
|
||||
|
||||
// OTA OTA升级配置
|
||||
OTA OTAConfig `yaml:"ota"`
|
||||
}
|
||||
|
||||
// AppConfig 代表应用基础配置
|
||||
@@ -248,6 +251,16 @@ type Gemini struct {
|
||||
Timeout int `yaml:"timeout"` // AI 请求超时时间 (秒)
|
||||
}
|
||||
|
||||
// OTAConfig 代表 OTA 升级配置
|
||||
type OTAConfig struct {
|
||||
// DefaultTimeoutSeconds 升级任务的全局超时时间(秒)
|
||||
DefaultTimeoutSeconds int `yaml:"default_timeout_seconds"`
|
||||
// DefaultRequestTimeoutSeconds 等待设备响应的单次请求超时时间(秒)
|
||||
DefaultRequestTimeoutSeconds int `yaml:"default_request_timeout_seconds"`
|
||||
// DefaultRetryCount 默认的固件块请求重试次数
|
||||
DefaultRetryCount int `yaml:"default_retry_count"`
|
||||
}
|
||||
|
||||
// NewConfig 创建并返回一个新的配置实例
|
||||
func NewConfig() *Config {
|
||||
// 默认值可以在这里设置,但我们优先使用配置文件中的值
|
||||
|
||||
Reference in New Issue
Block a user