Merge pull request #1159 from simonpasquier/add-healthy-probes
Add /-/healthy endpoint
This commit is contained in:
commit
0b5af7510b
|
@ -15,6 +15,7 @@ package ui
|
|||
|
||||
import (
|
||||
"bytes"
|
||||
"fmt"
|
||||
"io"
|
||||
"net/http"
|
||||
_ "net/http/pprof" // Comment this line to disable pprof endpoint.
|
||||
|
@ -76,6 +77,11 @@ func Register(r *route.Router, reloadCh chan<- struct{}, logger log.Logger) {
|
|||
reloadCh <- struct{}{}
|
||||
})
|
||||
|
||||
r.Get("/-/healthy", func(w http.ResponseWriter, _ *http.Request) {
|
||||
w.WriteHeader(http.StatusOK)
|
||||
fmt.Fprintf(w, "OK")
|
||||
})
|
||||
|
||||
r.Get("/debug/*subpath", http.DefaultServeMux.ServeHTTP)
|
||||
r.Post("/debug/*subpath", http.DefaultServeMux.ServeHTTP)
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue