소스 검색

added in /healthz endpoint for liveness probe goodness

Steve Brunton 9 년 전
부모
커밋
1321be262d
1개의 변경된 파일3개의 추가작업 그리고 0개의 파일을 삭제
  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
 }