Add /healthz endpoint to server

This commit is contained in:
ItalyPaleAle 2023-11-05 17:32:58 -08:00
parent 8523f0c968
commit 1d7da8dd37

3
mux.go
View file

@ -98,6 +98,9 @@ func NewHandler(server *Server) (http.Handler, error) {
mux.HandleFunc("/metrics", server.wrapMetricsAuth(promhttp.Handler().ServeHTTP))
}
}
mux.HandleFunc("/healthz", func(w http.ResponseWriter, r *http.Request) {
w.WriteHeader(http.StatusNoContent)
})
mux.Handle("/", server)
var handler http.Handler = mux