mirror of
https://github.com/GlueOps/autoglue.git
synced 2026-02-13 04:40:05 +01:00
feat: adding background jobs, Dockerfile
This commit is contained in:
24
internal/handlers/health.go
Normal file
24
internal/handlers/health.go
Normal file
@@ -0,0 +1,24 @@
|
||||
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"})
|
||||
}
|
||||
Reference in New Issue
Block a user