Skip to content
Snippets Groups Projects
Commit 8576aa27 authored by Janne Mareike Koschinski's avatar Janne Mareike Koschinski
Browse files

Added health check

parent 1d58e6a0
No related branches found
No related tags found
No related merge requests found
......@@ -8,6 +8,7 @@ import (
"fmt"
"path/filepath"
"time"
"net/http"
)
func returnResult(config *Config, client *redis.Client, result Result) {
......@@ -84,4 +85,13 @@ func main() {
go processImage(&config, client, value)
}
}
http.HandleFunc("/healthz", func(w http.ResponseWriter, r *http.Request) {
w.Write([]byte("OK"))
})
err := http.ListenAndServe(":8080", nil)
if err != nil {
panic(err)
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment