Add readiness probe to go env (#461)

This commit is contained in:
Ta-Ching Chen
2018-01-30 21:36:13 +08:00
committed by GitHub
parent 7d83859cfb
commit 1935098404
+5
View File
@@ -141,7 +141,12 @@ func specializeHandlerV2(w http.ResponseWriter, r *http.Request) {
fmt.Println("Done")
}
func readinessProbeHandler(w http.ResponseWriter, r *http.Request) {
w.WriteHeader(http.StatusOK)
}
func main() {
http.HandleFunc("/healthz", readinessProbeHandler)
http.HandleFunc("/specialize", specializeHandler)
http.HandleFunc("/v2/specialize", specializeHandlerV2)