summaryrefslogtreecommitdiff
path: root/pkg/webui/healthz.go
diff options
context:
space:
mode:
authorJulien Dessaux2025-01-02 19:43:53 +0100
committerJulien Dessaux2025-01-02 19:43:53 +0100
commit24bca7067b02844dc275ed6e22f96f20ab02f82e (patch)
tree5eab0d3e6d2a0beae78ab4c7be02dd2a60af4af4 /pkg/webui/healthz.go
parentchore(tfstated): code cleanup (diff)
downloadtfstated-24bca7067b02844dc275ed6e22f96f20ab02f82e.tar.gz
tfstated-24bca7067b02844dc275ed6e22f96f20ab02f82e.tar.bz2
tfstated-24bca7067b02844dc275ed6e22f96f20ab02f82e.zip
feat(tfstated): bootstrap webui listening on a second port
Diffstat (limited to '')
-rw-r--r--pkg/webui/healthz.go12
1 files changed, 12 insertions, 0 deletions
diff --git a/pkg/webui/healthz.go b/pkg/webui/healthz.go
new file mode 100644
index 0000000..dee51d0
--- /dev/null
+++ b/pkg/webui/healthz.go
@@ -0,0 +1,12 @@
+package webui
+
+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("{}"))
+ })
+}