Răsfoiți Sursa

added in /healthz endpoint for liveness probe goodness

Steve Brunton 9 ani în urmă
părinte
comite
1321be262d
1 a modificat fișierele cu 3 adăugiri și 0 ștergeri
  1. 3 0
      web/web.go

+ 3 - 0
web/web.go

@@ -292,6 +292,9 @@ func allRoutes(ctx *context.Context, version string) *http.ServeMux {
 	mux.HandleFunc("/:version", func(w http.ResponseWriter, r *http.Request) {
 		fmt.Fprintln(w, version)
 	})
+	mux.HandleFunc("/healthz", func(w http.ResponseWriter, r *http.Request) {
+		fmt.Fprintln(w, "OK")
+	})
 	return mux
 }