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



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

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

  @@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