diff options
author | Théo Brigitte <theo.brigitte@gmail.com> | 2019-04-03 12:32:48 +0200 |
---|---|---|
committer | Ben Kochie <superq@gmail.com> | 2019-04-03 12:32:48 +0200 |
commit | 4d88761c131a19298087df95d39a5096b5e06e1e (patch) | |
tree | d69c3a5d71b324877f5d1e2e806d491f6ad96f3f | |
parent | dbe7badc7c37da1ddaaa33db4860e51a73c4c44a (diff) | |
download | prometheus_node_collector-4d88761c131a19298087df95d39a5096b5e06e1e.tar.bz2 prometheus_node_collector-4d88761c131a19298087df95d39a5096b5e06e1e.tar.xz prometheus_node_collector-4d88761c131a19298087df95d39a5096b5e06e1e.zip |
update github.com/godbus/dbus to latest master (#1305)
* update github.com/godbus/dbus to 271e53dc4968a0f8862f20841cc63bb5f43d6c57
Signed-off-by: Theo Brigitte <theo.brigitte@gmail.com>
-rw-r--r-- | go.mod | 2 | ||||
-rw-r--r-- | go.sum | 4 | ||||
-rw-r--r-- | vendor/github.com/godbus/dbus/conn.go | 6 | ||||
-rw-r--r-- | vendor/github.com/godbus/dbus/decoder.go | 2 | ||||
-rw-r--r-- | vendor/github.com/godbus/dbus/default_handler.go | 4 | ||||
-rw-r--r-- | vendor/github.com/godbus/dbus/object.go | 19 | ||||
-rw-r--r-- | vendor/github.com/godbus/dbus/transport_unix.go | 2 | ||||
-rw-r--r-- | vendor/modules.txt | 2 |
8 files changed, 28 insertions, 13 deletions
@@ -4,7 +4,7 @@ require ( | |||
4 | github.com/beevik/ntp v0.2.0 | 4 | github.com/beevik/ntp v0.2.0 |
5 | github.com/coreos/go-systemd v0.0.0-20181031085051-9002847aa142 | 5 | github.com/coreos/go-systemd v0.0.0-20181031085051-9002847aa142 |
6 | github.com/ema/qdisc v0.0.0-20180104102928-b307c22d3ce7 | 6 | github.com/ema/qdisc v0.0.0-20180104102928-b307c22d3ce7 |
7 | github.com/godbus/dbus v0.0.0-20181101234600-2ff6f7ffd60f | 7 | github.com/godbus/dbus v0.0.0-20190402143921-271e53dc4968 |
8 | github.com/google/go-cmp v0.2.0 // indirect | 8 | github.com/google/go-cmp v0.2.0 // indirect |
9 | github.com/lufia/iostat v0.0.0-20170605150913-9f7362b77ad3 | 9 | github.com/lufia/iostat v0.0.0-20170605150913-9f7362b77ad3 |
10 | github.com/mattn/go-xmlrpc v0.0.0-20180914005235-ceecee2c45b7 | 10 | github.com/mattn/go-xmlrpc v0.0.0-20180914005235-ceecee2c45b7 |
@@ -16,8 +16,8 @@ github.com/ema/qdisc v0.0.0-20180104102928-b307c22d3ce7/go.mod h1:kXuKAameaga9ci | |||
16 | github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= | 16 | github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= |
17 | github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE= | 17 | github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE= |
18 | github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= | 18 | github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= |
19 | github.com/godbus/dbus v0.0.0-20181101234600-2ff6f7ffd60f h1:zlOR3rOlPAVvtfuxGKoghCmop5B0TRyu/ZieziZuGiM= | 19 | github.com/godbus/dbus v0.0.0-20190402143921-271e53dc4968 h1:s+PDl6lozQ+dEUtUtQnO7+A2iPG3sK1pI4liU+jxn90= |
20 | github.com/godbus/dbus v0.0.0-20181101234600-2ff6f7ffd60f/go.mod h1:/YcGZj5zSblfDWMMoOzV4fas9FZnQYTkDnsGvmh2Grw= | 20 | github.com/godbus/dbus v0.0.0-20190402143921-271e53dc4968/go.mod h1:/YcGZj5zSblfDWMMoOzV4fas9FZnQYTkDnsGvmh2Grw= |
21 | github.com/gogo/protobuf v1.1.1 h1:72R+M5VuhED/KujmZVcIquuo8mBgX4oVda//DQb3PXo= | 21 | github.com/gogo/protobuf v1.1.1 h1:72R+M5VuhED/KujmZVcIquuo8mBgX4oVda//DQb3PXo= |
22 | github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= | 22 | github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= |
23 | github.com/golang/protobuf v1.2.0 h1:P3YflyNX/ehuJFLhxviNdFxQPkGK5cDcApsge1SqnvM= | 23 | github.com/golang/protobuf v1.2.0 h1:P3YflyNX/ehuJFLhxviNdFxQPkGK5cDcApsge1SqnvM= |
diff --git a/vendor/github.com/godbus/dbus/conn.go b/vendor/github.com/godbus/dbus/conn.go index b38920b..9dced0c 100644 --- a/vendor/github.com/godbus/dbus/conn.go +++ b/vendor/github.com/godbus/dbus/conn.go | |||
@@ -134,6 +134,8 @@ func SystemBus() (conn *Conn, err error) { | |||
134 | } | 134 | } |
135 | 135 | ||
136 | // SystemBusPrivate returns a new private connection to the system bus. | 136 | // SystemBusPrivate returns a new private connection to the system bus. |
137 | // Note: this connection is not ready to use. One must perform Auth and Hello | ||
138 | // on the connection before it is useable. | ||
137 | func SystemBusPrivate(opts ...ConnOption) (*Conn, error) { | 139 | func SystemBusPrivate(opts ...ConnOption) (*Conn, error) { |
138 | return Dial(getSystemBusPlatformAddress(), opts...) | 140 | return Dial(getSystemBusPlatformAddress(), opts...) |
139 | } | 141 | } |
@@ -267,7 +269,7 @@ func (conn *Conn) Eavesdrop(ch chan<- *Message) { | |||
267 | conn.eavesdroppedLck.Unlock() | 269 | conn.eavesdroppedLck.Unlock() |
268 | } | 270 | } |
269 | 271 | ||
270 | // GetSerial returns an unused serial. | 272 | // getSerial returns an unused serial. |
271 | func (conn *Conn) getSerial() uint32 { | 273 | func (conn *Conn) getSerial() uint32 { |
272 | return conn.serialGen.GetSerial() | 274 | return conn.serialGen.GetSerial() |
273 | } | 275 | } |
@@ -381,8 +383,6 @@ func (conn *Conn) Object(dest string, path ObjectPath) BusObject { | |||
381 | return &Object{conn, dest, path} | 383 | return &Object{conn, dest, path} |
382 | } | 384 | } |
383 | 385 | ||
384 | // outWorker runs in an own goroutine, encoding and sending messages that are | ||
385 | // sent to conn.out. | ||
386 | func (conn *Conn) sendMessage(msg *Message) { | 386 | func (conn *Conn) sendMessage(msg *Message) { |
387 | conn.sendMessageAndIfClosed(msg, func() {}) | 387 | conn.sendMessageAndIfClosed(msg, func() {}) |
388 | } | 388 | } |
diff --git a/vendor/github.com/godbus/dbus/decoder.go b/vendor/github.com/godbus/dbus/decoder.go index 5c27d3b..c7fd4e4 100644 --- a/vendor/github.com/godbus/dbus/decoder.go +++ b/vendor/github.com/godbus/dbus/decoder.go | |||
@@ -189,7 +189,7 @@ func (dec *decoder) decode(s string, depth int) interface{} { | |||
189 | panic(FormatError("input exceeds container depth limit")) | 189 | panic(FormatError("input exceeds container depth limit")) |
190 | } | 190 | } |
191 | length := dec.decode("u", depth).(uint32) | 191 | length := dec.decode("u", depth).(uint32) |
192 | v := reflect.MakeSlice(reflect.SliceOf(typeFor(s[1:])), 0, int(length)) | 192 | v := reflect.MakeSlice(reflect.SliceOf(typeFor(s[1:])), 0, 0) |
193 | // Even for empty arrays, the correct padding must be included | 193 | // Even for empty arrays, the correct padding must be included |
194 | align := alignment(typeFor(s[1:])) | 194 | align := alignment(typeFor(s[1:])) |
195 | if len(s) > 1 && s[1] == '(' { | 195 | if len(s) > 1 && s[1] == '(' { |
diff --git a/vendor/github.com/godbus/dbus/default_handler.go b/vendor/github.com/godbus/dbus/default_handler.go index 81dbcc7..890b6f4 100644 --- a/vendor/github.com/godbus/dbus/default_handler.go +++ b/vendor/github.com/godbus/dbus/default_handler.go | |||
@@ -263,13 +263,13 @@ func (sh *defaultSignalHandler) DeliverSignal(intf, name string, signal *Signal) | |||
263 | case <-sh.closeChan: | 263 | case <-sh.closeChan: |
264 | return | 264 | return |
265 | default: | 265 | default: |
266 | go func() { | 266 | go func(ch chan<- *Signal) { |
267 | select { | 267 | select { |
268 | case ch <- signal: | 268 | case ch <- signal: |
269 | case <-sh.closeChan: | 269 | case <-sh.closeChan: |
270 | return | 270 | return |
271 | } | 271 | } |
272 | }() | 272 | }(ch) |
273 | } | 273 | } |
274 | } | 274 | } |
275 | } | 275 | } |
diff --git a/vendor/github.com/godbus/dbus/object.go b/vendor/github.com/godbus/dbus/object.go index f27ffe1..9309b9b 100644 --- a/vendor/github.com/godbus/dbus/object.go +++ b/vendor/github.com/godbus/dbus/object.go | |||
@@ -16,6 +16,7 @@ type BusObject interface { | |||
16 | AddMatchSignal(iface, member string, options ...MatchOption) *Call | 16 | AddMatchSignal(iface, member string, options ...MatchOption) *Call |
17 | RemoveMatchSignal(iface, member string, options ...MatchOption) *Call | 17 | RemoveMatchSignal(iface, member string, options ...MatchOption) *Call |
18 | GetProperty(p string) (Variant, error) | 18 | GetProperty(p string) (Variant, error) |
19 | SetProperty(p string, v interface{}) error | ||
19 | Destination() string | 20 | Destination() string |
20 | Path() ObjectPath | 21 | Path() ObjectPath |
21 | } | 22 | } |
@@ -146,7 +147,7 @@ func (o *Object) createCall(ctx context.Context, method string, flags Flags, ch | |||
146 | } | 147 | } |
147 | if msg.Flags&FlagNoReplyExpected == 0 { | 148 | if msg.Flags&FlagNoReplyExpected == 0 { |
148 | if ch == nil { | 149 | if ch == nil { |
149 | ch = make(chan *Call, 10) | 150 | ch = make(chan *Call, 1) |
150 | } else if cap(ch) == 0 { | 151 | } else if cap(ch) == 0 { |
151 | panic("dbus: unbuffered channel passed to (*Object).Go") | 152 | panic("dbus: unbuffered channel passed to (*Object).Go") |
152 | } | 153 | } |
@@ -187,7 +188,7 @@ func (o *Object) createCall(ctx context.Context, method string, flags Flags, ch | |||
187 | return call | 188 | return call |
188 | } | 189 | } |
189 | 190 | ||
190 | // GetProperty calls org.freedesktop.DBus.Properties.GetProperty on the given | 191 | // GetProperty calls org.freedesktop.DBus.Properties.Get on the given |
191 | // object. The property name must be given in interface.member notation. | 192 | // object. The property name must be given in interface.member notation. |
192 | func (o *Object) GetProperty(p string) (Variant, error) { | 193 | func (o *Object) GetProperty(p string) (Variant, error) { |
193 | idx := strings.LastIndex(p, ".") | 194 | idx := strings.LastIndex(p, ".") |
@@ -208,6 +209,20 @@ func (o *Object) GetProperty(p string) (Variant, error) { | |||
208 | return result, nil | 209 | return result, nil |
209 | } | 210 | } |
210 | 211 | ||
212 | // SetProperty calls org.freedesktop.DBus.Properties.Set on the given | ||
213 | // object. The property name must be given in interface.member notation. | ||
214 | func (o *Object) SetProperty(p string, v interface{}) error { | ||
215 | idx := strings.LastIndex(p, ".") | ||
216 | if idx == -1 || idx+1 == len(p) { | ||
217 | return errors.New("dbus: invalid property " + p) | ||
218 | } | ||
219 | |||
220 | iface := p[:idx] | ||
221 | prop := p[idx+1:] | ||
222 | |||
223 | return o.Call("org.freedesktop.DBus.Properties.Set", 0, iface, prop, v).Err | ||
224 | } | ||
225 | |||
211 | // Destination returns the destination that calls on (o *Object) are sent to. | 226 | // Destination returns the destination that calls on (o *Object) are sent to. |
212 | func (o *Object) Destination() string { | 227 | func (o *Object) Destination() string { |
213 | return o.dest | 228 | return o.dest |
diff --git a/vendor/github.com/godbus/dbus/transport_unix.go b/vendor/github.com/godbus/dbus/transport_unix.go index f000c6b..c7cd02f 100644 --- a/vendor/github.com/godbus/dbus/transport_unix.go +++ b/vendor/github.com/godbus/dbus/transport_unix.go | |||
@@ -203,7 +203,7 @@ func (t *unixTransport) SendMessage(msg *Message) error { | |||
203 | } | 203 | } |
204 | } else { | 204 | } else { |
205 | if err := msg.EncodeTo(t, nativeEndian); err != nil { | 205 | if err := msg.EncodeTo(t, nativeEndian); err != nil { |
206 | return nil | 206 | return err |
207 | } | 207 | } |
208 | } | 208 | } |
209 | return nil | 209 | return nil |
diff --git a/vendor/modules.txt b/vendor/modules.txt index 1d69edf..2d919b2 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt | |||
@@ -11,7 +11,7 @@ github.com/beorn7/perks/quantile | |||
11 | github.com/coreos/go-systemd/dbus | 11 | github.com/coreos/go-systemd/dbus |
12 | # github.com/ema/qdisc v0.0.0-20180104102928-b307c22d3ce7 | 12 | # github.com/ema/qdisc v0.0.0-20180104102928-b307c22d3ce7 |
13 | github.com/ema/qdisc | 13 | github.com/ema/qdisc |
14 | # github.com/godbus/dbus v0.0.0-20181101234600-2ff6f7ffd60f | 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.2.0 | 16 | # github.com/golang/protobuf v1.2.0 |
17 | github.com/golang/protobuf/proto | 17 | github.com/golang/protobuf/proto |