Skip to content

Commit 6a8afe4

Browse files
committed
Update Go modules
* Update to latest modules. * Use new syntax for http client[0]. [0]: prometheus/common#291 Signed-off-by: SuperQ <[email protected]>
1 parent 28dde07 commit 6a8afe4

File tree

3 files changed

+269
-195
lines changed

3 files changed

+269
-195
lines changed

exporter/util.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ func CreateMetricsList(c config.Config) ([]JsonMetric, error) {
112112

113113
func FetchJson(ctx context.Context, logger log.Logger, endpoint string, config config.Config) ([]byte, error) {
114114
httpClientConfig := config.HTTPClientConfig
115-
client, err := pconfig.NewClientFromConfig(httpClientConfig, "fetch_json", true, false)
115+
client, err := pconfig.NewClientFromConfig(httpClientConfig, "fetch_json", pconfig.WithKeepAlivesDisabled(), pconfig.WithHTTP2Disabled())
116116
if err != nil {
117117
level.Error(logger).Log("msg", "Error generating HTTP client", "err", err) //nolint:errcheck
118118
return nil, err

go.mod

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,13 @@ module github.com/prometheus-community/json_exporter
33
go 1.14
44

55
require (
6-
github.com/go-kit/kit v0.10.0
7-
github.com/prometheus/client_golang v1.9.0
8-
github.com/prometheus/common v0.15.0
9-
github.com/prometheus/exporter-toolkit v0.5.1
6+
github.com/go-kit/kit v0.11.0
7+
github.com/prometheus/client_golang v1.11.0
8+
github.com/prometheus/common v0.30.0
9+
github.com/prometheus/exporter-toolkit v0.6.1
1010
gopkg.in/alecthomas/kingpin.v2 v2.2.6
1111
gopkg.in/yaml.v2 v2.4.0
12-
k8s.io/client-go v0.20.2
12+
k8s.io/client-go v0.22.0
1313
)
1414

1515
exclude (

0 commit comments

Comments
 (0)