Skip to content

Commit 6343e98

Browse files
committed
Add health endpoint
1 parent e060cb4 commit 6343e98

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

main.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,11 @@ func main() {
3030
service := &SqlQueryService{
3131
runnersCache: runnersCache,
3232
}
33+
http.HandleFunc("GET /healthz", func(w http.ResponseWriter, r *http.Request) {
34+
w.WriteHeader(http.StatusOK)
35+
_, _ = w.Write([]byte("OK"))
36+
})
37+
3338
http.Handle("POST /query", service)
3439

3540
slog.Info("Listening", slog.String("addr", addr))

0 commit comments

Comments
 (0)