mirror of
https://github.com/prometheus/prometheus.git
synced 2025-03-05 20:59:13 -08:00
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:
parent
d8389a7e95
commit
f25b8c240d
|
@ -593,6 +593,15 @@ func (h *Handler) SetReady(v ReadyStatus) {
|
||||||
|
|
||||||
h.ready.Store(uint32(v))
|
h.ready.Store(uint32(v))
|
||||||
h.metrics.readyStatus.Set(0)
|
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.
|
// Verifies whether the server is ready or not.
|
||||||
|
|
Loading…
Reference in a new issue