healthcheck endpoint (#93)

This commit is contained in:
Igor Rzegocki
2022-06-22 17:28:35 +02:00
committed by GitHub
parent 0c38fad683
commit 48e7290d4c

View File

@@ -149,6 +149,10 @@ func InitHTTPServer(listenAddr string, shutdownContext context.Context) (func()
</html>`))
})
http.HandleFunc("/health", func(w http.ResponseWriter, r *http.Request) {
w.Write([]byte(`OK`))
})
shutdownClosure := func() error {
return promSrv.Shutdown(shutdownContext)
}