mirror of https://github.com/status-im/go-waku.git
metrics: add /health endpoint for healthchecks (#84)
Because calling `/metrics` for a Consul healhcheck is too heavy and far too verbose. Signed-off-by: Jakub Sokołowski <jakub@status.im>
This commit is contained in:
parent
21aba7cd65
commit
1c991a94d8
|
@ -40,6 +40,11 @@ func NewMetricsServer(address string, port int) *Server {
|
|||
mux := http.NewServeMux()
|
||||
mux.Handle("/metrics", pe)
|
||||
|
||||
// Healthcheck
|
||||
mux.HandleFunc("/health", func(w http.ResponseWriter, r *http.Request) {
|
||||
fmt.Fprint(w, "OK")
|
||||
})
|
||||
|
||||
h := &ochttp.Handler{Handler: mux}
|
||||
|
||||
// Register the views
|
||||
|
|
Loading…
Reference in New Issue