生成swag
This commit is contained in:
40
docs/docs.go
40
docs/docs.go
@@ -4060,6 +4060,46 @@ const docTemplate = `{
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
"/healthz": {
|
||||||
|
"get": {
|
||||||
|
"description": "检查服务进程是否运行正常,只要服务能响应就返回 200 OK。",
|
||||||
|
"produces": [
|
||||||
|
"application/json"
|
||||||
|
],
|
||||||
|
"tags": [
|
||||||
|
"健康检查"
|
||||||
|
],
|
||||||
|
"summary": "服务存活检查",
|
||||||
|
"responses": {
|
||||||
|
"200": {
|
||||||
|
"description": "服务存活",
|
||||||
|
"schema": {
|
||||||
|
"$ref": "#/definitions/controller.Response"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"/readyz": {
|
||||||
|
"get": {
|
||||||
|
"description": "检查服务是否已准备好接收流量。当前实现为只要服务能响应即代表就绪。",
|
||||||
|
"produces": [
|
||||||
|
"application/json"
|
||||||
|
],
|
||||||
|
"tags": [
|
||||||
|
"健康检查"
|
||||||
|
],
|
||||||
|
"summary": "服务就绪检查",
|
||||||
|
"responses": {
|
||||||
|
"200": {
|
||||||
|
"description": "服务已就绪",
|
||||||
|
"schema": {
|
||||||
|
"$ref": "#/definitions/controller.Response"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"definitions": {
|
"definitions": {
|
||||||
|
|||||||
@@ -4052,6 +4052,46 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
"/healthz": {
|
||||||
|
"get": {
|
||||||
|
"description": "检查服务进程是否运行正常,只要服务能响应就返回 200 OK。",
|
||||||
|
"produces": [
|
||||||
|
"application/json"
|
||||||
|
],
|
||||||
|
"tags": [
|
||||||
|
"健康检查"
|
||||||
|
],
|
||||||
|
"summary": "服务存活检查",
|
||||||
|
"responses": {
|
||||||
|
"200": {
|
||||||
|
"description": "服务存活",
|
||||||
|
"schema": {
|
||||||
|
"$ref": "#/definitions/controller.Response"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"/readyz": {
|
||||||
|
"get": {
|
||||||
|
"description": "检查服务是否已准备好接收流量。当前实现为只要服务能响应即代表就绪。",
|
||||||
|
"produces": [
|
||||||
|
"application/json"
|
||||||
|
],
|
||||||
|
"tags": [
|
||||||
|
"健康检查"
|
||||||
|
],
|
||||||
|
"summary": "服务就绪检查",
|
||||||
|
"responses": {
|
||||||
|
"200": {
|
||||||
|
"description": "服务已就绪",
|
||||||
|
"schema": {
|
||||||
|
"$ref": "#/definitions/controller.Response"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"definitions": {
|
"definitions": {
|
||||||
|
|||||||
@@ -4371,6 +4371,32 @@ paths:
|
|||||||
summary: 用户登录
|
summary: 用户登录
|
||||||
tags:
|
tags:
|
||||||
- 用户管理
|
- 用户管理
|
||||||
|
/healthz:
|
||||||
|
get:
|
||||||
|
description: 检查服务进程是否运行正常,只要服务能响应就返回 200 OK。
|
||||||
|
produces:
|
||||||
|
- application/json
|
||||||
|
responses:
|
||||||
|
"200":
|
||||||
|
description: 服务存活
|
||||||
|
schema:
|
||||||
|
$ref: '#/definitions/controller.Response'
|
||||||
|
summary: 服务存活检查
|
||||||
|
tags:
|
||||||
|
- 健康检查
|
||||||
|
/readyz:
|
||||||
|
get:
|
||||||
|
description: 检查服务是否已准备好接收流量。当前实现为只要服务能响应即代表就绪。
|
||||||
|
produces:
|
||||||
|
- application/json
|
||||||
|
responses:
|
||||||
|
"200":
|
||||||
|
description: 服务已就绪
|
||||||
|
schema:
|
||||||
|
$ref: '#/definitions/controller.Response'
|
||||||
|
summary: 服务就绪检查
|
||||||
|
tags:
|
||||||
|
- 健康检查
|
||||||
securityDefinitions:
|
securityDefinitions:
|
||||||
BearerAuth:
|
BearerAuth:
|
||||||
in: header
|
in: header
|
||||||
|
|||||||
@@ -24,7 +24,7 @@ func NewController(ctx context.Context) *Controller {
|
|||||||
// 它也适用于 Docker 的 HEALTHCHECK 指令。
|
// 它也适用于 Docker 的 HEALTHCHECK 指令。
|
||||||
// @Summary 服务存活检查
|
// @Summary 服务存活检查
|
||||||
// @Description 检查服务进程是否运行正常,只要服务能响应就返回 200 OK。
|
// @Description 检查服务进程是否运行正常,只要服务能响应就返回 200 OK。
|
||||||
// @Tags Health
|
// @Tags 健康检查
|
||||||
// @Produce json
|
// @Produce json
|
||||||
// @Success 200 {object} controller.Response "服务存活"
|
// @Success 200 {object} controller.Response "服务存活"
|
||||||
// @Router /healthz [get]
|
// @Router /healthz [get]
|
||||||
@@ -36,7 +36,7 @@ func (c *Controller) Healthz(ctx echo.Context) error {
|
|||||||
// Readyz 是一个简单的就绪检查端点,用于就绪探针 (Readiness Probe)。
|
// Readyz 是一个简单的就绪检查端点,用于就绪探针 (Readiness Probe)。
|
||||||
// @Summary 服务就绪检查
|
// @Summary 服务就绪检查
|
||||||
// @Description 检查服务是否已准备好接收流量。当前实现为只要服务能响应即代表就绪。
|
// @Description 检查服务是否已准备好接收流量。当前实现为只要服务能响应即代表就绪。
|
||||||
// @Tags Health
|
// @Tags 健康检查
|
||||||
// @Produce json
|
// @Produce json
|
||||||
// @Success 200 {object} controller.Response "服务已就绪"
|
// @Success 200 {object} controller.Response "服务已就绪"
|
||||||
// @Router /readyz [get]
|
// @Router /readyz [get]
|
||||||
|
|||||||
Reference in New Issue
Block a user