mirror of
https://github.com/aptible/supercronic.git
synced 2025-09-26 20:31:17 +08:00
healthcheck endpoint (#93)
This commit is contained in:
@@ -149,6 +149,10 @@ func InitHTTPServer(listenAddr string, shutdownContext context.Context) (func()
|
||||
</html>`))
|
||||
})
|
||||
|
||||
http.HandleFunc("/health", func(w http.ResponseWriter, r *http.Request) {
|
||||
w.Write([]byte(`OK`))
|
||||
})
|
||||
|
||||
shutdownClosure := func() error {
|
||||
return promSrv.Shutdown(shutdownContext)
|
||||
}
|
||||
|
Reference in New Issue
Block a user