Skip to content

Commit

Permalink
Update Go modules
Browse files Browse the repository at this point in the history
* Update to latest modules.
* Use new syntax for http client[0].

[0]: prometheus/common#291

Signed-off-by: SuperQ <[email protected]>
  • Loading branch information
SuperQ committed Aug 5, 2021
1 parent 28dde07 commit 6a8afe4
Show file tree
Hide file tree
Showing 3 changed files with 269 additions and 195 deletions.
2 changes: 1 addition & 1 deletion exporter/util.go
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ func CreateMetricsList(c config.Config) ([]JsonMetric, error) {

func FetchJson(ctx context.Context, logger log.Logger, endpoint string, config config.Config) ([]byte, error) {
httpClientConfig := config.HTTPClientConfig
client, err := pconfig.NewClientFromConfig(httpClientConfig, "fetch_json", true, false)
client, err := pconfig.NewClientFromConfig(httpClientConfig, "fetch_json", pconfig.WithKeepAlivesDisabled(), pconfig.WithHTTP2Disabled())
if err != nil {
level.Error(logger).Log("msg", "Error generating HTTP client", "err", err) //nolint:errcheck
return nil, err
Expand Down
10 changes: 5 additions & 5 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@ module github.com/prometheus-community/json_exporter
go 1.14

require (
github.com/go-kit/kit v0.10.0
github.com/prometheus/client_golang v1.9.0
github.com/prometheus/common v0.15.0
github.com/prometheus/exporter-toolkit v0.5.1
github.com/go-kit/kit v0.11.0
github.com/prometheus/client_golang v1.11.0
github.com/prometheus/common v0.30.0
github.com/prometheus/exporter-toolkit v0.6.1
gopkg.in/alecthomas/kingpin.v2 v2.2.6
gopkg.in/yaml.v2 v2.4.0
k8s.io/client-go v0.20.2
k8s.io/client-go v0.22.0
)

exclude (
Expand Down
Loading

0 comments on commit 6a8afe4

Please sign in to comment.