mirror of
https://github.com/VictoriaMetrics/VictoriaMetrics.git
synced 2024-11-21 14:44:00 +00:00
app/vmselect: rename promql.WriteActiveQueries() to promql.ActiveQueriesHandler()
This makes it more consistent with the rest of handlers inside app/vmselect/main.go
This is a follow-up for 6a96fd8ed5
Updates https://github.com/VictoriaMetrics/VictoriaMetrics/issues/4598
This commit is contained in:
parent
5b5d8ae51d
commit
c5f94fa5fc
2 changed files with 4 additions and 4 deletions
|
@ -329,7 +329,7 @@ func RequestHandler(w http.ResponseWriter, r *http.Request) bool {
|
|||
case "/api/v1/status/active_queries":
|
||||
statusActiveQueriesRequests.Inc()
|
||||
httpserver.EnableCORS(w, r)
|
||||
promql.WriteActiveQueries(w, r)
|
||||
promql.ActiveQueriesHandler(w, r)
|
||||
return true
|
||||
case "/api/v1/status/top_queries":
|
||||
topQueriesRequests.Inc()
|
||||
|
|
|
@ -9,10 +9,10 @@ import (
|
|||
"time"
|
||||
)
|
||||
|
||||
// WriteActiveQueries writes active queries to w.
|
||||
// ActiveQueriesHandler returns response to /api/v1/status/active_queries
|
||||
//
|
||||
// The written active queries are sorted in descending order of their exeuction duration.
|
||||
func WriteActiveQueries(w http.ResponseWriter, r *http.Request) {
|
||||
// It writes a JSON with active queries to w.
|
||||
func ActiveQueriesHandler(w http.ResponseWriter, r *http.Request) {
|
||||
aqes := activeQueriesV.GetAll()
|
||||
|
||||
w.Header().Set("Content-Type", "application/json")
|
||||
|
|
Loading…
Reference in a new issue