VictoriaMetrics/lib/promscrape/discoveryutils/client.go
Aliaksandr Valialkin 5ec036439d lib/promscrape: set 30 seconds timeout for discovery api requests
Previously such requests could hang for long time. This could make debugging harder.
2020-04-29 17:33:34 +03:00

15 lines
244 B
Go

package discoveryutils
import (
"net/http"
"time"
)
var defaultClient = &http.Client{
Timeout: 30 * time.Second,
}
// GetHTTPClient returns default client for http API requests.
func GetHTTPClient() *http.Client {
return defaultClient
}