add healthz

main task/v1.0.4
git 2025-12-10 01:02:12 +08:00
parent 250776bf27
commit 52dacbd4d2
Signed by: git
GPG Key ID: 3F65EFFA44207ADD
1 changed files with 23 additions and 0 deletions

23
healthz/healthz.go Normal file
View File

@ -0,0 +1,23 @@
package healthz
import "net/http"
// HealthyHandler Healthz 接口
//
// @Summary Healthz 接口
// @Tags Healthz
// @Success 200 {string} string
// @Router /healthz [get]
func HealthzHandler(w http.ResponseWriter, r *http.Request) {
w.Write([]byte("OK"))
}
// HealthyHandler 健康检查
func HealthyHandler(w http.ResponseWriter, r *http.Request) {
w.Write([]byte("OK"))
}
// ReadyHandler 健康检查
func ReadyHandler(w http.ResponseWriter, r *http.Request) {
w.Write([]byte("OK"))
}