istox 0.1.157.11.t3 → 0.1.157.11.t4
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
- data/lib/istox/helpers/grpc_client.rb +5 -3
- data/lib/istox/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 96e4c1d66416166966ff6ce9dfc4a23fe6cd2d69625b767caec16b8f0e31d6f9
|
4
|
+
data.tar.gz: 7847d3d004d19e99be35807cb19995e6d7894eea4c435905a4238cb2da02030f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ada2bef07af903c7e7e1182ffebd6344b7b52a14bedffec316e462caed04041f2ef108e929f1e470b83e01b0789351b39c19352fd730b0de964636566e725e90
|
7
|
+
data.tar.gz: 5c57b6369afebbba64a9289fc2b9b9b08ca4d9fa4b906fef101d8f2e49350a51bbb2f0c09c8ea9b2a4a20593aa8e3d61838df5411b10153384429d3fe6ab7884
|
@@ -3,9 +3,11 @@ require 'istox/helpers/logger'
|
|
3
3
|
module Istox
|
4
4
|
class GrpcClient
|
5
5
|
class << self
|
6
|
-
def add_host(host_type, url)
|
6
|
+
def add_host(host_type, url, ssl_certificate = nil)
|
7
7
|
@@hosts = {} unless defined?(@@hosts)
|
8
|
+
@@ssl_certs = {} unless defined?(@@ssl_certs)
|
8
9
|
|
10
|
+
@@ssl_certs[host_type] = ssl_certificate unless ssl_certificate.nil? || ssl_certificate.empty?
|
9
11
|
@@hosts[host_type] = url
|
10
12
|
end
|
11
13
|
|
@@ -83,9 +85,9 @@ module Istox
|
|
83
85
|
log.info 'Reinitiating to grpc host at ' + host_url
|
84
86
|
t1 = Time.now
|
85
87
|
grpc_options = { hostname: host_url }
|
86
|
-
if
|
88
|
+
if @@ssl_certs[host_type]
|
87
89
|
log.info '[INFO] Using SSL connection...'
|
88
|
-
grpc_options[:ssl_certificate] =
|
90
|
+
grpc_options[:ssl_certificate] = @@ssl_certs[host_type]
|
89
91
|
end
|
90
92
|
@@services[get_key(host_type, service)] = ::Gruf::Client.new(service: service, options: grpc_options, client_options: client_options)
|
91
93
|
log.info "Time taken for reinitiating grpc host: #{Time.now - t1} seconds"
|
data/lib/istox/version.rb
CHANGED