Files
junhong_cmp_fiber/internal/model/dto/polling_concurrency_dto.go
break f6b11eb9ac
All checks were successful
构建并部署到测试环境(无 SSH) / build-and-deploy (push) Successful in 8m23s
修复
2026-08-10 17:37:55 +08:00

33 lines
1.4 KiB
Go

package dto
// GetPollingConcurrencyReq 获取指定任务类型的并发配置请求
type GetPollingConcurrencyReq struct {
TaskType string `path:"task_type" description:"任务类型" required:"true"`
}
// UpdatePollingConcurrencyReq 更新轮询并发配置请求
type UpdatePollingConcurrencyReq struct {
TaskType string `path:"task_type" description:"任务类型" required:"true"`
MaxConcurrency int `json:"max_concurrency" validate:"required,min=1" description:"最大并发数(正整数)"`
}
// PollingConcurrencyResp 轮询并发配置响应
type PollingConcurrencyResp struct {
TaskType string `json:"task_type" description:"任务类型"`
TaskTypeName string `json:"task_type_name" description:"任务类型名称"`
MaxConcurrency int `json:"max_concurrency" description:"最大并发数"`
Current int64 `json:"current" description:"当前并发数"`
Available int64 `json:"available" description:"可用并发数"`
Utilization float64 `json:"utilization" description:"使用率(百分比)"`
}
// PollingConcurrencyListResp 轮询并发配置列表响应
type PollingConcurrencyListResp struct {
Items []*PollingConcurrencyResp `json:"items" description:"并发配置列表"`
}
// ResetPollingConcurrencyReq 重置轮询并发计数请求
type ResetPollingConcurrencyReq struct {
TaskType string `json:"task_type" validate:"required" description:"任务类型"`
}