Class: Temporalio::Internal::Bridge::Client

Inherits:
Object
  • Object
show all
Defined in:
lib/temporalio/internal/bridge/client.rb

Defined Under Namespace

Classes: HTTPConnectProxyOptions, KeepAliveOptions, Options, RPCRetryOptions, TLSOptions

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.new(runtime, options) ⇒ Object



54
55
56
57
58
59
60
61
# File 'lib/temporalio/internal/bridge/client.rb', line 54

def self.new(runtime, options)
  queue = Queue.new
  async_new(runtime, options, queue)
  result = queue.pop
  raise result if result.is_a?(Exception)

  result
end

Instance Method Details

#_invoke_rpc(service:, rpc:, request:, response_class:, rpc_retry:, rpc_metadata:, rpc_timeout:) ⇒ Object



63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
# File 'lib/temporalio/internal/bridge/client.rb', line 63

def _invoke_rpc(
  service:,
  rpc:,
  request:,
  response_class:,
  rpc_retry:,
  rpc_metadata:,
  rpc_timeout:
)
  queue = Queue.new
  async_invoke_rpc(
    service:,
    rpc:,
    request: request.to_proto,
    rpc_retry:,
    rpc_metadata:,
    rpc_timeout:,
    queue:
  )
  result = queue.pop
  raise result if result.is_a?(Exception)

  response_class.decode(result)
end