diff options
author | Julien Dessaux | 2025-01-02 19:43:53 +0100 |
---|---|---|
committer | Julien Dessaux | 2025-01-02 19:43:53 +0100 |
commit | 24bca7067b02844dc275ed6e22f96f20ab02f82e (patch) | |
tree | 5eab0d3e6d2a0beae78ab4c7be02dd2a60af4af4 /pkg/webui/healthz.go | |
parent | chore(tfstated): code cleanup (diff) | |
download | tfstated-24bca7067b02844dc275ed6e22f96f20ab02f82e.tar.gz tfstated-24bca7067b02844dc275ed6e22f96f20ab02f82e.tar.bz2 tfstated-24bca7067b02844dc275ed6e22f96f20ab02f82e.zip |
feat(tfstated): bootstrap webui listening on a second port
Diffstat (limited to 'pkg/webui/healthz.go')
-rw-r--r-- | pkg/webui/healthz.go | 12 |
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("{}")) + }) +} |