| 12345678910111213141516171819202122232425262728293031323334353637383940414243 |
- # 由 openapi/scripts/generate.php 生成,请勿手改;补充写到 overrides/v3-heartbeat.yaml
- get:
- summary: 心跳
- tags:
- - heartbeat
- operationId: get_api_v3_heartbeat
- description: |-
- 取代 `GET /v2/heartbeat`(`HeartbeatController@index`)。v2 那份在
- dashboard-v4 下线前原样保留,不要改动。
- **这不是健康检查。** 它不查数据库、不查 OpenSearch / RabbitMQ / Cache,
- 只回答一件事:进程还在服务吗、是不是被运维停机了。供前端与负载均衡做
- 存活探测(liveness)用,开销接近零,可以高频调用。
- 真正的健康检查是 `GET /v2/health-check`(会逐项探测外部依赖并返回 checks
- 明细),将来单独迁为 `/v3/health-check`,与本端点是两件事,不要混用。
- 仓库根目录存在 `.stop` 文件时返回 503(运维停机开关),此时响应体是
- RFC 9457 Problem Details 而非正常结构。
- 实现:`V3\HeartbeatController@show`
- security:
- - { }
- -
- bearerAuth: []
- responses:
- 200:
- description: 成功
- content:
- application/json:
- schema:
- type: object
- properties:
- data:
- type: object
- properties:
- status:
- type: string
- checked_at:
- type: string
- 503:
- description: 服务已进入停机维护状态
- content:
- application/problem+json:
- schema:
- $ref: '../../main.yaml#/components/schemas/ProblemDetails'
|