All improvements in one commit.

This commit is contained in:
smruthi2187
2018-02-08 13:58:44 -08:00
parent a5cb1d3e3d
commit 4e445bb3cc
10 changed files with 172 additions and 16 deletions
+7
View File
@@ -89,6 +89,10 @@ func defaultHomeHandler(w http.ResponseWriter, r *http.Request) {
w.WriteHeader(http.StatusOK)
}
func routerHealthHandler(w http.ResponseWriter, r *http.Request) {
w.WriteHeader(http.StatusOK)
}
func (ts *HTTPTriggerSet) getRouter() *mux.Router {
muxRouter := mux.NewRouter()
@@ -150,6 +154,9 @@ func (ts *HTTPTriggerSet) getRouter() *mux.Router {
muxRouter.HandleFunc(fission.UrlForFunction(function.Metadata.Name), fh.handler)
}
// Healthz endpoint for the router.
muxRouter.HandleFunc("/router-healthz", routerHealthHandler).Methods("GET")
return muxRouter
}