add healthz and livez endpoints

This commit is contained in:
Cory Schwartz
2022-05-20 18:38:17 -07:00
parent effee8ce1f
commit 444d0b1b8a
4 changed files with 91 additions and 5 deletions
+2
View File
@@ -114,6 +114,8 @@ func FullNodeHandler(a v1api.FullNode, permissioned bool, opts ...jsonrpc.Server
m.Handle("/debug/pprof-set/mutex", handleFractionOpt("MutexProfileFraction", func(x int) {
runtime.SetMutexProfileFraction(x)
}))
m.Handle("/health/livez", NewLiveHandler(a))
m.Handle("/health/readyz", NewReadyHandler(a))
m.PathPrefix("/").Handler(http.DefaultServeMux) // pprof
return m, nil