From fa6dce4c566b35b36155504ad9a627961dbfe3f6 Mon Sep 17 00:00:00 2001 From: Jeff Carr Date: Mon, 9 Sep 2024 10:25:03 -0500 Subject: [PATCH] add /uptime to return "OK" for monitoring Signed-off-by: Jeff Carr --- main.go | 5 +++++ resources/repomap | 2 ++ 2 files changed, 7 insertions(+) diff --git a/main.go b/main.go index 1b7b68e..6cb9384 100644 --- a/main.go +++ b/main.go @@ -96,6 +96,11 @@ func okHandler(w http.ResponseWriter, r *http.Request) { writeFile(w, "skeleton.v2.css") return } + // used for uptime monitor checking + if tmp == "/uptime" { + fmt.Fprintln(w, "OK") + return + } log.Warn("BAD URL =", url, "REPO URL =", repourl) badurl(w, r.URL.String()) // fmt.Fprintln(w, "BAD", tmp) diff --git a/resources/repomap b/resources/repomap index 370bf1f..10b1a33 100644 --- a/resources/repomap +++ b/resources/repomap @@ -57,3 +57,5 @@ go.wit.com/dev/alexflint/scalar git.wit.org/jcarr/go-scalar go.wit.com/dev/andlabs/ui git.wit.org/interesting/andlabs-ui attempts to add RiscV support go.wit.com/dev/andlabs/libui git.wit.org/interesting/libui go.wit.com/dev/davecgh/spew git.wit.org/jcarr/go-spew + +go.wit.com/dev/test/gogit2 git.wit.org/jcarr/gogit2