fix readiness router health contract
This commit is contained in:
@@ -67,10 +67,9 @@ func (s *Server) authorize(r *http.Request) error {
|
||||
}
|
||||
|
||||
func (s *Server) Readiness(w http.ResponseWriter, r *http.Request) {
|
||||
w.Header().Set("Content-Type", "application/json")
|
||||
checks := []Probe{{Name: "store", Ready: s.Store != nil}}
|
||||
if s.RouterReady {
|
||||
checks = append(checks, Probe{Name: "router", Ready: true})
|
||||
}
|
||||
checks = append(checks, Probe{Name: "router", Ready: s.RouterReady})
|
||||
for name, probe := range s.Probes {
|
||||
ok, detail := probe()
|
||||
checks = append(checks, Probe{Name: name, Ready: ok, Detail: detail})
|
||||
|
||||
Reference in New Issue
Block a user