summaryrefslogtreecommitdiff
path: root/http.go
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2024-10-12 13:01:31 -0500
committerJeff Carr <[email protected]>2024-10-12 13:01:31 -0500
commit58ff2a2412837b2e438e745ccf3ffc022d111458 (patch)
tree460cb4e1f46b30db3dd4e17dec8fb4e2a23e8fd4 /http.go
parente94b4d6626fafb20da118eb8b17e661928c2b5da (diff)
state changes if droplet reboots
Signed-off-by: Jeff Carr <[email protected]>
Diffstat (limited to 'http.go')
-rw-r--r--http.go6
1 files changed, 5 insertions, 1 deletions
diff --git a/http.go b/http.go
index 772d358..59a30be 100644
--- a/http.go
+++ b/http.go
@@ -68,7 +68,11 @@ func okHandler(w http.ResponseWriter, r *http.Request) {
return
}
if tmp == "/uptime" {
- writeFile(w, "uptime.html")
+ if clusterHealthy() {
+ fmt.Fprintln(w, "GOOD=true")
+ } else {
+ fmt.Fprintln(w, "GOOD=false")
+ }
return
}