docs: 补充轮询开关、停机被拒视图、单卡轮询状态、监控与导出场景的接口说明
Some checks failed
构建并部署到测试环境(无 SSH) / build-and-deploy (push) Has been cancelled

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
邹进
2026-10-26 09:57:42 +09:00
parent f35d2a8196
commit 9b058f422c
3 changed files with 15 additions and 10 deletions

View File

@@ -44,7 +44,10 @@ func registerCarrierSchedulerRoutes(router fiber.Router, handler *admin.CarrierS
alerts := router.Group("/polling-failure-alerts")
alertsPath := basePath + "/polling-failure-alerts"
Register(alerts, doc, alertsPath, "GET", "", handler.ListAlerts, RouteSpec{
Summary: "查询卡轮询失败告警列表", Tags: tags, Input: new(dto.PollingFailureAlertListRequest), Output: new(dto.PollingFailureAlertPageResult), Auth: true,
Summary: "查询卡轮询失败告警列表",
Description: "view=stop_refused 为停机被拒视图:停复机方向为停机,且错误类型为终态或业务错误、或停机失败次数达到停复机告警阈值;该视图只按 carrier_id、status、iccid、start_time、end_time 筛选(忽略 check_type、error_category、alert_level)," +
"并额外返回 device_id、network_status、stop_reason、enable_polling、has_package、handled_by_name。导出使用统一导出任务,场景 polling_stop_refused_alert。",
Tags: tags, Input: new(dto.PollingFailureAlertListRequest), Output: new(dto.PollingFailureAlertPageResult), Auth: true,
})
Register(alerts, doc, alertsPath, "GET", "/summary", handler.AlertSummary, RouteSpec{
Summary: "未处理卡轮询失败告警按运营商账户与错误类别汇总", Tags: tags, Input: nil, Output: new([]dto.PollingFailureAlertSummaryItem), Auth: true,
@@ -58,11 +61,11 @@ func registerCarrierSchedulerRoutes(router fiber.Router, handler *admin.CarrierS
})
Register(router, doc, basePath, "GET", "/iot-cards/:id/polling-state", handler.CardState, RouteSpec{
Summary: "查询单卡轮询状态", Description: "各检查类型下次到期、最近成功、连续失败与最近错误、是否执行中;只读。", Tags: tags,
Summary: "查询单卡轮询状态", Description: "各检查类型下次到期、最近成功、连续失败与最近错误、是否执行中;停复机出口开关、当前停复机指令(动作、原因、场景、版本、失败次数、待确认、下次可执行时间)与最近一次停复机调用时间;只读。", Tags: tags,
Input: new(dto.CardPollingStatePath), Output: new(dto.CardPollingStateResponse), Auth: true,
})
Register(router, doc, basePath, "GET", "/polling-stats/carrier-queues", handler.CarrierStats, RouteSpec{
Summary: "按运营商账户的轮询队列与执行监控", Description: "按运营商账户调度的各账户队列长度、已到期数、执行中、上一分钟 QPS、限流等待与拒绝、处理中标记到期、未处理告警。", Tags: tags,
Summary: "按运营商账户的轮询队列与执行监控", Description: "按运营商账户调度的各账户队列长度、已到期数、执行中、上一分钟 QPS、限流等待与拒绝、处理中标记到期、未处理告警;停复机指令队列长度、已到期、执行中、待确认,近 1 小时停复机成功、失败、重试、结果未知数。", Tags: tags,
Input: nil, Output: new(dto.CarrierPollingStatsResponse), Auth: true,
})
}