sensu-redis 2.2.1 → 2.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- checksums.yaml.gz.sig +0 -0
- data.tar.gz.sig +0 -0
- data/lib/sensu/redis/client.rb +19 -2
- data/sensu-redis.gemspec +1 -1
- metadata +2 -2
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 130f1d035399f05c74f3540743bfea9496d416ad
|
4
|
+
data.tar.gz: 3f1f33e4524d9691f8ed0924c66159d16cd7cd0b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 76f796f5c02eb17b2b5ec6443d6f9352909ae05e974a7db64d2e59af679d27466bf1d1e03c7d11c68c755b56e5860ec5dd9adf8f889ab68c973cc9898be66dea
|
7
|
+
data.tar.gz: 9cb0310c6bb4efd8935411bc97d88fb36178179f85e6ba7beac56864e935180d9618582a690ebeb56f7c5645b4e94475559b25650646c010a733d8e3e858b7a4
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data.tar.gz.sig
CHANGED
Binary file
|
data/lib/sensu/redis/client.rb
CHANGED
@@ -19,6 +19,7 @@ module Sensu
|
|
19
19
|
@port = (options[:port] || 6379).to_i
|
20
20
|
@db = options[:db]
|
21
21
|
@password = options[:password]
|
22
|
+
@tls = options[:tls] || options[:ssl]
|
22
23
|
@auto_reconnect = options.fetch(:auto_reconnect, true)
|
23
24
|
@reconnect_on_error = options.fetch(:reconnect_on_error, true)
|
24
25
|
@error_callback = Proc.new {}
|
@@ -264,12 +265,14 @@ module Sensu
|
|
264
265
|
end
|
265
266
|
|
266
267
|
# This method is called by EM when the connection is
|
267
|
-
# established. This method is reponsible for
|
268
|
-
# connection before Redis commands
|
268
|
+
# established. This method is reponsible for upgrading to TLS if
|
269
|
+
# necessary and validating the connection before Redis commands
|
270
|
+
# can be sent.
|
269
271
|
def connection_completed
|
270
272
|
@response_callbacks = []
|
271
273
|
@multibulk_count = false
|
272
274
|
@connected = true
|
275
|
+
start_tls(@tls) unless @tls.nil?
|
273
276
|
authenticate do
|
274
277
|
select_db
|
275
278
|
verify_version do
|
@@ -280,6 +283,20 @@ module Sensu
|
|
280
283
|
end
|
281
284
|
end
|
282
285
|
|
286
|
+
# This method is called by EM when the SSL/TLS handshake has
|
287
|
+
# been completed, as a result of calling #start_tls to initiate
|
288
|
+
# SSL/TLS on the connection. Log when the TLS handshake is
|
289
|
+
# complete.
|
290
|
+
def ssl_handshake_completed
|
291
|
+
if @logger
|
292
|
+
@logger.debug("redis tls handshake complete", {
|
293
|
+
:host => @host,
|
294
|
+
:port => @port,
|
295
|
+
:tls => @tls
|
296
|
+
})
|
297
|
+
end
|
298
|
+
end
|
299
|
+
|
283
300
|
# Begin a multi bulk response array for an expected number of
|
284
301
|
# responses. Using this method causes `dispatch_response()` to
|
285
302
|
# wait until all of the expected responses have been added to
|
data/sensu-redis.gemspec
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sensu-redis
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.
|
4
|
+
version: 2.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sean Porter
|
@@ -30,7 +30,7 @@ cert_chain:
|
|
30
30
|
jOeGyhtQa9j4FFmsEJDg59f5v/3hECXsa3Xuml3foaFHzX3Ya/YIyd2YFxvkFKIu
|
31
31
|
GVbe7A3YdxzdkH2Es/Ym9twdxXaIDdXzj8sWhw==
|
32
32
|
-----END CERTIFICATE-----
|
33
|
-
date: 2018-03-
|
33
|
+
date: 2018-03-09 00:00:00.000000000 Z
|
34
34
|
dependencies:
|
35
35
|
- !ruby/object:Gem::Dependency
|
36
36
|
name: eventmachine
|
metadata.gz.sig
CHANGED
Binary file
|