Add dumb liveliness endpoint

This currently returns 200 always. In the future we can add options for
controling what constitues "liveliness"
This commit is contained in:
Thomas Jackson 2019-01-22 10:43:46 -08:00
parent 0beb2decf4
commit 73a0e50ee1
1 changed files with 3 additions and 0 deletions

View File

@ -246,6 +246,9 @@ func main() {
if *flHTTPMetrics {
http.Handle("/metrics", promhttp.Handler())
}
// This is a dumb liveliness check endpoint. Currently this checks
// nothing and will always return 200 if the process is live.
http.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) {})
http.Serve(ln, http.DefaultServeMux)
}()
}