Pārlūkot izejas kodu

added in /healthz endpoint for liveness probe goodness

Steve Brunton 9 gadi atpakaļ
vecāks
revīzija
1321be262d
1 mainītis faili ar 3 papildinājumiem un 0 dzēšanām
  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
 }