From 36e3d473f2126e920061218996cfa5cfecade7d6 Mon Sep 17 00:00:00 2001 From: Julien Dessaux Date: Mon, 30 Dec 2024 23:07:00 +0100 Subject: chore(tfstated): refactor backend code to a dedicated package --- pkg/backend/healthz.go | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 pkg/backend/healthz.go (limited to 'pkg/backend/healthz.go') diff --git a/pkg/backend/healthz.go b/pkg/backend/healthz.go new file mode 100644 index 0000000..70ece68 --- /dev/null +++ b/pkg/backend/healthz.go @@ -0,0 +1,12 @@ +package backend + +import "net/http" + +func handleHealthz() http.Handler { + return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + w.Header().Set("Cache-Control", "no-store, no-cache") + w.Header().Set("Content-Type", "application/json") + w.WriteHeader(http.StatusOK) + _, _ = w.Write([]byte("{}")) + }) +} -- cgit v1.2.3