Add methods to retrieve the router and handler from prometheus/web

This is necessary for middleware to reuse the prometheus web UI endpoints etc.
This commit is contained in:
Thomas Jackson 2019-04-25 15:00:22 -07:00 committed by Rishabh Kumar
parent d8389a7e95
commit f25b8c240d

View file

@ -593,6 +593,15 @@ func (h *Handler) SetReady(v ReadyStatus) {
h.ready.Store(uint32(v))
h.metrics.readyStatus.Set(0)
h.ready.Store(1)
}
func (h *Handler) GetRouter() *route.Router {
return h.router
}
func (h *Handler) Getv1API() *api_v1.API {
return h.apiV1
}
// Verifies whether the server is ready or not.