mirror of
https://github.com/VictoriaMetrics/VictoriaMetrics.git
synced 2025-01-20 07:19:17 +01:00
app/{vminsert,vmselect,vmstorage}: add a link to https://victoriametrics.github.io/Cluster-VictoriaMetrics.html from main page of every cluster component
This commit is contained in:
parent
70bb5624ad
commit
abfd3a8fab
@ -140,6 +140,10 @@ func main() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func requestHandler(w http.ResponseWriter, r *http.Request) bool {
|
func requestHandler(w http.ResponseWriter, r *http.Request) bool {
|
||||||
|
if r.RequestURI == "/" {
|
||||||
|
fmt.Fprintf(w, "vminsert - a component of VictoriaMetrics cluster. See docs at https://victoriametrics.github.io/Cluster-VictoriaMetrics.html")
|
||||||
|
return true
|
||||||
|
}
|
||||||
p, err := httpserver.ParsePath(r.URL.Path)
|
p, err := httpserver.ParsePath(r.URL.Path)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
httpserver.Errorf(w, r, "cannot parse path %q: %s", r.URL.Path, err)
|
httpserver.Errorf(w, r, "cannot parse path %q: %s", r.URL.Path, err)
|
||||||
|
@ -127,6 +127,10 @@ var (
|
|||||||
)
|
)
|
||||||
|
|
||||||
func requestHandler(w http.ResponseWriter, r *http.Request) bool {
|
func requestHandler(w http.ResponseWriter, r *http.Request) bool {
|
||||||
|
if r.RequestURI == "/" {
|
||||||
|
fmt.Fprintf(w, "vmselect - a component of VictoriaMetrics cluster. See docs at https://victoriametrics.github.io/Cluster-VictoriaMetrics.html")
|
||||||
|
return true
|
||||||
|
}
|
||||||
startTime := time.Now()
|
startTime := time.Now()
|
||||||
// Limit the number of concurrent queries.
|
// Limit the number of concurrent queries.
|
||||||
select {
|
select {
|
||||||
|
@ -110,6 +110,10 @@ func main() {
|
|||||||
|
|
||||||
func newRequestHandler(strg *storage.Storage) httpserver.RequestHandler {
|
func newRequestHandler(strg *storage.Storage) httpserver.RequestHandler {
|
||||||
return func(w http.ResponseWriter, r *http.Request) bool {
|
return func(w http.ResponseWriter, r *http.Request) bool {
|
||||||
|
if r.RequestURI == "/" {
|
||||||
|
fmt.Fprintf(w, "vmstorage - a component of VictoriaMetrics cluster. See docs at https://victoriametrics.github.io/Cluster-VictoriaMetrics.html")
|
||||||
|
return true
|
||||||
|
}
|
||||||
return requestHandler(w, r, strg)
|
return requestHandler(w, r, strg)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user