philae 0.2.9 → 0.2.10

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/philae/nsq_probe.rb +12 -0
  3. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: ff2209f1232243ec7572b2e1b7cfc3fa38534ede
4
- data.tar.gz: '088fe0493cf9be25e1377770d98f8b0966992e10'
3
+ metadata.gz: 1f08250290d02efad4f4060e4acfd244f43a2e9b
4
+ data.tar.gz: 80001366acfbb2f860042f4789ea217b19d5533d
5
5
  SHA512:
6
- metadata.gz: 7205fc6099d371c2a76771823c640e27fecbe0dda0a5ed70b59868c43db6c7c6b8817f2784f73e7739d7517d459c2ccda6eddce6044bf985a8e50b46c26b8fea
7
- data.tar.gz: 6245bcd630665228a6a016760e13cccb6edc721e449f6d7bed155256cb36eb8b365dee10b3d68f38edcc673cf0600908cdbbca4544232cc4ac55ed91ac1ad550
6
+ metadata.gz: bc124b36bb4d0f74874d19d19e28d289b87de89ccadc727c22069e70a6a9f661b6fb7c68d31db0a9402ef5eba97f4dd3551ee12dae8670784fdd12caa1980a37
7
+ data.tar.gz: 15c918087c8bccbbd560b16680ea32bb6fce6e8559b5efaeec8fd92000a491ced7fa2da13e20ff516c69cdec98e57d499d55758ba1a778cfaa8867d8bca8ec38
@@ -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"
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: philae
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.9
4
+ version: 0.2.10
5
5
  platform: ruby
6
6
  authors:
7
7
  - leo@scalingo.com