23 lines
524 B
Go
23 lines
524 B
Go
package health
|
|
|
|
import (
|
|
"encoding/json"
|
|
"net/http"
|
|
)
|
|
|
|
type Handler struct {
|
|
Runtime string
|
|
SemanticGeneration int
|
|
ArchitectureGeneration int
|
|
}
|
|
|
|
func (h Handler) ServeHTTP(w http.ResponseWriter, r *http.Request) {
|
|
w.Header().Set("Content-Type", "application/json")
|
|
_ = json.NewEncoder(w).Encode(map[string]any{
|
|
"status": "ok",
|
|
"runtime": h.Runtime,
|
|
"semantic_generation": h.SemanticGeneration,
|
|
"architecture_generation": h.ArchitectureGeneration,
|
|
})
|
|
}
|