summaryrefslogtreecommitdiff
path: root/internal/handler/hearthbeat.go
diff options
context:
space:
mode:
Diffstat (limited to 'internal/handler/hearthbeat.go')
-rw-r--r--internal/handler/hearthbeat.go15
1 files changed, 2 insertions, 13 deletions
diff --git a/internal/handler/hearthbeat.go b/internal/handler/hearthbeat.go
index 014880e..22f6c3c 100644
--- a/internal/handler/hearthbeat.go
+++ b/internal/handler/hearthbeat.go
@@ -2,21 +2,10 @@ package handler
import (
"net/http"
-
- "go.neonxp.dev/djson/internal/tree"
)
func (h *handler) Hearthbeat(w http.ResponseWriter, r *http.Request) {
w.Header().Set("Content-Type", "text/plain")
- switch h.core.State() {
- case tree.Ready:
- w.WriteHeader(http.StatusOK)
- _, _ = w.Write([]byte("."))
- case tree.Failed:
- w.WriteHeader(http.StatusInternalServerError)
- _, _ = w.Write([]byte("start failed"))
- case tree.Running:
- w.WriteHeader(http.StatusServiceUnavailable)
- _, _ = w.Write([]byte("starting..."))
- }
+ w.WriteHeader(http.StatusOK)
+ _, _ = w.Write([]byte("."))
}