philae 0.2.9 → 0.2.10
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/philae/nsq_probe.rb +12 -0
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1f08250290d02efad4f4060e4acfd244f43a2e9b
|
4
|
+
data.tar.gz: 80001366acfbb2f860042f4789ea217b19d5533d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bc124b36bb4d0f74874d19d19e28d289b87de89ccadc727c22069e70a6a9f661b6fb7c68d31db0a9402ef5eba97f4dd3551ee12dae8670784fdd12caa1980a37
|
7
|
+
data.tar.gz: 15c918087c8bccbbd560b16680ea32bb6fce6e8559b5efaeec8fd92000a491ced7fa2da13e20ff516c69cdec98e57d499d55758ba1a778cfaa8867d8bca8ec38
|
data/lib/philae/nsq_probe.rb
CHANGED
@@ -2,6 +2,18 @@ require File.join File.dirname(__FILE__), 'http_probe.rb'
|
|
2
2
|
|
3
3
|
module Philae
|
4
4
|
class NSQProbe < HttpProbe
|
5
|
+
def self.new_from_env(name)
|
6
|
+
if ENV["NSQD_TLS"] == "true"
|
7
|
+
return self.new(name, ENV["NSQD_HOST"], ENV["NSQD_HTTP_PORT"], {
|
8
|
+
cert: ENV["NSQD_TLS_CERT"],
|
9
|
+
key: ENV["NSQD_TLS_KEY"],
|
10
|
+
cacert: ENV["NSQD_TLS_CACERT"],
|
11
|
+
})
|
12
|
+
else
|
13
|
+
return self.new(name, ENV["NSQD_HOST"], ENV["NSQD_HTTP_PORT"])
|
14
|
+
end
|
15
|
+
end
|
16
|
+
|
5
17
|
def initialize(name, host, port = 4151, tls_context = nil)
|
6
18
|
@name = name
|
7
19
|
scheme = "http"
|