Consolidate OK handler
This commit is contained in:
@@ -10,6 +10,7 @@ import (
|
||||
"time"
|
||||
|
||||
"github.com/prometheus/client_golang/prometheus/promhttp"
|
||||
"mcquay.me/hw"
|
||||
"mcquay.me/metrics"
|
||||
)
|
||||
|
||||
@@ -88,6 +89,9 @@ func main() {
|
||||
}
|
||||
}))
|
||||
|
||||
http.HandleFunc("/live", m.WrapFunc("/live", hw.OK))
|
||||
http.HandleFunc("/ready", m.WrapFunc("/ready", hw.OK))
|
||||
|
||||
http.Handle("/metrics", promhttp.Handler())
|
||||
|
||||
if err := http.ListenAndServe(":8081", nil); err != nil {
|
||||
|
||||
Reference in New Issue
Block a user