Class: Istox::GrpcClient

Inherits:
Object
  • Object
show all
Defined in:
lib/istox/helpers/grpc_client.rb

Class Method Summary collapse

Class Method Details

.add_host(host_type, url) ⇒ Object



4
5
6
7
8
9
10
# File 'lib/istox/helpers/grpc_client.rb', line 4

def add_host(host_type, url)
    unless defined?(@@hosts)
       @@hosts = {}
    end

    @@hosts[host_type] = url
end

.call(host_type, service, method, **keyword_args) ⇒ Object



12
13
14
15
16
17
18
# File 'lib/istox/helpers/grpc_client.rb', line 12

def call(host_type, service, method, **keyword_args)
    execute(host_type, service, method, **keyword_args)
# rescue => e
    # reinitiate service and try again, second chance
    # reinitiate_service(host_type, service)
    # execute(host_type, service, method, **keyword_args)
end