diff --git a/pkg/server/server.go b/pkg/server/server.go index 4224919..f6e2ee6 100644 --- a/pkg/server/server.go +++ b/pkg/server/server.go @@ -121,6 +121,8 @@ func (s *Server) setupRouter() (*httprouter.Router, error) { router.POST("/api/v1/load_test", s.handleStartLoadTest) router.DELETE("/api/v1/load_test", s.handleStopLoadTest) + router.GET("/healthz", s.handleHealthz) + // CORS router.GlobalOPTIONS = http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { if r.Header.Get("Access-Control-Request-Method") != "" { @@ -322,3 +324,7 @@ func (s *Server) handleStopLoadTest(responseWriter http.ResponseWriter, req *htt responseWriter.WriteHeader(204) } + +func (s *Server) handleHealthz(responseWriter http.ResponseWriter, req *http.Request, _ httprouter.Params) { + responseWriter.WriteHeader(200) +}