feat: add healthcheck

Signed-off-by: rare-magma <rare-magma@posteo.eu>
This commit is contained in:
rare-magma
2024-06-29 14:09:32 +02:00
parent 20715f53af
commit dd206b5278
3 changed files with 28 additions and 2 deletions

20
healthcheck/heathcheck.go Normal file
View File

@@ -0,0 +1,20 @@
package main
import (
"fmt"
"log"
"net/http"
"os"
)
func main() {
if len(os.Args) < 2 {
log.Fatal("Expected URL as command-line argument")
os.Exit(1)
}
url := os.Args[1]
fmt.Println(url)
if _, err := http.Get(url); err != nil {
os.Exit(1)
}
}