chore: add route gateway verification

This commit is contained in:
Jonas Kaninda
2024-10-27 07:24:50 +01:00
parent 1923506e0a
commit ff3dbe2a27
6 changed files with 151 additions and 72 deletions

View File

@@ -105,3 +105,15 @@ func (heathRoute HealthCheckRoute) HealthCheckHandler(w http.ResponseWriter, r *
return
}
}
func (heathRoute HealthCheckRoute) HealthReadyHandler(w http.ResponseWriter, r *http.Request) {
response := HealthCheckRouteResponse{
Status: "healthy",
Error: "",
}
w.Header().Set("Content-Type", "application/json")
w.WriteHeader(http.StatusOK)
err := json.NewEncoder(w).Encode(response)
if err != nil {
return
}
}