Module: Temporal::Client

Defined in:
lib/temporal/client.rb,
lib/temporal/client/errors.rb,
lib/temporal/client/retryer.rb,
lib/temporal/client/serializer.rb,
lib/temporal/client/grpc_client.rb,
lib/temporal/client/converter/base.rb,
lib/temporal/client/serializer/base.rb,
lib/temporal/client/serializer/failure.rb,
lib/temporal/client/converter/composite.rb,
lib/temporal/client/converter/payload/nil.rb,
lib/temporal/client/converter/payload/json.rb,
lib/temporal/client/serializer/start_timer.rb,
lib/temporal/client/converter/payload/bytes.rb,
lib/temporal/client/serializer/cancel_timer.rb,
lib/temporal/client/serializer/retry_policy.rb,
lib/temporal/client/serializer/fail_workflow.rb,
lib/temporal/client/serializer/record_marker.rb,
lib/temporal/client/serializer/continue_as_new.rb,
lib/temporal/client/serializer/complete_workflow.rb,
lib/temporal/client/serializer/schedule_activity.rb,
lib/temporal/client/serializer/start_child_workflow.rb,
lib/temporal/client/serializer/request_activity_cancellation.rb

Defined Under Namespace

Modules: Converter, Retryer, Serializer Classes: ArgumentError, Error, GRPCClient

Constant Summary collapse

CLIENT_TYPES_MAP =
{
  grpc: Temporal::Client::GRPCClient
}.freeze

Class Method Summary collapse

Class Method Details

.generateObject



9
10
11
12
13
14
15
16
17
18
19
# File 'lib/temporal/client.rb', line 9

def self.generate
  client_class = CLIENT_TYPES_MAP[Temporal.configuration.client_type]
  host = Temporal.configuration.host
  port = Temporal.configuration.port

  hostname = `hostname`
  thread_id = Thread.current.object_id
  identity = "#{thread_id}@#{hostname}"

  client_class.new(host, port, identity)
end