diff options
author | Simon Pasquier <spasquie@redhat.com> | 2019-09-13 12:23:26 +0200 |
---|---|---|
committer | Simon Pasquier <spasquie@redhat.com> | 2019-09-16 10:59:12 +0200 |
commit | cfc06075d1b792763e91da0988ccd34e9a774e36 (patch) | |
tree | 81f5d741b6f71668002ea9cedc5edba4092d32e3 | |
parent | a99ef58c4b7783e17576b8106e6825daabe26e10 (diff) | |
download | prometheus_node_collector-cfc06075d1b792763e91da0988ccd34e9a774e36.tar.bz2 prometheus_node_collector-cfc06075d1b792763e91da0988ccd34e9a774e36.tar.xz prometheus_node_collector-cfc06075d1b792763e91da0988ccd34e9a774e36.zip |
Bump github.com/prometheus/common to v0.7.0
Signed-off-by: Simon Pasquier <spasquie@redhat.com>
-rw-r--r-- | go.mod | 3 | ||||
-rw-r--r-- | go.sum | 13 | ||||
-rw-r--r-- | vendor/github.com/alecthomas/template/go.mod | 1 | ||||
-rw-r--r-- | vendor/github.com/alecthomas/units/go.mod | 1 | ||||
-rw-r--r-- | vendor/github.com/golang/protobuf/proto/properties.go | 5 | ||||
-rw-r--r-- | vendor/github.com/prometheus/common/expfmt/text_create.go | 18 | ||||
-rw-r--r-- | vendor/github.com/prometheus/common/expfmt/text_parse.go | 13 | ||||
-rw-r--r-- | vendor/modules.txt | 8 |
8 files changed, 40 insertions, 22 deletions
@@ -13,10 +13,9 @@ require ( | |||
13 | github.com/mdlayher/wifi v0.0.0-20190303161829-b1436901ddee | 13 | github.com/mdlayher/wifi v0.0.0-20190303161829-b1436901ddee |
14 | github.com/prometheus/client_golang v1.0.0 | 14 | github.com/prometheus/client_golang v1.0.0 |
15 | github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90 | 15 | github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90 |
16 | github.com/prometheus/common v0.4.1 | 16 | github.com/prometheus/common v0.7.0 |
17 | github.com/prometheus/procfs v0.0.5 | 17 | github.com/prometheus/procfs v0.0.5 |
18 | github.com/siebenmann/go-kstat v0.0.0-20160321171754-d34789b79745 | 18 | github.com/siebenmann/go-kstat v0.0.0-20160321171754-d34789b79745 |
19 | github.com/sirupsen/logrus v1.4.2 // indirect | ||
20 | github.com/soundcloud/go-runit v0.0.0-20150630195641-06ad41a06c4a | 19 | github.com/soundcloud/go-runit v0.0.0-20150630195641-06ad41a06c4a |
21 | go.uber.org/atomic v1.3.2 // indirect | 20 | go.uber.org/atomic v1.3.2 // indirect |
22 | go.uber.org/multierr v1.1.0 // indirect | 21 | go.uber.org/multierr v1.1.0 // indirect |
@@ -1,7 +1,11 @@ | |||
1 | github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc h1:cAKDfWh5VpdgMhJosfJnn5/FoN2SRZ4p7fJNX58YPaU= | 1 | github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc h1:cAKDfWh5VpdgMhJosfJnn5/FoN2SRZ4p7fJNX58YPaU= |
2 | github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= | 2 | github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= |
3 | github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751 h1:JYp7IbQjafoB+tBA3gMyHYHrpOtNuDiK/uB5uXxq5wM= | ||
4 | github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= | ||
3 | github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf h1:qet1QNfXsQxTZqLG4oE62mJzwPIB8+Tee4RNCL9ulrY= | 5 | github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf h1:qet1QNfXsQxTZqLG4oE62mJzwPIB8+Tee4RNCL9ulrY= |
4 | github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= | 6 | github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= |
7 | github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4 h1:Hs82Z41s6SdL1CELW+XaDYmOH4hkBN4/N9og/AsOv7E= | ||
8 | github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= | ||
5 | github.com/beevik/ntp v0.2.0 h1:sGsd+kAXzT0bfVfzJfce04g+dSRfrs+tbQW8lweuYgw= | 9 | github.com/beevik/ntp v0.2.0 h1:sGsd+kAXzT0bfVfzJfce04g+dSRfrs+tbQW8lweuYgw= |
6 | github.com/beevik/ntp v0.2.0/go.mod h1:hIHWr+l3+/clUnF44zdK+CWW7fO8dR5cIylAQ76NRpg= | 10 | github.com/beevik/ntp v0.2.0/go.mod h1:hIHWr+l3+/clUnF44zdK+CWW7fO8dR5cIylAQ76NRpg= |
7 | github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973 h1:xJ4a3vCFaGF/jqvzLMYoU8P317H5OQ+Via4RmuPwCS0= | 11 | github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973 h1:xJ4a3vCFaGF/jqvzLMYoU8P317H5OQ+Via4RmuPwCS0= |
@@ -16,7 +20,9 @@ github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSs | |||
16 | github.com/ema/qdisc v0.0.0-20190904071900-b82c76788043 h1:I3hLsM87FSASssIrIOGwJCio31dvLkvpYDKn2+r31ec= | 20 | github.com/ema/qdisc v0.0.0-20190904071900-b82c76788043 h1:I3hLsM87FSASssIrIOGwJCio31dvLkvpYDKn2+r31ec= |
17 | github.com/ema/qdisc v0.0.0-20190904071900-b82c76788043/go.mod h1:ix4kG2zvdUd8kEKSW0ZTr1XLks0epFpI4j745DXxlNE= | 21 | github.com/ema/qdisc v0.0.0-20190904071900-b82c76788043/go.mod h1:ix4kG2zvdUd8kEKSW0ZTr1XLks0epFpI4j745DXxlNE= |
18 | github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= | 22 | github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= |
23 | github.com/go-kit/kit v0.9.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= | ||
19 | github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE= | 24 | github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE= |
25 | github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk= | ||
20 | github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= | 26 | github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= |
21 | github.com/godbus/dbus v0.0.0-20190402143921-271e53dc4968 h1:s+PDl6lozQ+dEUtUtQnO7+A2iPG3sK1pI4liU+jxn90= | 27 | github.com/godbus/dbus v0.0.0-20190402143921-271e53dc4968 h1:s+PDl6lozQ+dEUtUtQnO7+A2iPG3sK1pI4liU+jxn90= |
22 | github.com/godbus/dbus v0.0.0-20190402143921-271e53dc4968/go.mod h1:/YcGZj5zSblfDWMMoOzV4fas9FZnQYTkDnsGvmh2Grw= | 28 | github.com/godbus/dbus v0.0.0-20190402143921-271e53dc4968/go.mod h1:/YcGZj5zSblfDWMMoOzV4fas9FZnQYTkDnsGvmh2Grw= |
@@ -26,6 +32,8 @@ github.com/golang/protobuf v1.2.0 h1:P3YflyNX/ehuJFLhxviNdFxQPkGK5cDcApsge1SqnvM | |||
26 | github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= | 32 | github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= |
27 | github.com/golang/protobuf v1.3.1 h1:YF8+flBXS5eO826T4nzqPrxfhQThhXl0YzfuUPu4SBg= | 33 | github.com/golang/protobuf v1.3.1 h1:YF8+flBXS5eO826T4nzqPrxfhQThhXl0YzfuUPu4SBg= |
28 | github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= | 34 | github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= |
35 | github.com/golang/protobuf v1.3.2 h1:6nsPYzhq5kReh6QImI3k5qWzO4PEbvbIW2cwSfR/6xs= | ||
36 | github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= | ||
29 | github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= | 37 | github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= |
30 | github.com/google/go-cmp v0.3.0 h1:crn/baboCvb5fXaQ0IJ1SGTsTVrWpDsCWC8EGETZijY= | 38 | github.com/google/go-cmp v0.3.0 h1:crn/baboCvb5fXaQ0IJ1SGTsTVrWpDsCWC8EGETZijY= |
31 | github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= | 39 | github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= |
@@ -60,6 +68,7 @@ github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJ | |||
60 | github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= | 68 | github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= |
61 | github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= | 69 | github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= |
62 | github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= | 70 | github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= |
71 | github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= | ||
63 | github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= | 72 | github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= |
64 | github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= | 73 | github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= |
65 | github.com/prometheus/client_golang v0.9.1 h1:K47Rk0v/fkEfwfQet2KWhscE0cJzjgCCDBG2KHZoVno= | 74 | github.com/prometheus/client_golang v0.9.1 h1:K47Rk0v/fkEfwfQet2KWhscE0cJzjgCCDBG2KHZoVno= |
@@ -72,6 +81,8 @@ github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90 h1:S/YWwWx | |||
72 | github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= | 81 | github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= |
73 | github.com/prometheus/common v0.4.1 h1:K0MGApIoQvMw27RTdJkPbr3JZ7DNbtxQNyi5STVM6Kw= | 82 | github.com/prometheus/common v0.4.1 h1:K0MGApIoQvMw27RTdJkPbr3JZ7DNbtxQNyi5STVM6Kw= |
74 | github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= | 83 | github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= |
84 | github.com/prometheus/common v0.7.0 h1:L+1lyG48J1zAQXA3RBX/nG/B3gjlHq0zTt2tlbJLyCY= | ||
85 | github.com/prometheus/common v0.7.0/go.mod h1:DjGbpBbp5NYNiECxcL/VnbXCCaQpKd3tt26CguLLsqA= | ||
75 | github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= | 86 | github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= |
76 | github.com/prometheus/procfs v0.0.2 h1:6LJUbpNm42llc4HRCuvApCSWB/WfhuNo9K98Q9sNGfs= | 87 | github.com/prometheus/procfs v0.0.2 h1:6LJUbpNm42llc4HRCuvApCSWB/WfhuNo9K98Q9sNGfs= |
77 | github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= | 88 | github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= |
@@ -98,6 +109,7 @@ golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnf | |||
98 | golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= | 109 | golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= |
99 | golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= | 110 | golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= |
100 | golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= | 111 | golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= |
112 | golang.org/x/net v0.0.0-20190613194153-d28f0bde5980/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= | ||
101 | golang.org/x/net v0.0.0-20190827160401-ba9fcec4b297 h1:k7pJ2yAPLPgbskkFdhRCsA77k2fySZ1zf2zCjvQCiIM= | 113 | golang.org/x/net v0.0.0-20190827160401-ba9fcec4b297 h1:k7pJ2yAPLPgbskkFdhRCsA77k2fySZ1zf2zCjvQCiIM= |
102 | golang.org/x/net v0.0.0-20190827160401-ba9fcec4b297/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= | 114 | golang.org/x/net v0.0.0-20190827160401-ba9fcec4b297/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= |
103 | golang.org/x/sync v0.0.0-20181108010431-42b317875d0f h1:Bl/8QSvNqXvPGPGXa2z5xUTmV7VDcZyvRZ+QQXkXTZQ= | 115 | golang.org/x/sync v0.0.0-20181108010431-42b317875d0f h1:Bl/8QSvNqXvPGPGXa2z5xUTmV7VDcZyvRZ+QQXkXTZQ= |
@@ -120,3 +132,4 @@ gopkg.in/alecthomas/kingpin.v2 v2.2.6 h1:jMFz6MfLP0/4fUyZle81rXUoxOBFi19VUFKVDOQ | |||
120 | gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= | 132 | gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= |
121 | gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= | 133 | gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= |
122 | gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= | 134 | gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= |
135 | gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= | ||
diff --git a/vendor/github.com/alecthomas/template/go.mod b/vendor/github.com/alecthomas/template/go.mod new file mode 100644 index 0000000..a70670a --- /dev/null +++ b/vendor/github.com/alecthomas/template/go.mod | |||
@@ -0,0 +1 @@ | |||
module github.com/alecthomas/template | |||
diff --git a/vendor/github.com/alecthomas/units/go.mod b/vendor/github.com/alecthomas/units/go.mod new file mode 100644 index 0000000..f572173 --- /dev/null +++ b/vendor/github.com/alecthomas/units/go.mod | |||
@@ -0,0 +1 @@ | |||
module github.com/alecthomas/units | |||
diff --git a/vendor/github.com/golang/protobuf/proto/properties.go b/vendor/github.com/golang/protobuf/proto/properties.go index 79668ff..a4b8c0c 100644 --- a/vendor/github.com/golang/protobuf/proto/properties.go +++ b/vendor/github.com/golang/protobuf/proto/properties.go | |||
@@ -38,7 +38,6 @@ package proto | |||
38 | import ( | 38 | import ( |
39 | "fmt" | 39 | "fmt" |
40 | "log" | 40 | "log" |
41 | "os" | ||
42 | "reflect" | 41 | "reflect" |
43 | "sort" | 42 | "sort" |
44 | "strconv" | 43 | "strconv" |
@@ -194,7 +193,7 @@ func (p *Properties) Parse(s string) { | |||
194 | // "bytes,49,opt,name=foo,def=hello!" | 193 | // "bytes,49,opt,name=foo,def=hello!" |
195 | fields := strings.Split(s, ",") // breaks def=, but handled below. | 194 | fields := strings.Split(s, ",") // breaks def=, but handled below. |
196 | if len(fields) < 2 { | 195 | if len(fields) < 2 { |
197 | fmt.Fprintf(os.Stderr, "proto: tag has too few fields: %q\n", s) | 196 | log.Printf("proto: tag has too few fields: %q", s) |
198 | return | 197 | return |
199 | } | 198 | } |
200 | 199 | ||
@@ -214,7 +213,7 @@ func (p *Properties) Parse(s string) { | |||
214 | p.WireType = WireBytes | 213 | p.WireType = WireBytes |
215 | // no numeric converter for non-numeric types | 214 | // no numeric converter for non-numeric types |
216 | default: | 215 | default: |
217 | fmt.Fprintf(os.Stderr, "proto: tag has unknown wire type: %q\n", s) | 216 | log.Printf("proto: tag has unknown wire type: %q", s) |
218 | return | 217 | return |
219 | } | 218 | } |
220 | 219 | ||
diff --git a/vendor/github.com/prometheus/common/expfmt/text_create.go b/vendor/github.com/prometheus/common/expfmt/text_create.go index 8e473d0..0327865 100644 --- a/vendor/github.com/prometheus/common/expfmt/text_create.go +++ b/vendor/github.com/prometheus/common/expfmt/text_create.go | |||
@@ -14,9 +14,10 @@ | |||
14 | package expfmt | 14 | package expfmt |
15 | 15 | ||
16 | import ( | 16 | import ( |
17 | "bytes" | 17 | "bufio" |
18 | "fmt" | 18 | "fmt" |
19 | "io" | 19 | "io" |
20 | "io/ioutil" | ||
20 | "math" | 21 | "math" |
21 | "strconv" | 22 | "strconv" |
22 | "strings" | 23 | "strings" |
@@ -27,7 +28,7 @@ import ( | |||
27 | dto "github.com/prometheus/client_model/go" | 28 | dto "github.com/prometheus/client_model/go" |
28 | ) | 29 | ) |
29 | 30 | ||
30 | // enhancedWriter has all the enhanced write functions needed here. bytes.Buffer | 31 | // enhancedWriter has all the enhanced write functions needed here. bufio.Writer |
31 | // implements it. | 32 | // implements it. |
32 | type enhancedWriter interface { | 33 | type enhancedWriter interface { |
33 | io.Writer | 34 | io.Writer |
@@ -37,14 +38,13 @@ type enhancedWriter interface { | |||
37 | } | 38 | } |
38 | 39 | ||
39 | const ( | 40 | const ( |
40 | initialBufSize = 512 | ||
41 | initialNumBufSize = 24 | 41 | initialNumBufSize = 24 |
42 | ) | 42 | ) |
43 | 43 | ||
44 | var ( | 44 | var ( |
45 | bufPool = sync.Pool{ | 45 | bufPool = sync.Pool{ |
46 | New: func() interface{} { | 46 | New: func() interface{} { |
47 | return bytes.NewBuffer(make([]byte, 0, initialBufSize)) | 47 | return bufio.NewWriter(ioutil.Discard) |
48 | }, | 48 | }, |
49 | } | 49 | } |
50 | numBufPool = sync.Pool{ | 50 | numBufPool = sync.Pool{ |
@@ -75,16 +75,14 @@ func MetricFamilyToText(out io.Writer, in *dto.MetricFamily) (written int, err e | |||
75 | } | 75 | } |
76 | 76 | ||
77 | // Try the interface upgrade. If it doesn't work, we'll use a | 77 | // Try the interface upgrade. If it doesn't work, we'll use a |
78 | // bytes.Buffer from the sync.Pool and write out its content to out in a | 78 | // bufio.Writer from the sync.Pool. |
79 | // single go in the end. | ||
80 | w, ok := out.(enhancedWriter) | 79 | w, ok := out.(enhancedWriter) |
81 | if !ok { | 80 | if !ok { |
82 | b := bufPool.Get().(*bytes.Buffer) | 81 | b := bufPool.Get().(*bufio.Writer) |
83 | b.Reset() | 82 | b.Reset(out) |
84 | w = b | 83 | w = b |
85 | defer func() { | 84 | defer func() { |
86 | bWritten, bErr := out.Write(b.Bytes()) | 85 | bErr := b.Flush() |
87 | written = bWritten | ||
88 | if err == nil { | 86 | if err == nil { |
89 | err = bErr | 87 | err = bErr |
90 | } | 88 | } |
diff --git a/vendor/github.com/prometheus/common/expfmt/text_parse.go b/vendor/github.com/prometheus/common/expfmt/text_parse.go index ec3d86b..342e594 100644 --- a/vendor/github.com/prometheus/common/expfmt/text_parse.go +++ b/vendor/github.com/prometheus/common/expfmt/text_parse.go | |||
@@ -325,7 +325,7 @@ func (p *TextParser) startLabelValue() stateFn { | |||
325 | // - Other labels have to be added to currentLabels for signature calculation. | 325 | // - Other labels have to be added to currentLabels for signature calculation. |
326 | if p.currentMF.GetType() == dto.MetricType_SUMMARY { | 326 | if p.currentMF.GetType() == dto.MetricType_SUMMARY { |
327 | if p.currentLabelPair.GetName() == model.QuantileLabel { | 327 | if p.currentLabelPair.GetName() == model.QuantileLabel { |
328 | if p.currentQuantile, p.err = strconv.ParseFloat(p.currentLabelPair.GetValue(), 64); p.err != nil { | 328 | if p.currentQuantile, p.err = parseFloat(p.currentLabelPair.GetValue()); p.err != nil { |
329 | // Create a more helpful error message. | 329 | // Create a more helpful error message. |
330 | p.parseError(fmt.Sprintf("expected float as value for 'quantile' label, got %q", p.currentLabelPair.GetValue())) | 330 | p.parseError(fmt.Sprintf("expected float as value for 'quantile' label, got %q", p.currentLabelPair.GetValue())) |
331 | return nil | 331 | return nil |
@@ -337,7 +337,7 @@ func (p *TextParser) startLabelValue() stateFn { | |||
337 | // Similar special treatment of histograms. | 337 | // Similar special treatment of histograms. |
338 | if p.currentMF.GetType() == dto.MetricType_HISTOGRAM { | 338 | if p.currentMF.GetType() == dto.MetricType_HISTOGRAM { |
339 | if p.currentLabelPair.GetName() == model.BucketLabel { | 339 | if p.currentLabelPair.GetName() == model.BucketLabel { |
340 | if p.currentBucket, p.err = strconv.ParseFloat(p.currentLabelPair.GetValue(), 64); p.err != nil { | 340 | if p.currentBucket, p.err = parseFloat(p.currentLabelPair.GetValue()); p.err != nil { |
341 | // Create a more helpful error message. | 341 | // Create a more helpful error message. |
342 | p.parseError(fmt.Sprintf("expected float as value for 'le' label, got %q", p.currentLabelPair.GetValue())) | 342 | p.parseError(fmt.Sprintf("expected float as value for 'le' label, got %q", p.currentLabelPair.GetValue())) |
343 | return nil | 343 | return nil |
@@ -392,7 +392,7 @@ func (p *TextParser) readingValue() stateFn { | |||
392 | if p.readTokenUntilWhitespace(); p.err != nil { | 392 | if p.readTokenUntilWhitespace(); p.err != nil { |
393 | return nil // Unexpected end of input. | 393 | return nil // Unexpected end of input. |
394 | } | 394 | } |
395 | value, err := strconv.ParseFloat(p.currentToken.String(), 64) | 395 | value, err := parseFloat(p.currentToken.String()) |
396 | if err != nil { | 396 | if err != nil { |
397 | // Create a more helpful error message. | 397 | // Create a more helpful error message. |
398 | p.parseError(fmt.Sprintf("expected float as value, got %q", p.currentToken.String())) | 398 | p.parseError(fmt.Sprintf("expected float as value, got %q", p.currentToken.String())) |
@@ -755,3 +755,10 @@ func histogramMetricName(name string) string { | |||
755 | return name | 755 | return name |
756 | } | 756 | } |
757 | } | 757 | } |
758 | |||
759 | func parseFloat(s string) (float64, error) { | ||
760 | if strings.ContainsAny(s, "pP_") { | ||
761 | return 0, fmt.Errorf("unsupported character in float") | ||
762 | } | ||
763 | return strconv.ParseFloat(s, 64) | ||
764 | } | ||
diff --git a/vendor/modules.txt b/vendor/modules.txt index 7cf21f7..416ae83 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt | |||
@@ -1,7 +1,7 @@ | |||
1 | # github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc | 1 | # github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751 |
2 | github.com/alecthomas/template | 2 | github.com/alecthomas/template |
3 | github.com/alecthomas/template/parse | 3 | github.com/alecthomas/template/parse |
4 | # github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf | 4 | # github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4 |
5 | github.com/alecthomas/units | 5 | github.com/alecthomas/units |
6 | # github.com/beevik/ntp v0.2.0 | 6 | # github.com/beevik/ntp v0.2.0 |
7 | github.com/beevik/ntp | 7 | github.com/beevik/ntp |
@@ -13,7 +13,7 @@ github.com/coreos/go-systemd/dbus | |||
13 | github.com/ema/qdisc | 13 | github.com/ema/qdisc |
14 | # github.com/godbus/dbus v0.0.0-20190402143921-271e53dc4968 | 14 | # github.com/godbus/dbus v0.0.0-20190402143921-271e53dc4968 |
15 | github.com/godbus/dbus | 15 | github.com/godbus/dbus |
16 | # github.com/golang/protobuf v1.3.1 | 16 | # github.com/golang/protobuf v1.3.2 |
17 | github.com/golang/protobuf/proto | 17 | github.com/golang/protobuf/proto |
18 | # github.com/hodgesds/perf-utils v0.0.7 | 18 | # github.com/hodgesds/perf-utils v0.0.7 |
19 | github.com/hodgesds/perf-utils | 19 | github.com/hodgesds/perf-utils |
@@ -39,7 +39,7 @@ github.com/prometheus/client_golang/prometheus/internal | |||
39 | github.com/prometheus/client_golang/prometheus/promhttp | 39 | github.com/prometheus/client_golang/prometheus/promhttp |
40 | # github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90 | 40 | # github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90 |
41 | github.com/prometheus/client_model/go | 41 | github.com/prometheus/client_model/go |
42 | # github.com/prometheus/common v0.4.1 | 42 | # github.com/prometheus/common v0.7.0 |
43 | github.com/prometheus/common/expfmt | 43 | github.com/prometheus/common/expfmt |
44 | github.com/prometheus/common/internal/bitbucket.org/ww/goautoneg | 44 | github.com/prometheus/common/internal/bitbucket.org/ww/goautoneg |
45 | github.com/prometheus/common/log | 45 | github.com/prometheus/common/log |