Add /healthz endpoint to server (#259)
test / Linux Go 1.26.x (push) Canceled after 0s
test / Linux (race) Go 1.27.x (push) Canceled after 0s
test / Linux Go 1.27.x (push) Canceled after 0s
test / lint (push) Canceled after 0s
test / Analyze results (push) Canceled after 0s

Co-authored-by: Michael Eischer <michael.eischer@fau.de>
This commit is contained in:
Alessandro (Ale) Segala
2026-10-12 20:57:46 +00:00
committed by GitHub
co-authored by Michael Eischer
parent a0da64d6cc
commit 652b604c90
2 changed files with 19 additions and 0 deletions
+3
View File
@@ -112,6 +112,9 @@ func NewHandler(server *Server) (http.Handler, error) {
mux.HandleFunc("/metrics", server.wrapMetricsAuth(promhttp.Handler().ServeHTTP))
}
}
mux.HandleFunc("/healthz", func(w http.ResponseWriter, _ *http.Request) {
w.WriteHeader(http.StatusNoContent)
})
mux.Handle("/", server)
var handler http.Handler = mux