Skip to content

Commit

Permalink
Update exporter-toolkit to 0.5.0
Browse files Browse the repository at this point in the history
The exporter-toolkit has a new release that renames the https package to
web to make it more meaningful.

Signed-off-by: Julien Pivotto <[email protected]>
  • Loading branch information
Julien Pivotto committed Jan 13, 2021
1 parent cd58187 commit 51c7a9f
Show file tree
Hide file tree
Showing 10 changed files with 32 additions and 96 deletions.
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ require (
github.com/prometheus/client_golang v1.9.0
github.com/prometheus/client_model v0.2.0
github.com/prometheus/common v0.15.0
github.com/prometheus/exporter-toolkit v0.4.0
github.com/prometheus/exporter-toolkit v0.5.0
github.com/shurcooL/httpfs v0.0.0-20190707220628-8d4bc4ba7749 // indirect
github.com/shurcooL/vfsgen v0.0.0-20200824052919-0d455de96546
github.com/stretchr/testify v1.6.1 // indirect
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -280,8 +280,8 @@ github.com/prometheus/common v0.7.0/go.mod h1:DjGbpBbp5NYNiECxcL/VnbXCCaQpKd3tt2
github.com/prometheus/common v0.10.0/go.mod h1:Tlit/dnDKsSWFlCLTWaA1cyBgKHSMdTB80sz/V91rCo=
github.com/prometheus/common v0.15.0 h1:4fgOnadei3EZvgRwxJ7RMpG1k1pOZth5Pc13tyspaKM=
github.com/prometheus/common v0.15.0/go.mod h1:U+gB1OBLb1lF3O42bTCL+FK18tX9Oar16Clt/msog/s=
github.com/prometheus/exporter-toolkit v0.4.0 h1:O7Bw+ZKEMzW7vD10IuVF70b8EE4JIG7BvHFj9UKz49g=
github.com/prometheus/exporter-toolkit v0.4.0/go.mod h1:OCkM4805mmisBhLmVFw858QYi3v0wKdY6/UxrT0pZVg=
github.com/prometheus/exporter-toolkit v0.5.0 h1:GwrxhCviqOl8Mm0vKqkh7Xy54m+FPlHEJacFs48M3gY=
github.com/prometheus/exporter-toolkit v0.5.0/go.mod h1:OCkM4805mmisBhLmVFw858QYi3v0wKdY6/UxrT0pZVg=
github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk=
github.com/prometheus/procfs v0.0.0-20190117184657-bf6a532e95b1/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk=
github.com/prometheus/procfs v0.0.2 h1:6LJUbpNm42llc4HRCuvApCSWB/WfhuNo9K98Q9sNGfs=
Expand Down
8 changes: 4 additions & 4 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ import (
"github.com/prometheus/common/promlog"
"github.com/prometheus/common/route"
"github.com/prometheus/common/version"
"github.com/prometheus/exporter-toolkit/https"
httpsflag "github.com/prometheus/exporter-toolkit/https/kingpinflag"
"github.com/prometheus/exporter-toolkit/web"
webflag "github.com/prometheus/exporter-toolkit/web/kingpinflag"
"gopkg.in/alecthomas/kingpin.v2"

dto "github.com/prometheus/client_model/go"
Expand All @@ -61,7 +61,7 @@ func (lf logFunc) Println(v ...interface{}) {
func main() {
var (
app = kingpin.New(filepath.Base(os.Args[0]), "The Pushgateway")
httpsConfig = httpsflag.AddFlags(app)
webConfig = webflag.AddFlags(app)
listenAddress = app.Flag("web.listen-address", "Address to listen on for the web interface, API, and telemetry.").Default(":9091").String()
metricsPath = app.Flag("web.telemetry-path", "Path under which to expose metrics.").Default("/metrics").String()
externalURL = app.Flag("web.external-url", "The URL under which the Pushgateway is externally reachable.").Default("").URL()
Expand Down Expand Up @@ -195,7 +195,7 @@ func main() {
mux.Handle(apiPath+"/v1/", http.StripPrefix(apiPath+"/v1", av1))

go closeListenerOnQuit(l, quitCh, logger)
err = https.Serve(l, &http.Server{Addr: *listenAddress, Handler: mux}, *httpsConfig, logger)
err = web.Serve(l, &http.Server{Addr: *listenAddress, Handler: mux}, *webConfig, logger)
level.Error(logger).Log("msg", "HTTP server stopped", "err", err)
// To give running connections a chance to submit their payload, we wait
// for 1sec, but we don't want to wait long (e.g. until all connections
Expand Down
81 changes: 0 additions & 81 deletions vendor/github.com/prometheus/exporter-toolkit/https/README.md

This file was deleted.

10 changes: 10 additions & 0 deletions vendor/github.com/prometheus/exporter-toolkit/web/README.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions vendor/modules.txt
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,9 @@ github.com/prometheus/common/promlog/flag
github.com/prometheus/common/route
github.com/prometheus/common/server
github.com/prometheus/common/version
# github.com/prometheus/exporter-toolkit v0.4.0
github.com/prometheus/exporter-toolkit/https
github.com/prometheus/exporter-toolkit/https/kingpinflag
# github.com/prometheus/exporter-toolkit v0.5.0
github.com/prometheus/exporter-toolkit/web
github.com/prometheus/exporter-toolkit/web/kingpinflag
# github.com/prometheus/procfs v0.2.0
github.com/prometheus/procfs
github.com/prometheus/procfs/internal/fs
Expand Down

0 comments on commit 51c7a9f

Please sign in to comment.