This commit is contained in:
toom1996
2026-08-26 10:45:21 +08:00
parent 3cf1368e68
commit 30c9f21da4
48 changed files with 3442 additions and 0 deletions

View File

@ -0,0 +1,18 @@
package handler
import (
"net/http"
"github.com/gin-gonic/gin"
)
// HealthHandler 健康检查,供容器编排与反向代理探活使用。
type HealthHandler struct{}
// NewHealthHandler 创建健康检查 handler。
func NewHealthHandler() *HealthHandler { return &HealthHandler{} }
// Check GET /api/health
func (h *HealthHandler) Check(c *gin.Context) {
c.JSON(http.StatusOK, gin.H{"status": "ok"})
}