mirror of
https://github.com/GlueOps/autoglue.git
synced 2026-02-13 12:50:05 +01:00
26 lines
569 B
Go
26 lines
569 B
Go
package handlers
|
|
|
|
import (
|
|
"net/http"
|
|
|
|
"github.com/glueops/autoglue/internal/utils"
|
|
)
|
|
|
|
type HealthStatus struct {
|
|
Status string `json:"status" example:"ok"`
|
|
}
|
|
|
|
// HealthCheck godoc
|
|
//
|
|
// @Summary Basic health check
|
|
// @Description Returns 200 OK when the service is up
|
|
// @Tags Health
|
|
// @ID HealthCheck // operationId
|
|
// @Accept json
|
|
// @Produce json
|
|
// @Success 200 {object} HealthStatus
|
|
// @Router /healthz [get]
|
|
func HealthCheck(w http.ResponseWriter, r *http.Request) {
|
|
utils.WriteJSON(w, http.StatusOK, HealthStatus{Status: "ok"})
|
|
}
|