Merge pull request #8692 from filecoin-project/feat/health-endpoints

feat: networking: add healthz and livez endpoints
This commit is contained in:
Łukasz Magiera
2022-05-30 15:42:06 +02:00
committed by GitHub
5 changed files with 128 additions and 6 deletions
+2
View File
@@ -115,6 +115,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