feat: 自定义重试间隔策略 + 修复按钮hover样式
- 新增重试间隔阶段配置,支持自定义时间分界点和频率 - 默认配置: 0-8秒=130ms, 8-25秒=260ms, 25-75秒=900ms - 设置面板添加可增删的阶段配置 UI - 修复按钮 hover 时文字变白的问题
This commit is contained in:
+13
-6
@@ -7,12 +7,19 @@ import (
|
||||
|
||||
// Config 应用配置。
|
||||
type Config struct {
|
||||
TimeAPIURL string `json:"timeApiUrl"`
|
||||
TraceEnabled bool `json:"traceEnabled"`
|
||||
TraceMaxBody int `json:"traceMaxBody"`
|
||||
LogLevel string `json:"logLevel"` // debug / info / warn / error
|
||||
Concurrency int `json:"concurrency"` // 抢购并发数
|
||||
Attempts int `json:"attempts"` // 单号重试次数
|
||||
TimeAPIURL string `json:"timeApiUrl"`
|
||||
TraceEnabled bool `json:"traceEnabled"`
|
||||
TraceMaxBody int `json:"traceMaxBody"`
|
||||
LogLevel string `json:"logLevel"` // debug / info / warn / error
|
||||
Concurrency int `json:"concurrency"` // 抢购并发数
|
||||
Attempts int `json:"attempts"` // 单号重试次数
|
||||
RetryStages []RetryStage `json:"retryStages"` // 重试间隔阶段配置
|
||||
}
|
||||
|
||||
// RetryStage 重试间隔阶段配置。
|
||||
type RetryStage struct {
|
||||
MaxElapsed int `json:"maxElapsed"` // 经过秒数上限
|
||||
Interval int `json:"interval"` // 重试间隔(ms)
|
||||
}
|
||||
|
||||
// AppPaths 运行时路径。
|
||||
|
||||
Reference in New Issue
Block a user