Files
query-orchestration/cmd/healthcheck/main.go
T
Michael McGuinness 3028fe7eaa Merged in feature/linting (pull request #168)
Linting Updates

* precommit

* smallerchecks

* govuln
2025-06-23 15:58:20 +00:00

29 lines
370 B
Go

// cmd/healthcheck/main.go
package main
import (
"errors"
"net/http"
"os"
)
func main() {
err := check()
if err != nil {
os.Exit(1)
}
}
func check() error {
resp, err := http.Get("http://localhost:8080/health")
if err != nil {
return err
}
defer resp.Body.Close()
if resp.StatusCode != 200 {
return errors.New("Status code not OK")
}
return nil
}