From abc3d540affe8ae36e7164ae50328e516f8460e7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lars=20Sj=C3=B6str=C3=B6m?= Date: Sun, 3 Nov 2024 21:55:10 +0100 Subject: [PATCH] chore: http health check endpoint --- server/server.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/server/server.go b/server/server.go index ad1d425..7ecf973 100644 --- a/server/server.go +++ b/server/server.go @@ -44,6 +44,11 @@ func NewServer(httpAddr string, certFile, keyFile string, services ...Service) * mux.Handle(grpcreflect.NewHandlerV1(reflector)) mux.Handle(grpcreflect.NewHandlerV1Alpha(reflector)) + // HTTP Health check endpoint + mux.HandleFunc("/healthz", func(w http.ResponseWriter, r *http.Request) { + w.WriteHeader(http.StatusOK) + }) + // Create a new HTTP server httpServer := &http.Server{ Addr: httpAddr,