diff options
Diffstat (limited to 'pkg/health/health.go')
| -rw-r--r-- | pkg/health/health.go | 25 |
1 files changed, 0 insertions, 25 deletions
diff --git a/pkg/health/health.go b/pkg/health/health.go deleted file mode 100644 index cbc4977..0000000 --- a/pkg/health/health.go +++ /dev/null @@ -1,25 +0,0 @@ -package health - -// Most simple health check probe to see whether our server is still alive - -import ( - "fmt" - "net/http" - - "github.com/argoproj-labs/argocd-image-updater/registry-scanner/pkg/log" -) - -func StartHealthServer(port int) chan error { - errCh := make(chan error) - go func() { - sm := http.NewServeMux() - sm.HandleFunc("/healthz", HealthProbe) - errCh <- http.ListenAndServe(fmt.Sprintf(":%d", port), sm) - }() - return errCh -} - -func HealthProbe(w http.ResponseWriter, r *http.Request) { - log.Tracef("/healthz ping request received, replying with pong") - fmt.Fprintf(w, "OK\n") -} |
