Class: Temporalio::Internal::Worker::WorkflowInstance::NexusClient

Inherits:
Workflow::NexusClient show all
Defined in:
lib/temporalio/internal/worker/workflow_instance/nexus_client.rb

Overview

Implementation of the Nexus client.

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Workflow::NexusClient

#execute_operation

Constructor Details

#initialize(endpoint:, service:, outbound:) ⇒ NexusClient

rubocop:disable Lint/MissingSuper



14
15
16
17
18
# File 'lib/temporalio/internal/worker/workflow_instance/nexus_client.rb', line 14

def initialize(endpoint:, service:, outbound:) # rubocop:disable Lint/MissingSuper
  @endpoint = endpoint.to_s
  @service = service.to_s
  @outbound = outbound
end

Instance Attribute Details

#endpointObject (readonly)

Returns the value of attribute endpoint.



12
13
14
# File 'lib/temporalio/internal/worker/workflow_instance/nexus_client.rb', line 12

def endpoint
  @endpoint
end

#serviceObject (readonly)

Returns the value of attribute service.



12
13
14
# File 'lib/temporalio/internal/worker/workflow_instance/nexus_client.rb', line 12

def service
  @service
end

Instance Method Details

#start_operation(operation, arg, schedule_to_close_timeout: nil, cancellation_type: nil, summary: nil, cancellation: Workflow.cancellation, arg_hint: nil, result_hint: nil) ⇒ Object



20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
# File 'lib/temporalio/internal/worker/workflow_instance/nexus_client.rb', line 20

def start_operation(operation, arg, schedule_to_close_timeout: nil, cancellation_type: nil, summary: nil,
                    cancellation: Workflow.cancellation, arg_hint: nil, result_hint: nil)
  @outbound.start_nexus_operation(
    Temporalio::Worker::Interceptor::Workflow::StartNexusOperationInput.new(
      endpoint: @endpoint,
      service: @service,
      operation: operation.to_s,
      arg:,
      schedule_to_close_timeout:,
      cancellation_type:,
      summary:,
      cancellation:,
      arg_hint:,
      result_hint:,
      headers: {}
    )
  )
end