temporalio 0.0.2 → 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +25 -23
- data/bridge/Cargo.lock +168 -59
- data/bridge/Cargo.toml +4 -2
- data/bridge/sdk-core/README.md +19 -6
- data/bridge/sdk-core/client/src/lib.rs +215 -39
- data/bridge/sdk-core/client/src/metrics.rs +17 -8
- data/bridge/sdk-core/client/src/raw.rs +4 -4
- data/bridge/sdk-core/client/src/retry.rs +32 -20
- data/bridge/sdk-core/core/Cargo.toml +22 -9
- data/bridge/sdk-core/core/src/abstractions.rs +203 -14
- data/bridge/sdk-core/core/src/core_tests/activity_tasks.rs +76 -41
- data/bridge/sdk-core/core/src/core_tests/determinism.rs +165 -2
- data/bridge/sdk-core/core/src/core_tests/local_activities.rs +204 -83
- data/bridge/sdk-core/core/src/core_tests/queries.rs +3 -4
- data/bridge/sdk-core/core/src/core_tests/workers.rs +1 -3
- data/bridge/sdk-core/core/src/core_tests/workflow_tasks.rs +397 -54
- data/bridge/sdk-core/core/src/ephemeral_server/mod.rs +106 -12
- data/bridge/sdk-core/core/src/internal_flags.rs +136 -0
- data/bridge/sdk-core/core/src/lib.rs +16 -9
- data/bridge/sdk-core/core/src/telemetry/log_export.rs +1 -1
- data/bridge/sdk-core/core/src/telemetry/metrics.rs +69 -35
- data/bridge/sdk-core/core/src/telemetry/mod.rs +29 -13
- data/bridge/sdk-core/core/src/telemetry/prometheus_server.rs +17 -12
- data/bridge/sdk-core/core/src/test_help/mod.rs +62 -12
- data/bridge/sdk-core/core/src/worker/activities/activity_heartbeat_manager.rs +112 -156
- data/bridge/sdk-core/core/src/worker/activities/activity_task_poller_stream.rs +89 -0
- data/bridge/sdk-core/core/src/worker/activities/local_activities.rs +352 -122
- data/bridge/sdk-core/core/src/worker/activities.rs +233 -157
- data/bridge/sdk-core/core/src/worker/client/mocks.rs +22 -2
- data/bridge/sdk-core/core/src/worker/client.rs +18 -2
- data/bridge/sdk-core/core/src/worker/mod.rs +165 -58
- data/bridge/sdk-core/core/src/worker/workflow/bridge.rs +1 -3
- data/bridge/sdk-core/core/src/worker/workflow/driven_workflow.rs +3 -5
- data/bridge/sdk-core/core/src/worker/workflow/history_update.rs +856 -277
- data/bridge/sdk-core/core/src/worker/workflow/machines/activity_state_machine.rs +100 -43
- data/bridge/sdk-core/core/src/worker/workflow/machines/cancel_external_state_machine.rs +7 -7
- data/bridge/sdk-core/core/src/worker/workflow/machines/cancel_workflow_state_machine.rs +5 -4
- data/bridge/sdk-core/core/src/worker/workflow/machines/child_workflow_state_machine.rs +87 -27
- data/bridge/sdk-core/core/src/worker/workflow/machines/complete_workflow_state_machine.rs +5 -4
- data/bridge/sdk-core/core/src/worker/workflow/machines/continue_as_new_workflow_state_machine.rs +5 -4
- data/bridge/sdk-core/core/src/worker/workflow/machines/fail_workflow_state_machine.rs +5 -4
- data/bridge/sdk-core/core/src/worker/workflow/machines/local_activity_state_machine.rs +137 -62
- data/bridge/sdk-core/core/src/worker/workflow/machines/mod.rs +25 -17
- data/bridge/sdk-core/core/src/worker/workflow/machines/modify_workflow_properties_state_machine.rs +7 -6
- data/bridge/sdk-core/core/src/worker/workflow/machines/patch_state_machine.rs +103 -152
- data/bridge/sdk-core/core/src/worker/workflow/machines/signal_external_state_machine.rs +7 -7
- data/bridge/sdk-core/core/src/worker/workflow/machines/timer_state_machine.rs +9 -9
- data/bridge/sdk-core/core/src/worker/workflow/machines/transition_coverage.rs +2 -2
- data/bridge/sdk-core/core/src/worker/workflow/machines/upsert_search_attributes_state_machine.rs +14 -7
- data/bridge/sdk-core/core/src/worker/workflow/machines/workflow_machines/local_acts.rs +5 -16
- data/bridge/sdk-core/core/src/worker/workflow/machines/workflow_machines.rs +201 -121
- data/bridge/sdk-core/core/src/worker/workflow/machines/workflow_task_state_machine.rs +11 -14
- data/bridge/sdk-core/core/src/worker/workflow/managed_run/managed_wf_test.rs +30 -15
- data/bridge/sdk-core/core/src/worker/workflow/managed_run.rs +1026 -376
- data/bridge/sdk-core/core/src/worker/workflow/mod.rs +460 -384
- data/bridge/sdk-core/core/src/worker/workflow/run_cache.rs +40 -57
- data/bridge/sdk-core/core/src/worker/workflow/wft_extraction.rs +125 -0
- data/bridge/sdk-core/core/src/worker/workflow/wft_poller.rs +1 -4
- data/bridge/sdk-core/core/src/worker/workflow/workflow_stream/saved_wf_inputs.rs +117 -0
- data/bridge/sdk-core/core/src/worker/workflow/workflow_stream/tonic_status_serde.rs +24 -0
- data/bridge/sdk-core/core/src/worker/workflow/workflow_stream.rs +448 -718
- data/bridge/sdk-core/core-api/Cargo.toml +2 -1
- data/bridge/sdk-core/core-api/src/errors.rs +1 -34
- data/bridge/sdk-core/core-api/src/lib.rs +6 -2
- data/bridge/sdk-core/core-api/src/telemetry.rs +0 -6
- data/bridge/sdk-core/core-api/src/worker.rs +14 -1
- data/bridge/sdk-core/fsm/rustfsm_procmacro/src/lib.rs +18 -15
- data/bridge/sdk-core/fsm/rustfsm_trait/src/lib.rs +8 -3
- data/bridge/sdk-core/histories/evict_while_la_running_no_interference-16_history.bin +0 -0
- data/bridge/sdk-core/protos/api_upstream/temporal/api/command/v1/message.proto +5 -17
- data/bridge/sdk-core/protos/api_upstream/temporal/api/common/v1/message.proto +11 -0
- data/bridge/sdk-core/protos/api_upstream/temporal/api/enums/v1/command_type.proto +1 -6
- data/bridge/sdk-core/protos/api_upstream/temporal/api/enums/v1/event_type.proto +6 -6
- data/bridge/sdk-core/protos/api_upstream/temporal/api/enums/v1/failed_cause.proto +5 -0
- data/bridge/sdk-core/protos/api_upstream/temporal/api/enums/v1/update.proto +22 -6
- data/bridge/sdk-core/protos/api_upstream/temporal/api/history/v1/message.proto +48 -19
- data/bridge/sdk-core/protos/api_upstream/temporal/api/namespace/v1/message.proto +2 -0
- data/bridge/sdk-core/protos/api_upstream/temporal/api/operatorservice/v1/request_response.proto +3 -0
- data/bridge/sdk-core/protos/api_upstream/temporal/api/{enums/v1/interaction_type.proto → protocol/v1/message.proto} +29 -11
- data/bridge/sdk-core/protos/api_upstream/temporal/api/sdk/v1/task_complete_metadata.proto +63 -0
- data/bridge/sdk-core/protos/api_upstream/temporal/api/update/v1/message.proto +111 -0
- data/bridge/sdk-core/protos/api_upstream/temporal/api/workflowservice/v1/request_response.proto +59 -28
- data/bridge/sdk-core/protos/api_upstream/temporal/api/workflowservice/v1/service.proto +2 -2
- data/bridge/sdk-core/protos/local/temporal/sdk/core/activity_result/activity_result.proto +1 -0
- data/bridge/sdk-core/protos/local/temporal/sdk/core/activity_task/activity_task.proto +1 -0
- data/bridge/sdk-core/protos/local/temporal/sdk/core/child_workflow/child_workflow.proto +1 -0
- data/bridge/sdk-core/protos/local/temporal/sdk/core/common/common.proto +1 -0
- data/bridge/sdk-core/protos/local/temporal/sdk/core/core_interface.proto +1 -0
- data/bridge/sdk-core/protos/local/temporal/sdk/core/external_data/external_data.proto +1 -0
- data/bridge/sdk-core/protos/local/temporal/sdk/core/workflow_activation/workflow_activation.proto +7 -0
- data/bridge/sdk-core/protos/local/temporal/sdk/core/workflow_commands/workflow_commands.proto +1 -0
- data/bridge/sdk-core/protos/local/temporal/sdk/core/workflow_completion/workflow_completion.proto +6 -0
- data/bridge/sdk-core/sdk/Cargo.toml +3 -2
- data/bridge/sdk-core/sdk/src/lib.rs +87 -20
- data/bridge/sdk-core/sdk/src/workflow_future.rs +9 -8
- data/bridge/sdk-core/sdk-core-protos/Cargo.toml +5 -2
- data/bridge/sdk-core/sdk-core-protos/build.rs +36 -1
- data/bridge/sdk-core/sdk-core-protos/src/history_builder.rs +100 -87
- data/bridge/sdk-core/sdk-core-protos/src/history_info.rs +5 -1
- data/bridge/sdk-core/sdk-core-protos/src/lib.rs +175 -57
- data/bridge/sdk-core/sdk-core-protos/src/task_token.rs +12 -2
- data/bridge/sdk-core/test-utils/Cargo.toml +3 -1
- data/bridge/sdk-core/test-utils/src/canned_histories.rs +106 -296
- data/bridge/sdk-core/test-utils/src/histfetch.rs +1 -1
- data/bridge/sdk-core/test-utils/src/lib.rs +82 -23
- data/bridge/sdk-core/test-utils/src/wf_input_saver.rs +50 -0
- data/bridge/sdk-core/test-utils/src/workflows.rs +29 -0
- data/bridge/sdk-core/tests/fuzzy_workflow.rs +130 -0
- data/bridge/sdk-core/tests/{load_tests.rs → heavy_tests.rs} +125 -51
- data/bridge/sdk-core/tests/integ_tests/ephemeral_server_tests.rs +25 -3
- data/bridge/sdk-core/tests/integ_tests/heartbeat_tests.rs +5 -3
- data/bridge/sdk-core/tests/integ_tests/metrics_tests.rs +218 -16
- data/bridge/sdk-core/tests/integ_tests/polling_tests.rs +4 -47
- data/bridge/sdk-core/tests/integ_tests/queries_tests.rs +5 -128
- data/bridge/sdk-core/tests/integ_tests/visibility_tests.rs +83 -25
- data/bridge/sdk-core/tests/integ_tests/workflow_tests/activities.rs +93 -69
- data/bridge/sdk-core/tests/integ_tests/workflow_tests/cancel_external.rs +1 -0
- data/bridge/sdk-core/tests/integ_tests/workflow_tests/cancel_wf.rs +6 -13
- data/bridge/sdk-core/tests/integ_tests/workflow_tests/child_workflows.rs +1 -0
- data/bridge/sdk-core/tests/integ_tests/workflow_tests/continue_as_new.rs +6 -2
- data/bridge/sdk-core/tests/integ_tests/workflow_tests/determinism.rs +3 -10
- data/bridge/sdk-core/tests/integ_tests/workflow_tests/local_activities.rs +72 -191
- data/bridge/sdk-core/tests/integ_tests/workflow_tests/modify_wf_properties.rs +1 -0
- data/bridge/sdk-core/tests/integ_tests/workflow_tests/patches.rs +7 -28
- data/bridge/sdk-core/tests/integ_tests/workflow_tests/replay.rs +12 -7
- data/bridge/sdk-core/tests/integ_tests/workflow_tests/resets.rs +1 -0
- data/bridge/sdk-core/tests/integ_tests/workflow_tests/signals.rs +18 -14
- data/bridge/sdk-core/tests/integ_tests/workflow_tests/stickyness.rs +6 -20
- data/bridge/sdk-core/tests/integ_tests/workflow_tests/timers.rs +10 -21
- data/bridge/sdk-core/tests/integ_tests/workflow_tests/upsert_search_attrs.rs +6 -4
- data/bridge/sdk-core/tests/integ_tests/workflow_tests.rs +10 -11
- data/bridge/sdk-core/tests/main.rs +3 -13
- data/bridge/sdk-core/tests/runner.rs +75 -36
- data/bridge/sdk-core/tests/wf_input_replay.rs +32 -0
- data/bridge/src/connection.rs +41 -25
- data/bridge/src/lib.rs +269 -14
- data/bridge/src/runtime.rs +1 -1
- data/bridge/src/test_server.rs +153 -0
- data/bridge/src/worker.rs +89 -16
- data/lib/gen/temporal/api/command/v1/message_pb.rb +4 -18
- data/lib/gen/temporal/api/common/v1/message_pb.rb +4 -0
- data/lib/gen/temporal/api/enums/v1/command_type_pb.rb +1 -3
- data/lib/gen/temporal/api/enums/v1/event_type_pb.rb +3 -3
- data/lib/gen/temporal/api/enums/v1/failed_cause_pb.rb +2 -0
- data/lib/gen/temporal/api/enums/v1/update_pb.rb +6 -4
- data/lib/gen/temporal/api/history/v1/message_pb.rb +27 -19
- data/lib/gen/temporal/api/namespace/v1/message_pb.rb +1 -0
- data/lib/gen/temporal/api/operatorservice/v1/request_response_pb.rb +3 -0
- data/lib/gen/temporal/api/protocol/v1/message_pb.rb +30 -0
- data/lib/gen/temporal/api/sdk/v1/task_complete_metadata_pb.rb +23 -0
- data/lib/gen/temporal/api/testservice/v1/request_response_pb.rb +49 -0
- data/lib/gen/temporal/api/testservice/v1/service_pb.rb +21 -0
- data/lib/gen/temporal/api/update/v1/message_pb.rb +72 -0
- data/lib/gen/temporal/api/workflowservice/v1/request_response_pb.rb +26 -16
- data/lib/gen/temporal/sdk/core/activity_result/activity_result_pb.rb +13 -9
- data/lib/gen/temporal/sdk/core/activity_task/activity_task_pb.rb +10 -6
- data/lib/gen/temporal/sdk/core/child_workflow/child_workflow_pb.rb +13 -9
- data/lib/gen/temporal/sdk/core/common/common_pb.rb +7 -3
- data/lib/gen/temporal/sdk/core/core_interface_pb.rb +9 -3
- data/lib/gen/temporal/sdk/core/external_data/external_data_pb.rb +7 -3
- data/lib/gen/temporal/sdk/core/workflow_activation/workflow_activation_pb.rb +27 -21
- data/lib/gen/temporal/sdk/core/workflow_commands/workflow_commands_pb.rb +28 -24
- data/lib/gen/temporal/sdk/core/workflow_completion/workflow_completion_pb.rb +12 -5
- data/lib/temporalio/activity/context.rb +13 -8
- data/lib/temporalio/activity/info.rb +1 -1
- data/lib/temporalio/bridge/connect_options.rb +15 -0
- data/lib/temporalio/bridge/retry_config.rb +24 -0
- data/lib/temporalio/bridge/tls_options.rb +19 -0
- data/lib/temporalio/client/implementation.rb +8 -8
- data/lib/temporalio/connection/retry_config.rb +44 -0
- data/lib/temporalio/connection/service.rb +20 -0
- data/lib/temporalio/connection/test_service.rb +92 -0
- data/lib/temporalio/connection/tls_options.rb +51 -0
- data/lib/temporalio/connection/workflow_service.rb +731 -0
- data/lib/temporalio/connection.rb +55 -720
- data/lib/temporalio/interceptor/activity_inbound.rb +22 -0
- data/lib/temporalio/interceptor/activity_outbound.rb +24 -0
- data/lib/temporalio/interceptor/chain.rb +5 -5
- data/lib/temporalio/interceptor/client.rb +8 -4
- data/lib/temporalio/interceptor.rb +22 -0
- data/lib/temporalio/retry_policy.rb +13 -3
- data/lib/temporalio/testing/time_skipping_handle.rb +32 -0
- data/lib/temporalio/testing/time_skipping_interceptor.rb +23 -0
- data/lib/temporalio/testing/workflow_environment.rb +112 -0
- data/lib/temporalio/testing.rb +175 -0
- data/lib/temporalio/version.rb +1 -1
- data/lib/temporalio/worker/activity_runner.rb +26 -4
- data/lib/temporalio/worker/activity_worker.rb +44 -18
- data/lib/temporalio/worker/sync_worker.rb +47 -11
- data/lib/temporalio/worker.rb +27 -21
- data/lib/temporalio/workflow/async.rb +46 -0
- data/lib/temporalio/workflow/future.rb +138 -0
- data/lib/temporalio/workflow/info.rb +76 -0
- data/temporalio.gemspec +4 -3
- metadata +67 -17
- data/bridge/sdk-core/Cargo.lock +0 -2606
- data/bridge/sdk-core/protos/api_upstream/temporal/api/interaction/v1/message.proto +0 -87
- data/lib/bridge.so +0 -0
- data/lib/gen/temporal/api/enums/v1/interaction_type_pb.rb +0 -25
- data/lib/gen/temporal/api/interaction/v1/message_pb.rb +0 -49
- data/lib/gen/temporal/sdk/core/bridge/bridge_pb.rb +0 -222
@@ -1,751 +1,86 @@
|
|
1
|
-
require 'temporal/api/workflowservice/v1/request_response_pb'
|
2
1
|
require 'temporalio/bridge'
|
2
|
+
require 'temporalio/bridge/connect_options'
|
3
|
+
require 'temporalio/bridge/tls_options'
|
4
|
+
require 'temporalio/connection/tls_options'
|
5
|
+
require 'temporalio/connection/test_service'
|
6
|
+
require 'temporalio/connection/workflow_service'
|
3
7
|
require 'temporalio/errors'
|
4
8
|
require 'temporalio/runtime'
|
5
9
|
require 'uri'
|
6
10
|
|
7
11
|
module Temporalio
|
8
|
-
# A connection to the Temporal server.
|
12
|
+
# A connection to the Temporal server. It provides gRPC level communication to a Temporal server.
|
9
13
|
#
|
10
|
-
#
|
11
|
-
#
|
14
|
+
# Connections are usually used through either a {Temporalio::Client} or a {Temporalio::Worker}.
|
15
|
+
# It may also be used to perform gRPC requests to the server (see {#workflow_service}).
|
12
16
|
class Connection
|
13
17
|
# @api private
|
14
18
|
attr_reader :core_connection
|
15
19
|
|
16
|
-
# @param
|
17
|
-
#
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
# @return [Temporalio::Api::WorkflowService::V1::RegisterNamespaceResponse]
|
30
|
-
def register_namespace(request, metadata: {}, timeout: nil)
|
31
|
-
encoded = Temporalio::Api::WorkflowService::V1::RegisterNamespaceRequest.encode(request)
|
32
|
-
response = core_connection.call(:register_namespace, encoded, metadata, timeout)
|
33
|
-
|
34
|
-
Temporalio::Api::WorkflowService::V1::RegisterNamespaceResponse.decode(response)
|
35
|
-
end
|
36
|
-
|
37
|
-
# @param request [Temporalio::Api::WorkflowService::V1::DescribeNamespaceRequest]
|
38
|
-
# @param metadata [Hash<String, String>] Headers used on the RPC call.
|
39
|
-
# Keys here override client-level RPC metadata keys.
|
40
|
-
# @param timeout [Integer] Optional RPC deadline to set for each RPC call.
|
41
|
-
#
|
42
|
-
# @return [Temporalio::Api::WorkflowService::V1::DescribeNamespaceResponse]
|
43
|
-
def describe_namespace(request, metadata: {}, timeout: nil)
|
44
|
-
encoded = Temporalio::Api::WorkflowService::V1::DescribeNamespaceRequest.encode(request)
|
45
|
-
response = core_connection.call(:describe_namespace, encoded, metadata, timeout)
|
46
|
-
|
47
|
-
Temporalio::Api::WorkflowService::V1::DescribeNamespaceResponse.decode(response)
|
48
|
-
end
|
49
|
-
|
50
|
-
# @param request [Temporalio::Api::WorkflowService::V1::ListNamespacesRequest]
|
51
|
-
# @param metadata [Hash<String, String>] Headers used on the RPC call.
|
52
|
-
# Keys here override client-level RPC metadata keys.
|
53
|
-
# @param timeout [Integer] Optional RPC deadline to set for each RPC call.
|
54
|
-
#
|
55
|
-
# @return [Temporalio::Api::WorkflowService::V1::ListNamespacesResponse]
|
56
|
-
def list_namespaces(request, metadata: {}, timeout: nil)
|
57
|
-
encoded = Temporalio::Api::WorkflowService::V1::ListNamespacesRequest.encode(request)
|
58
|
-
response = core_connection.call(:list_namespaces, encoded, metadata, timeout)
|
59
|
-
|
60
|
-
Temporalio::Api::WorkflowService::V1::ListNamespacesResponse.decode(response)
|
61
|
-
end
|
62
|
-
|
63
|
-
# @param request [Temporalio::Api::WorkflowService::V1::UpdateNamespaceRequest]
|
64
|
-
# @param metadata [Hash<String, String>] Headers used on the RPC call.
|
65
|
-
# Keys here override client-level RPC metadata keys.
|
66
|
-
# @param timeout [Integer] Optional RPC deadline to set for each RPC call.
|
67
|
-
#
|
68
|
-
# @return [Temporalio::Api::WorkflowService::V1::UpdateNamespaceResponse]
|
69
|
-
def update_namespace(request, metadata: {}, timeout: nil)
|
70
|
-
encoded = Temporalio::Api::WorkflowService::V1::UpdateNamespaceRequest.encode(request)
|
71
|
-
response = core_connection.call(:update_namespace, encoded, metadata, timeout)
|
72
|
-
|
73
|
-
Temporalio::Api::WorkflowService::V1::UpdateNamespaceResponse.decode(response)
|
74
|
-
end
|
75
|
-
|
76
|
-
# @param request [Temporalio::Api::WorkflowService::V1::DeprecateNamespaceRequest]
|
77
|
-
# @param metadata [Hash<String, String>] Headers used on the RPC call.
|
78
|
-
# Keys here override client-level RPC metadata keys.
|
79
|
-
# @param timeout [Integer] Optional RPC deadline to set for each RPC call.
|
80
|
-
#
|
81
|
-
# @return [Temporalio::Api::WorkflowService::V1::DeprecateNamespaceResponse]
|
82
|
-
def deprecate_namespace(request, metadata: {}, timeout: nil)
|
83
|
-
encoded = Temporalio::Api::WorkflowService::V1::DeprecateNamespaceRequest.encode(request)
|
84
|
-
response = core_connection.call(:deprecate_namespace, encoded, metadata, timeout)
|
85
|
-
|
86
|
-
Temporalio::Api::WorkflowService::V1::DeprecateNamespaceResponse.decode(response)
|
87
|
-
end
|
88
|
-
|
89
|
-
# @param request [Temporalio::Api::WorkflowService::V1::StartWorkflowExecutionRequest]
|
90
|
-
# @param metadata [Hash<String, String>] Headers used on the RPC call.
|
91
|
-
# Keys here override client-level RPC metadata keys.
|
92
|
-
# @param timeout [Integer] Optional RPC deadline to set for each RPC call.
|
93
|
-
#
|
94
|
-
# @return [Temporalio::Api::WorkflowService::V1::StartWorkflowExecutionResponse]
|
95
|
-
def start_workflow_execution(request, metadata: {}, timeout: nil)
|
96
|
-
encoded = Temporalio::Api::WorkflowService::V1::StartWorkflowExecutionRequest.encode(request)
|
97
|
-
response = core_connection.call(:start_workflow_execution, encoded, metadata, timeout)
|
98
|
-
|
99
|
-
Temporalio::Api::WorkflowService::V1::StartWorkflowExecutionResponse.decode(response)
|
100
|
-
end
|
101
|
-
|
102
|
-
# @param request [Temporalio::Api::WorkflowService::V1::GetWorkflowExecutionHistoryRequest]
|
103
|
-
# @param metadata [Hash<String, String>] Headers used on the RPC call.
|
104
|
-
# Keys here override client-level RPC metadata keys.
|
105
|
-
# @param timeout [Integer] Optional RPC deadline to set for each RPC call.
|
106
|
-
#
|
107
|
-
# @return [Temporalio::Api::WorkflowService::V1::GetWorkflowExecutionHistoryResponse]
|
108
|
-
def get_workflow_execution_history(request, metadata: {}, timeout: nil)
|
109
|
-
encoded = Temporalio::Api::WorkflowService::V1::GetWorkflowExecutionHistoryRequest.encode(request)
|
110
|
-
response = core_connection.call(:get_workflow_execution_history, encoded, metadata, timeout)
|
111
|
-
|
112
|
-
Temporalio::Api::WorkflowService::V1::GetWorkflowExecutionHistoryResponse.decode(response)
|
113
|
-
end
|
114
|
-
|
115
|
-
# @param request [Temporalio::Api::WorkflowService::V1::GetWorkflowExecutionHistoryReverseRequest]
|
116
|
-
# @param metadata [Hash<String, String>] Headers used on the RPC call.
|
117
|
-
# Keys here override client-level RPC metadata keys.
|
118
|
-
# @param timeout [Integer] Optional RPC deadline to set for each RPC call.
|
119
|
-
#
|
120
|
-
# @return [Temporalio::Api::WorkflowService::V1::GetWorkflowExecutionHistoryReverseResponse]
|
121
|
-
def get_workflow_execution_history_reverse(request, metadata: {}, timeout: nil)
|
122
|
-
encoded = Temporalio::Api::WorkflowService::V1::GetWorkflowExecutionHistoryReverseRequest.encode(request)
|
123
|
-
response = core_connection.call(:get_workflow_execution_history_reverse, encoded, metadata, timeout)
|
124
|
-
|
125
|
-
Temporalio::Api::WorkflowService::V1::GetWorkflowExecutionHistoryReverseResponse.decode(response)
|
126
|
-
end
|
127
|
-
|
128
|
-
# @param request [Temporalio::Api::WorkflowService::V1::PollWorkflowTaskQueueRequest]
|
129
|
-
# @param metadata [Hash<String, String>] Headers used on the RPC call.
|
130
|
-
# Keys here override client-level RPC metadata keys.
|
131
|
-
# @param timeout [Integer] Optional RPC deadline to set for each RPC call.
|
132
|
-
#
|
133
|
-
# @return [Temporalio::Api::WorkflowService::V1::PollWorkflowTaskQueueResponse]
|
134
|
-
def poll_workflow_task_queue(request, metadata: {}, timeout: nil)
|
135
|
-
encoded = Temporalio::Api::WorkflowService::V1::PollWorkflowTaskQueueRequest.encode(request)
|
136
|
-
response = core_connection.call(:poll_workflow_task_queue, encoded, metadata, timeout)
|
137
|
-
|
138
|
-
Temporalio::Api::WorkflowService::V1::PollWorkflowTaskQueueResponse.decode(response)
|
139
|
-
end
|
140
|
-
|
141
|
-
# @param request [Temporalio::Api::WorkflowService::V1::RespondWorkflowTaskCompletedRequest]
|
142
|
-
# @param metadata [Hash<String, String>] Headers used on the RPC call.
|
143
|
-
# Keys here override client-level RPC metadata keys.
|
144
|
-
# @param timeout [Integer] Optional RPC deadline to set for each RPC call.
|
145
|
-
#
|
146
|
-
# @return [Temporalio::Api::WorkflowService::V1::RespondWorkflowTaskCompletedResponse]
|
147
|
-
def respond_workflow_task_completed(request, metadata: {}, timeout: nil)
|
148
|
-
encoded = Temporalio::Api::WorkflowService::V1::RespondWorkflowTaskCompletedRequest.encode(request)
|
149
|
-
response = core_connection.call(:respond_workflow_task_completed, encoded, metadata, timeout)
|
150
|
-
|
151
|
-
Temporalio::Api::WorkflowService::V1::RespondWorkflowTaskCompletedResponse.decode(response)
|
152
|
-
end
|
153
|
-
|
154
|
-
# @param request [Temporalio::Api::WorkflowService::V1::RespondWorkflowTaskFailedRequest]
|
155
|
-
# @param metadata [Hash<String, String>] Headers used on the RPC call.
|
156
|
-
# Keys here override client-level RPC metadata keys.
|
157
|
-
# @param timeout [Integer] Optional RPC deadline to set for each RPC call.
|
158
|
-
#
|
159
|
-
# @return [Temporalio::Api::WorkflowService::V1::RespondWorkflowTaskFailedResponse]
|
160
|
-
def respond_workflow_task_failed(request, metadata: {}, timeout: nil)
|
161
|
-
encoded = Temporalio::Api::WorkflowService::V1::RespondWorkflowTaskFailedRequest.encode(request)
|
162
|
-
response = core_connection.call(:respond_workflow_task_failed, encoded, metadata, timeout)
|
163
|
-
|
164
|
-
Temporalio::Api::WorkflowService::V1::RespondWorkflowTaskFailedResponse.decode(response)
|
165
|
-
end
|
166
|
-
|
167
|
-
# @param request [Temporalio::Api::WorkflowService::V1::PollActivityTaskQueueRequest]
|
168
|
-
# @param metadata [Hash<String, String>] Headers used on the RPC call.
|
169
|
-
# Keys here override client-level RPC metadata keys.
|
170
|
-
# @param timeout [Integer] Optional RPC deadline to set for each RPC call.
|
171
|
-
#
|
172
|
-
# @return [Temporalio::Api::WorkflowService::V1::PollActivityTaskQueueResponse]
|
173
|
-
def poll_activity_task_queue(request, metadata: {}, timeout: nil)
|
174
|
-
encoded = Temporalio::Api::WorkflowService::V1::PollActivityTaskQueueRequest.encode(request)
|
175
|
-
response = core_connection.call(:poll_activity_task_queue, encoded, metadata, timeout)
|
176
|
-
|
177
|
-
Temporalio::Api::WorkflowService::V1::PollActivityTaskQueueResponse.decode(response)
|
178
|
-
end
|
179
|
-
|
180
|
-
# @param request [Temporalio::Api::WorkflowService::V1::RecordActivityTaskHeartbeatRequest]
|
181
|
-
# @param metadata [Hash<String, String>] Headers used on the RPC call.
|
182
|
-
# Keys here override client-level RPC metadata keys.
|
183
|
-
# @param timeout [Integer] Optional RPC deadline to set for each RPC call.
|
184
|
-
#
|
185
|
-
# @return [Temporalio::Api::WorkflowService::V1::RecordActivityTaskHeartbeatResponse]
|
186
|
-
def record_activity_task_heartbeat(request, metadata: {}, timeout: nil)
|
187
|
-
encoded = Temporalio::Api::WorkflowService::V1::RecordActivityTaskHeartbeatRequest.encode(request)
|
188
|
-
response = core_connection.call(:record_activity_task_heartbeat, encoded, metadata, timeout)
|
189
|
-
|
190
|
-
Temporalio::Api::WorkflowService::V1::RecordActivityTaskHeartbeatResponse.decode(response)
|
191
|
-
end
|
192
|
-
|
193
|
-
# @param request [Temporalio::Api::WorkflowService::V1::RecordActivityTaskHeartbeatByIdRequest]
|
194
|
-
# @param metadata [Hash<String, String>] Headers used on the RPC call.
|
195
|
-
# Keys here override client-level RPC metadata keys.
|
196
|
-
# @param timeout [Integer] Optional RPC deadline to set for each RPC call.
|
197
|
-
#
|
198
|
-
# @return [Temporalio::Api::WorkflowService::V1::RecordActivityTaskHeartbeatByIdResponse]
|
199
|
-
def record_activity_task_heartbeat_by_id(request, metadata: {}, timeout: nil)
|
200
|
-
encoded = Temporalio::Api::WorkflowService::V1::RecordActivityTaskHeartbeatByIdRequest.encode(request)
|
201
|
-
response = core_connection.call(:record_activity_task_heartbeat_by_id, encoded, metadata, timeout)
|
202
|
-
|
203
|
-
Temporalio::Api::WorkflowService::V1::RecordActivityTaskHeartbeatByIdResponse.decode(response)
|
204
|
-
end
|
205
|
-
|
206
|
-
# @param request [Temporalio::Api::WorkflowService::V1::RespondActivityTaskCompletedRequest]
|
207
|
-
# @param metadata [Hash<String, String>] Headers used on the RPC call.
|
208
|
-
# Keys here override client-level RPC metadata keys.
|
209
|
-
# @param timeout [Integer] Optional RPC deadline to set for each RPC call.
|
210
|
-
#
|
211
|
-
# @return [Temporalio::Api::WorkflowService::V1::RespondActivityTaskCompletedResponse]
|
212
|
-
def respond_activity_task_completed(request, metadata: {}, timeout: nil)
|
213
|
-
encoded = Temporalio::Api::WorkflowService::V1::RespondActivityTaskCompletedRequest.encode(request)
|
214
|
-
response = core_connection.call(:respond_activity_task_completed, encoded, metadata, timeout)
|
215
|
-
|
216
|
-
Temporalio::Api::WorkflowService::V1::RespondActivityTaskCompletedResponse.decode(response)
|
217
|
-
end
|
218
|
-
|
219
|
-
# @param request [Temporalio::Api::WorkflowService::V1::RespondActivityTaskCompletedByIdRequest]
|
220
|
-
# @param metadata [Hash<String, String>] Headers used on the RPC call.
|
221
|
-
# Keys here override client-level RPC metadata keys.
|
222
|
-
# @param timeout [Integer] Optional RPC deadline to set for each RPC call.
|
223
|
-
#
|
224
|
-
# @return [Temporalio::Api::WorkflowService::V1::RespondActivityTaskCompletedByIdResponse]
|
225
|
-
def respond_activity_task_completed_by_id(request, metadata: {}, timeout: nil)
|
226
|
-
encoded = Temporalio::Api::WorkflowService::V1::RespondActivityTaskCompletedByIdRequest.encode(request)
|
227
|
-
response = core_connection.call(:respond_activity_task_completed_by_id, encoded, metadata, timeout)
|
228
|
-
|
229
|
-
Temporalio::Api::WorkflowService::V1::RespondActivityTaskCompletedByIdResponse.decode(response)
|
230
|
-
end
|
231
|
-
|
232
|
-
# @param request [Temporalio::Api::WorkflowService::V1::RespondActivityTaskFailedRequest]
|
233
|
-
# @param metadata [Hash<String, String>] Headers used on the RPC call.
|
234
|
-
# Keys here override client-level RPC metadata keys.
|
235
|
-
# @param timeout [Integer] Optional RPC deadline to set for each RPC call.
|
236
|
-
#
|
237
|
-
# @return [Temporalio::Api::WorkflowService::V1::RespondActivityTaskFailedResponse]
|
238
|
-
def respond_activity_task_failed(request, metadata: {}, timeout: nil)
|
239
|
-
encoded = Temporalio::Api::WorkflowService::V1::RespondActivityTaskFailedRequest.encode(request)
|
240
|
-
response = core_connection.call(:respond_activity_task_failed, encoded, metadata, timeout)
|
241
|
-
|
242
|
-
Temporalio::Api::WorkflowService::V1::RespondActivityTaskFailedResponse.decode(response)
|
243
|
-
end
|
244
|
-
|
245
|
-
# @param request [Temporalio::Api::WorkflowService::V1::RespondActivityTaskFailedByIdRequest]
|
246
|
-
# @param metadata [Hash<String, String>] Headers used on the RPC call.
|
247
|
-
# Keys here override client-level RPC metadata keys.
|
248
|
-
# @param timeout [Integer] Optional RPC deadline to set for each RPC call.
|
249
|
-
#
|
250
|
-
# @return [Temporalio::Api::WorkflowService::V1::RespondActivityTaskFailedByIdResponse]
|
251
|
-
def respond_activity_task_failed_by_id(request, metadata: {}, timeout: nil)
|
252
|
-
encoded = Temporalio::Api::WorkflowService::V1::RespondActivityTaskFailedByIdRequest.encode(request)
|
253
|
-
response = core_connection.call(:respond_activity_task_failed_by_id, encoded, metadata, timeout)
|
254
|
-
|
255
|
-
Temporalio::Api::WorkflowService::V1::RespondActivityTaskFailedByIdResponse.decode(response)
|
256
|
-
end
|
257
|
-
|
258
|
-
# @param request [Temporalio::Api::WorkflowService::V1::RespondActivityTaskCanceledRequest]
|
259
|
-
# @param metadata [Hash<String, String>] Headers used on the RPC call.
|
260
|
-
# Keys here override client-level RPC metadata keys.
|
261
|
-
# @param timeout [Integer] Optional RPC deadline to set for each RPC call.
|
262
|
-
#
|
263
|
-
# @return [Temporalio::Api::WorkflowService::V1::RespondActivityTaskCanceledResponse]
|
264
|
-
def respond_activity_task_canceled(request, metadata: {}, timeout: nil)
|
265
|
-
encoded = Temporalio::Api::WorkflowService::V1::RespondActivityTaskCanceledRequest.encode(request)
|
266
|
-
response = core_connection.call(:respond_activity_task_canceled, encoded, metadata, timeout)
|
267
|
-
|
268
|
-
Temporalio::Api::WorkflowService::V1::RespondActivityTaskCanceledResponse.decode(response)
|
269
|
-
end
|
270
|
-
|
271
|
-
# @param request [Temporalio::Api::WorkflowService::V1::RespondActivityTaskCanceledByIdRequest]
|
272
|
-
# @param metadata [Hash<String, String>] Headers used on the RPC call.
|
273
|
-
# Keys here override client-level RPC metadata keys.
|
274
|
-
# @param timeout [Integer] Optional RPC deadline to set for each RPC call.
|
275
|
-
#
|
276
|
-
# @return [Temporalio::Api::WorkflowService::V1::RespondActivityTaskCanceledByIdResponse]
|
277
|
-
def respond_activity_task_canceled_by_id(request, metadata: {}, timeout: nil)
|
278
|
-
encoded = Temporalio::Api::WorkflowService::V1::RespondActivityTaskCanceledByIdRequest.encode(request)
|
279
|
-
response = core_connection.call(:respond_activity_task_canceled_by_id, encoded, metadata, timeout)
|
280
|
-
|
281
|
-
Temporalio::Api::WorkflowService::V1::RespondActivityTaskCanceledByIdResponse.decode(response)
|
282
|
-
end
|
283
|
-
|
284
|
-
# @param request [Temporalio::Api::WorkflowService::V1::RequestCancelWorkflowExecutionRequest]
|
285
|
-
# @param metadata [Hash<String, String>] Headers used on the RPC call.
|
286
|
-
# Keys here override client-level RPC metadata keys.
|
287
|
-
# @param timeout [Integer] Optional RPC deadline to set for each RPC call.
|
288
|
-
#
|
289
|
-
# @return [Temporalio::Api::WorkflowService::V1::RequestCancelWorkflowExecutionResponse]
|
290
|
-
def request_cancel_workflow_execution(request, metadata: {}, timeout: nil)
|
291
|
-
encoded = Temporalio::Api::WorkflowService::V1::RequestCancelWorkflowExecutionRequest.encode(request)
|
292
|
-
response = core_connection.call(:request_cancel_workflow_execution, encoded, metadata, timeout)
|
293
|
-
|
294
|
-
Temporalio::Api::WorkflowService::V1::RequestCancelWorkflowExecutionResponse.decode(response)
|
295
|
-
end
|
296
|
-
|
297
|
-
# @param request [Temporalio::Api::WorkflowService::V1::SignalWorkflowExecutionRequest]
|
298
|
-
# @param metadata [Hash<String, String>] Headers used on the RPC call.
|
299
|
-
# Keys here override client-level RPC metadata keys.
|
300
|
-
# @param timeout [Integer] Optional RPC deadline to set for each RPC call.
|
301
|
-
#
|
302
|
-
# @return [Temporalio::Api::WorkflowService::V1::SignalWorkflowExecutionResponse]
|
303
|
-
def signal_workflow_execution(request, metadata: {}, timeout: nil)
|
304
|
-
encoded = Temporalio::Api::WorkflowService::V1::SignalWorkflowExecutionRequest.encode(request)
|
305
|
-
response = core_connection.call(:signal_workflow_execution, encoded, metadata, timeout)
|
306
|
-
|
307
|
-
Temporalio::Api::WorkflowService::V1::SignalWorkflowExecutionResponse.decode(response)
|
308
|
-
end
|
309
|
-
|
310
|
-
# @param request [Temporalio::Api::WorkflowService::V1::SignalWithStartWorkflowExecutionRequest]
|
311
|
-
# @param metadata [Hash<String, String>] Headers used on the RPC call.
|
312
|
-
# Keys here override client-level RPC metadata keys.
|
313
|
-
# @param timeout [Integer] Optional RPC deadline to set for each RPC call.
|
314
|
-
#
|
315
|
-
# @return [Temporalio::Api::WorkflowService::V1::SignalWithStartWorkflowExecutionResponse]
|
316
|
-
def signal_with_start_workflow_execution(request, metadata: {}, timeout: nil)
|
317
|
-
encoded = Temporalio::Api::WorkflowService::V1::SignalWithStartWorkflowExecutionRequest.encode(request)
|
318
|
-
response = core_connection.call(:signal_with_start_workflow_execution, encoded, metadata, timeout)
|
319
|
-
|
320
|
-
Temporalio::Api::WorkflowService::V1::SignalWithStartWorkflowExecutionResponse.decode(response)
|
321
|
-
end
|
322
|
-
|
323
|
-
# @param request [Temporalio::Api::WorkflowService::V1::ResetWorkflowExecutionRequest]
|
324
|
-
# @param metadata [Hash<String, String>] Headers used on the RPC call.
|
325
|
-
# Keys here override client-level RPC metadata keys.
|
326
|
-
# @param timeout [Integer] Optional RPC deadline to set for each RPC call.
|
327
|
-
#
|
328
|
-
# @return [Temporalio::Api::WorkflowService::V1::ResetWorkflowExecutionResponse]
|
329
|
-
def reset_workflow_execution(request, metadata: {}, timeout: nil)
|
330
|
-
encoded = Temporalio::Api::WorkflowService::V1::ResetWorkflowExecutionRequest.encode(request)
|
331
|
-
response = core_connection.call(:reset_workflow_execution, encoded, metadata, timeout)
|
332
|
-
|
333
|
-
Temporalio::Api::WorkflowService::V1::ResetWorkflowExecutionResponse.decode(response)
|
334
|
-
end
|
335
|
-
|
336
|
-
# @param request [Temporalio::Api::WorkflowService::V1::TerminateWorkflowExecutionRequest]
|
337
|
-
# @param metadata [Hash<String, String>] Headers used on the RPC call.
|
338
|
-
# Keys here override client-level RPC metadata keys.
|
339
|
-
# @param timeout [Integer] Optional RPC deadline to set for each RPC call.
|
340
|
-
#
|
341
|
-
# @return [Temporalio::Api::WorkflowService::V1::TerminateWorkflowExecutionResponse]
|
342
|
-
def terminate_workflow_execution(request, metadata: {}, timeout: nil)
|
343
|
-
encoded = Temporalio::Api::WorkflowService::V1::TerminateWorkflowExecutionRequest.encode(request)
|
344
|
-
response = core_connection.call(:terminate_workflow_execution, encoded, metadata, timeout)
|
345
|
-
|
346
|
-
Temporalio::Api::WorkflowService::V1::TerminateWorkflowExecutionResponse.decode(response)
|
347
|
-
end
|
348
|
-
|
349
|
-
# @param request [Temporalio::Api::WorkflowService::V1::DeleteWorkflowExecutionRequest]
|
350
|
-
# @param metadata [Hash<String, String>] Headers used on the RPC call.
|
351
|
-
# Keys here override client-level RPC metadata keys.
|
352
|
-
# @param timeout [Integer] Optional RPC deadline to set for each RPC call.
|
353
|
-
#
|
354
|
-
# @return [Temporalio::Api::WorkflowService::V1::DeleteWorkflowExecutionResponse]
|
355
|
-
def delete_workflow_execution(request, metadata: {}, timeout: nil)
|
356
|
-
encoded = Temporalio::Api::WorkflowService::V1::DeleteWorkflowExecutionRequest.encode(request)
|
357
|
-
response = core_connection.call(:delete_workflow_execution, encoded, metadata, timeout)
|
358
|
-
|
359
|
-
Temporalio::Api::WorkflowService::V1::DeleteWorkflowExecutionResponse.decode(response)
|
360
|
-
end
|
361
|
-
|
362
|
-
# @param request [Temporalio::Api::WorkflowService::V1::ListOpenWorkflowExecutionsRequest]
|
363
|
-
# @param metadata [Hash<String, String>] Headers used on the RPC call.
|
364
|
-
# Keys here override client-level RPC metadata keys.
|
365
|
-
# @param timeout [Integer] Optional RPC deadline to set for each RPC call.
|
366
|
-
#
|
367
|
-
# @return [Temporalio::Api::WorkflowService::V1::ListOpenWorkflowExecutionsResponse]
|
368
|
-
def list_open_workflow_executions(request, metadata: {}, timeout: nil)
|
369
|
-
encoded = Temporalio::Api::WorkflowService::V1::ListOpenWorkflowExecutionsRequest.encode(request)
|
370
|
-
response = core_connection.call(:list_open_workflow_executions, encoded, metadata, timeout)
|
20
|
+
# @param address [String | nil] `host[:port]` for the Temporal server. Defaults to `localhost:7233`.
|
21
|
+
# @param tls [Temporalio::Connection::TlsOptions | nil] TLS/mTLS options for the connection.
|
22
|
+
# By default, TLS is disabled.
|
23
|
+
# @param metadata [Hash | nil] gRPC metadata (ie. HTTP headers) to send with each request to the server. Optional.
|
24
|
+
# @param retry_config [Temporalio::Connection::RetryConfig | nil] gRPC retry configuration to use by default on this
|
25
|
+
# connection.
|
26
|
+
def initialize(
|
27
|
+
address = nil,
|
28
|
+
tls: nil,
|
29
|
+
metadata: nil,
|
30
|
+
retry_config: nil
|
31
|
+
)
|
32
|
+
host, port = parse_url(address)
|
371
33
|
|
372
|
-
Temporalio::
|
373
|
-
end
|
374
|
-
|
375
|
-
# @param request [Temporalio::Api::WorkflowService::V1::ListClosedWorkflowExecutionsRequest]
|
376
|
-
# @param metadata [Hash<String, String>] Headers used on the RPC call.
|
377
|
-
# Keys here override client-level RPC metadata keys.
|
378
|
-
# @param timeout [Integer] Optional RPC deadline to set for each RPC call.
|
379
|
-
#
|
380
|
-
# @return [Temporalio::Api::WorkflowService::V1::ListClosedWorkflowExecutionsResponse]
|
381
|
-
def list_closed_workflow_executions(request, metadata: {}, timeout: nil)
|
382
|
-
encoded = Temporalio::Api::WorkflowService::V1::ListClosedWorkflowExecutionsRequest.encode(request)
|
383
|
-
response = core_connection.call(:list_closed_workflow_executions, encoded, metadata, timeout)
|
384
|
-
|
385
|
-
Temporalio::Api::WorkflowService::V1::ListClosedWorkflowExecutionsResponse.decode(response)
|
386
|
-
end
|
387
|
-
|
388
|
-
# @param request [Temporalio::Api::WorkflowService::V1::ListWorkflowExecutionsRequest]
|
389
|
-
# @param metadata [Hash<String, String>] Headers used on the RPC call.
|
390
|
-
# Keys here override client-level RPC metadata keys.
|
391
|
-
# @param timeout [Integer] Optional RPC deadline to set for each RPC call.
|
392
|
-
#
|
393
|
-
# @return [Temporalio::Api::WorkflowService::V1::ListWorkflowExecutionsResponse]
|
394
|
-
def list_workflow_executions(request, metadata: {}, timeout: nil)
|
395
|
-
encoded = Temporalio::Api::WorkflowService::V1::ListWorkflowExecutionsRequest.encode(request)
|
396
|
-
response = core_connection.call(:list_workflow_executions, encoded, metadata, timeout)
|
397
|
-
|
398
|
-
Temporalio::Api::WorkflowService::V1::ListWorkflowExecutionsResponse.decode(response)
|
399
|
-
end
|
400
|
-
|
401
|
-
# @param request [Temporalio::Api::WorkflowService::V1::ListArchivedWorkflowExecutionsRequest]
|
402
|
-
# @param metadata [Hash<String, String>] Headers used on the RPC call.
|
403
|
-
# Keys here override client-level RPC metadata keys.
|
404
|
-
# @param timeout [Integer] Optional RPC deadline to set for each RPC call.
|
405
|
-
#
|
406
|
-
# @return [Temporalio::Api::WorkflowService::V1::ListArchivedWorkflowExecutionsResponse]
|
407
|
-
def list_archived_workflow_executions(request, metadata: {}, timeout: nil)
|
408
|
-
encoded = Temporalio::Api::WorkflowService::V1::ListArchivedWorkflowExecutionsRequest.encode(request)
|
409
|
-
response = core_connection.call(:list_archived_workflow_executions, encoded, metadata, timeout)
|
410
|
-
|
411
|
-
Temporalio::Api::WorkflowService::V1::ListArchivedWorkflowExecutionsResponse.decode(response)
|
412
|
-
end
|
413
|
-
|
414
|
-
# @param request [Temporalio::Api::WorkflowService::V1::ScanWorkflowExecutionsRequest]
|
415
|
-
# @param metadata [Hash<String, String>] Headers used on the RPC call.
|
416
|
-
# Keys here override client-level RPC metadata keys.
|
417
|
-
# @param timeout [Integer] Optional RPC deadline to set for each RPC call.
|
418
|
-
#
|
419
|
-
# @return [Temporalio::Api::WorkflowService::V1::ScanWorkflowExecutionsResponse]
|
420
|
-
def scan_workflow_executions(request, metadata: {}, timeout: nil)
|
421
|
-
encoded = Temporalio::Api::WorkflowService::V1::ScanWorkflowExecutionsRequest.encode(request)
|
422
|
-
response = core_connection.call(:scan_workflow_executions, encoded, metadata, timeout)
|
423
|
-
|
424
|
-
Temporalio::Api::WorkflowService::V1::ScanWorkflowExecutionsResponse.decode(response)
|
425
|
-
end
|
426
|
-
|
427
|
-
# @param request [Temporalio::Api::WorkflowService::V1::CountWorkflowExecutionsRequest]
|
428
|
-
# @param metadata [Hash<String, String>] Headers used on the RPC call.
|
429
|
-
# Keys here override client-level RPC metadata keys.
|
430
|
-
# @param timeout [Integer] Optional RPC deadline to set for each RPC call.
|
431
|
-
#
|
432
|
-
# @return [Temporalio::Api::WorkflowService::V1::CountWorkflowExecutionsResponse]
|
433
|
-
def count_workflow_executions(request, metadata: {}, timeout: nil)
|
434
|
-
encoded = Temporalio::Api::WorkflowService::V1::CountWorkflowExecutionsRequest.encode(request)
|
435
|
-
response = core_connection.call(:count_workflow_executions, encoded, metadata, timeout)
|
436
|
-
|
437
|
-
Temporalio::Api::WorkflowService::V1::CountWorkflowExecutionsResponse.decode(response)
|
438
|
-
end
|
439
|
-
|
440
|
-
# @param request [Temporalio::Api::WorkflowService::V1::GetSearchAttributesRequest]
|
441
|
-
# @param metadata [Hash<String, String>] Headers used on the RPC call.
|
442
|
-
# Keys here override client-level RPC metadata keys.
|
443
|
-
# @param timeout [Integer] Optional RPC deadline to set for each RPC call.
|
444
|
-
#
|
445
|
-
# @return [Temporalio::Api::WorkflowService::V1::GetSearchAttributesResponse]
|
446
|
-
def get_search_attributes(request, metadata: {}, timeout: nil)
|
447
|
-
encoded = Temporalio::Api::WorkflowService::V1::GetSearchAttributesRequest.encode(request)
|
448
|
-
response = core_connection.call(:get_search_attributes, encoded, metadata, timeout)
|
449
|
-
|
450
|
-
Temporalio::Api::WorkflowService::V1::GetSearchAttributesResponse.decode(response)
|
451
|
-
end
|
452
|
-
|
453
|
-
# @param request [Temporalio::Api::WorkflowService::V1::RespondQueryTaskCompletedRequest]
|
454
|
-
# @param metadata [Hash<String, String>] Headers used on the RPC call.
|
455
|
-
# Keys here override client-level RPC metadata keys.
|
456
|
-
# @param timeout [Integer] Optional RPC deadline to set for each RPC call.
|
457
|
-
#
|
458
|
-
# @return [Temporalio::Api::WorkflowService::V1::RespondQueryTaskCompletedResponse]
|
459
|
-
def respond_query_task_completed(request, metadata: {}, timeout: nil)
|
460
|
-
encoded = Temporalio::Api::WorkflowService::V1::RespondQueryTaskCompletedRequest.encode(request)
|
461
|
-
response = core_connection.call(:respond_query_task_completed, encoded, metadata, timeout)
|
462
|
-
|
463
|
-
Temporalio::Api::WorkflowService::V1::RespondQueryTaskCompletedResponse.decode(response)
|
464
|
-
end
|
465
|
-
|
466
|
-
# @param request [Temporalio::Api::WorkflowService::V1::ResetStickyTaskQueueRequest]
|
467
|
-
# @param metadata [Hash<String, String>] Headers used on the RPC call.
|
468
|
-
# Keys here override client-level RPC metadata keys.
|
469
|
-
# @param timeout [Integer] Optional RPC deadline to set for each RPC call.
|
470
|
-
#
|
471
|
-
# @return [Temporalio::Api::WorkflowService::V1::ResetStickyTaskQueueResponse]
|
472
|
-
def reset_sticky_task_queue(request, metadata: {}, timeout: nil)
|
473
|
-
encoded = Temporalio::Api::WorkflowService::V1::ResetStickyTaskQueueRequest.encode(request)
|
474
|
-
response = core_connection.call(:reset_sticky_task_queue, encoded, metadata, timeout)
|
475
|
-
|
476
|
-
Temporalio::Api::WorkflowService::V1::ResetStickyTaskQueueResponse.decode(response)
|
477
|
-
end
|
478
|
-
|
479
|
-
# @param request [Temporalio::Api::WorkflowService::V1::QueryWorkflowRequest]
|
480
|
-
# @param metadata [Hash<String, String>] Headers used on the RPC call.
|
481
|
-
# Keys here override client-level RPC metadata keys.
|
482
|
-
# @param timeout [Integer] Optional RPC deadline to set for each RPC call.
|
483
|
-
#
|
484
|
-
# @return [Temporalio::Api::WorkflowService::V1::QueryWorkflowResponse]
|
485
|
-
def query_workflow(request, metadata: {}, timeout: nil)
|
486
|
-
encoded = Temporalio::Api::WorkflowService::V1::QueryWorkflowRequest.encode(request)
|
487
|
-
response = core_connection.call(:query_workflow, encoded, metadata, timeout)
|
488
|
-
|
489
|
-
Temporalio::Api::WorkflowService::V1::QueryWorkflowResponse.decode(response)
|
490
|
-
end
|
491
|
-
|
492
|
-
# @param request [Temporalio::Api::WorkflowService::V1::DescribeWorkflowExecutionRequest]
|
493
|
-
# @param metadata [Hash<String, String>] Headers used on the RPC call.
|
494
|
-
# Keys here override client-level RPC metadata keys.
|
495
|
-
# @param timeout [Integer] Optional RPC deadline to set for each RPC call.
|
496
|
-
#
|
497
|
-
# @return [Temporalio::Api::WorkflowService::V1::DescribeWorkflowExecutionResponse]
|
498
|
-
def describe_workflow_execution(request, metadata: {}, timeout: nil)
|
499
|
-
encoded = Temporalio::Api::WorkflowService::V1::DescribeWorkflowExecutionRequest.encode(request)
|
500
|
-
response = core_connection.call(:describe_workflow_execution, encoded, metadata, timeout)
|
501
|
-
|
502
|
-
Temporalio::Api::WorkflowService::V1::DescribeWorkflowExecutionResponse.decode(response)
|
503
|
-
end
|
504
|
-
|
505
|
-
# @param request [Temporalio::Api::WorkflowService::V1::DescribeTaskQueueRequest]
|
506
|
-
# @param metadata [Hash<String, String>] Headers used on the RPC call.
|
507
|
-
# Keys here override client-level RPC metadata keys.
|
508
|
-
# @param timeout [Integer] Optional RPC deadline to set for each RPC call.
|
509
|
-
#
|
510
|
-
# @return [Temporalio::Api::WorkflowService::V1::DescribeTaskQueueResponse]
|
511
|
-
def describe_task_queue(request, metadata: {}, timeout: nil)
|
512
|
-
encoded = Temporalio::Api::WorkflowService::V1::DescribeTaskQueueRequest.encode(request)
|
513
|
-
response = core_connection.call(:describe_task_queue, encoded, metadata, timeout)
|
514
|
-
|
515
|
-
Temporalio::Api::WorkflowService::V1::DescribeTaskQueueResponse.decode(response)
|
516
|
-
end
|
517
|
-
|
518
|
-
# @param request [Temporalio::Api::WorkflowService::V1::GetClusterInfoRequest]
|
519
|
-
# @param metadata [Hash<String, String>] Headers used on the RPC call.
|
520
|
-
# Keys here override client-level RPC metadata keys.
|
521
|
-
# @param timeout [Integer] Optional RPC deadline to set for each RPC call.
|
522
|
-
#
|
523
|
-
# @return [Temporalio::Api::WorkflowService::V1::GetClusterInfoResponse]
|
524
|
-
def get_cluster_info(request, metadata: {}, timeout: nil)
|
525
|
-
encoded = Temporalio::Api::WorkflowService::V1::GetClusterInfoRequest.encode(request)
|
526
|
-
response = core_connection.call(:get_cluster_info, encoded, metadata, timeout)
|
527
|
-
|
528
|
-
Temporalio::Api::WorkflowService::V1::GetClusterInfoResponse.decode(response)
|
529
|
-
end
|
530
|
-
|
531
|
-
# @param request [Temporalio::Api::WorkflowService::V1::GetSystemInfoRequest]
|
532
|
-
# @param metadata [Hash<String, String>] Headers used on the RPC call.
|
533
|
-
# Keys here override client-level RPC metadata keys.
|
534
|
-
# @param timeout [Integer] Optional RPC deadline to set for each RPC call.
|
535
|
-
#
|
536
|
-
# @return [Temporalio::Api::WorkflowService::V1::GetSystemInfoResponse]
|
537
|
-
def get_system_info(request, metadata: {}, timeout: nil)
|
538
|
-
encoded = Temporalio::Api::WorkflowService::V1::GetSystemInfoRequest.encode(request)
|
539
|
-
response = core_connection.call(:get_system_info, encoded, metadata, timeout)
|
540
|
-
|
541
|
-
Temporalio::Api::WorkflowService::V1::GetSystemInfoResponse.decode(response)
|
542
|
-
end
|
543
|
-
|
544
|
-
# @param request [Temporalio::Api::WorkflowService::V1::ListTaskQueuePartitionsRequest]
|
545
|
-
# @param metadata [Hash<String, String>] Headers used on the RPC call.
|
546
|
-
# Keys here override client-level RPC metadata keys.
|
547
|
-
# @param timeout [Integer] Optional RPC deadline to set for each RPC call.
|
548
|
-
#
|
549
|
-
# @return [Temporalio::Api::WorkflowService::V1::ListTaskQueuePartitionsResponse]
|
550
|
-
def list_task_queue_partitions(request, metadata: {}, timeout: nil)
|
551
|
-
encoded = Temporalio::Api::WorkflowService::V1::ListTaskQueuePartitionsRequest.encode(request)
|
552
|
-
response = core_connection.call(:list_task_queue_partitions, encoded, metadata, timeout)
|
553
|
-
|
554
|
-
Temporalio::Api::WorkflowService::V1::ListTaskQueuePartitionsResponse.decode(response)
|
555
|
-
end
|
556
|
-
|
557
|
-
# @param request [Temporalio::Api::WorkflowService::V1::CreateScheduleRequest]
|
558
|
-
# @param metadata [Hash<String, String>] Headers used on the RPC call.
|
559
|
-
# Keys here override client-level RPC metadata keys.
|
560
|
-
# @param timeout [Integer] Optional RPC deadline to set for each RPC call.
|
561
|
-
#
|
562
|
-
# @return [Temporalio::Api::WorkflowService::V1::CreateScheduleResponse]
|
563
|
-
def create_schedule(request, metadata: {}, timeout: nil)
|
564
|
-
encoded = Temporalio::Api::WorkflowService::V1::CreateScheduleRequest.encode(request)
|
565
|
-
response = core_connection.call(:create_schedule, encoded, metadata, timeout)
|
566
|
-
|
567
|
-
Temporalio::Api::WorkflowService::V1::CreateScheduleResponse.decode(response)
|
568
|
-
end
|
569
|
-
|
570
|
-
# @param request [Temporalio::Api::WorkflowService::V1::DescribeScheduleRequest]
|
571
|
-
# @param metadata [Hash<String, String>] Headers used on the RPC call.
|
572
|
-
# Keys here override client-level RPC metadata keys.
|
573
|
-
# @param timeout [Integer] Optional RPC deadline to set for each RPC call.
|
574
|
-
#
|
575
|
-
# @return [Temporalio::Api::WorkflowService::V1::DescribeScheduleResponse]
|
576
|
-
def describe_schedule(request, metadata: {}, timeout: nil)
|
577
|
-
encoded = Temporalio::Api::WorkflowService::V1::DescribeScheduleRequest.encode(request)
|
578
|
-
response = core_connection.call(:describe_schedule, encoded, metadata, timeout)
|
579
|
-
|
580
|
-
Temporalio::Api::WorkflowService::V1::DescribeScheduleResponse.decode(response)
|
581
|
-
end
|
582
|
-
|
583
|
-
# @param request [Temporalio::Api::WorkflowService::V1::UpdateScheduleRequest]
|
584
|
-
# @param metadata [Hash<String, String>] Headers used on the RPC call.
|
585
|
-
# Keys here override client-level RPC metadata keys.
|
586
|
-
# @param timeout [Integer] Optional RPC deadline to set for each RPC call.
|
587
|
-
#
|
588
|
-
# @return [Temporalio::Api::WorkflowService::V1::UpdateScheduleResponse]
|
589
|
-
def update_schedule(request, metadata: {}, timeout: nil)
|
590
|
-
encoded = Temporalio::Api::WorkflowService::V1::UpdateScheduleRequest.encode(request)
|
591
|
-
response = core_connection.call(:update_schedule, encoded, metadata, timeout)
|
592
|
-
|
593
|
-
Temporalio::Api::WorkflowService::V1::UpdateScheduleResponse.decode(response)
|
594
|
-
end
|
595
|
-
|
596
|
-
# @param request [Temporalio::Api::WorkflowService::V1::PatchScheduleRequest]
|
597
|
-
# @param metadata [Hash<String, String>] Headers used on the RPC call.
|
598
|
-
# Keys here override client-level RPC metadata keys.
|
599
|
-
# @param timeout [Integer] Optional RPC deadline to set for each RPC call.
|
600
|
-
#
|
601
|
-
# @return [Temporalio::Api::WorkflowService::V1::PatchScheduleResponse]
|
602
|
-
def patch_schedule(request, metadata: {}, timeout: nil)
|
603
|
-
encoded = Temporalio::Api::WorkflowService::V1::PatchScheduleRequest.encode(request)
|
604
|
-
response = core_connection.call(:patch_schedule, encoded, metadata, timeout)
|
605
|
-
|
606
|
-
Temporalio::Api::WorkflowService::V1::PatchScheduleResponse.decode(response)
|
607
|
-
end
|
608
|
-
|
609
|
-
# @param request [Temporalio::Api::WorkflowService::V1::ListScheduleMatchingTimesRequest]
|
610
|
-
# @param metadata [Hash<String, String>] Headers used on the RPC call.
|
611
|
-
# Keys here override client-level RPC metadata keys.
|
612
|
-
# @param timeout [Integer] Optional RPC deadline to set for each RPC call.
|
613
|
-
#
|
614
|
-
# @return [Temporalio::Api::WorkflowService::V1::ListScheduleMatchingTimesResponse]
|
615
|
-
def list_schedule_matching_times(request, metadata: {}, timeout: nil)
|
616
|
-
encoded = Temporalio::Api::WorkflowService::V1::ListScheduleMatchingTimesRequest.encode(request)
|
617
|
-
response = core_connection.call(:list_schedule_matching_times, encoded, metadata, timeout)
|
618
|
-
|
619
|
-
Temporalio::Api::WorkflowService::V1::ListScheduleMatchingTimesResponse.decode(response)
|
620
|
-
end
|
621
|
-
|
622
|
-
# @param request [Temporalio::Api::WorkflowService::V1::DeleteScheduleRequest]
|
623
|
-
# @param metadata [Hash<String, String>] Headers used on the RPC call.
|
624
|
-
# Keys here override client-level RPC metadata keys.
|
625
|
-
# @param timeout [Integer] Optional RPC deadline to set for each RPC call.
|
626
|
-
#
|
627
|
-
# @return [Temporalio::Api::WorkflowService::V1::DeleteScheduleResponse]
|
628
|
-
def delete_schedule(request, metadata: {}, timeout: nil)
|
629
|
-
encoded = Temporalio::Api::WorkflowService::V1::DeleteScheduleRequest.encode(request)
|
630
|
-
response = core_connection.call(:delete_schedule, encoded, metadata, timeout)
|
631
|
-
|
632
|
-
Temporalio::Api::WorkflowService::V1::DeleteScheduleResponse.decode(response)
|
633
|
-
end
|
634
|
-
|
635
|
-
# @param request [Temporalio::Api::WorkflowService::V1::ListSchedulesRequest]
|
636
|
-
# @param metadata [Hash<String, String>] Headers used on the RPC call.
|
637
|
-
# Keys here override client-level RPC metadata keys.
|
638
|
-
# @param timeout [Integer] Optional RPC deadline to set for each RPC call.
|
639
|
-
#
|
640
|
-
# @return [Temporalio::Api::WorkflowService::V1::ListSchedulesResponse]
|
641
|
-
def list_schedules(request, metadata: {}, timeout: nil)
|
642
|
-
encoded = Temporalio::Api::WorkflowService::V1::ListSchedulesRequest.encode(request)
|
643
|
-
response = core_connection.call(:list_schedules, encoded, metadata, timeout)
|
644
|
-
|
645
|
-
Temporalio::Api::WorkflowService::V1::ListSchedulesResponse.decode(response)
|
646
|
-
end
|
647
|
-
|
648
|
-
# @param request [Temporalio::Api::WorkflowService::V1::UpdateWorkerBuildIdOrderingRequest]
|
649
|
-
# @param metadata [Hash<String, String>] Headers used on the RPC call.
|
650
|
-
# Keys here override client-level RPC metadata keys.
|
651
|
-
# @param timeout [Integer] Optional RPC deadline to set for each RPC call.
|
652
|
-
#
|
653
|
-
# @return [Temporalio::Api::WorkflowService::V1::UpdateWorkerBuildIdOrderingResponse]
|
654
|
-
def update_worker_build_id_ordering(request, metadata: {}, timeout: nil)
|
655
|
-
encoded = Temporalio::Api::WorkflowService::V1::UpdateWorkerBuildIdOrderingRequest.encode(request)
|
656
|
-
response = core_connection.call(:update_worker_build_id_ordering, encoded, metadata, timeout)
|
657
|
-
|
658
|
-
Temporalio::Api::WorkflowService::V1::UpdateWorkerBuildIdOrderingResponse.decode(response)
|
659
|
-
end
|
660
|
-
|
661
|
-
# @param request [Temporalio::Api::WorkflowService::V1::GetWorkerBuildIdOrderingRequest]
|
662
|
-
# @param metadata [Hash<String, String>] Headers used on the RPC call.
|
663
|
-
# Keys here override client-level RPC metadata keys.
|
664
|
-
# @param timeout [Integer] Optional RPC deadline to set for each RPC call.
|
665
|
-
#
|
666
|
-
# @return [Temporalio::Api::WorkflowService::V1::GetWorkerBuildIdOrderingResponse]
|
667
|
-
def get_worker_build_id_ordering(request, metadata: {}, timeout: nil)
|
668
|
-
encoded = Temporalio::Api::WorkflowService::V1::GetWorkerBuildIdOrderingRequest.encode(request)
|
669
|
-
response = core_connection.call(:get_worker_build_id_ordering, encoded, metadata, timeout)
|
670
|
-
|
671
|
-
Temporalio::Api::WorkflowService::V1::GetWorkerBuildIdOrderingResponse.decode(response)
|
672
|
-
end
|
673
|
-
|
674
|
-
# @param request [Temporalio::Api::WorkflowService::V1::UpdateWorkflowRequest]
|
675
|
-
# @param metadata [Hash<String, String>] Headers used on the RPC call.
|
676
|
-
# Keys here override client-level RPC metadata keys.
|
677
|
-
# @param timeout [Integer] Optional RPC deadline to set for each RPC call.
|
678
|
-
#
|
679
|
-
# @return [Temporalio::Api::WorkflowService::V1::UpdateWorkflowResponse]
|
680
|
-
def update_workflow(request, metadata: {}, timeout: nil)
|
681
|
-
encoded = Temporalio::Api::WorkflowService::V1::UpdateWorkflowRequest.encode(request)
|
682
|
-
response = core_connection.call(:update_workflow, encoded, metadata, timeout)
|
683
|
-
|
684
|
-
Temporalio::Api::WorkflowService::V1::UpdateWorkflowResponse.decode(response)
|
685
|
-
end
|
686
|
-
|
687
|
-
# @param request [Temporalio::Api::WorkflowService::V1::StartBatchOperationRequest]
|
688
|
-
# @param metadata [Hash<String, String>] Headers used on the RPC call.
|
689
|
-
# Keys here override client-level RPC metadata keys.
|
690
|
-
# @param timeout [Integer] Optional RPC deadline to set for each RPC call.
|
691
|
-
#
|
692
|
-
# @return [Temporalio::Api::WorkflowService::V1::StartBatchOperationResponse]
|
693
|
-
def start_batch_operation(request, metadata: {}, timeout: nil)
|
694
|
-
encoded = Temporalio::Api::WorkflowService::V1::StartBatchOperationRequest.encode(request)
|
695
|
-
response = core_connection.call(:start_batch_operation, encoded, metadata, timeout)
|
696
|
-
|
697
|
-
Temporalio::Api::WorkflowService::V1::StartBatchOperationResponse.decode(response)
|
698
|
-
end
|
699
|
-
|
700
|
-
# @param request [Temporalio::Api::WorkflowService::V1::StopBatchOperationRequest]
|
701
|
-
# @param metadata [Hash<String, String>] Headers used on the RPC call.
|
702
|
-
# Keys here override client-level RPC metadata keys.
|
703
|
-
# @param timeout [Integer] Optional RPC deadline to set for each RPC call.
|
704
|
-
#
|
705
|
-
# @return [Temporalio::Api::WorkflowService::V1::StopBatchOperationResponse]
|
706
|
-
def stop_batch_operation(request, metadata: {}, timeout: nil)
|
707
|
-
encoded = Temporalio::Api::WorkflowService::V1::StopBatchOperationRequest.encode(request)
|
708
|
-
response = core_connection.call(:stop_batch_operation, encoded, metadata, timeout)
|
34
|
+
runtime = Temporalio::Runtime.instance
|
709
35
|
|
710
|
-
Temporalio::
|
36
|
+
@core_connection = Temporalio::Bridge::Connection.connect(
|
37
|
+
runtime.core_runtime,
|
38
|
+
Temporalio::Bridge::ConnectOptions.new(
|
39
|
+
url: tls ? "https://#{host}:#{port}" : "http://#{host}:#{port}",
|
40
|
+
tls: tls && Temporalio::Bridge::TlsOptions.new(
|
41
|
+
server_root_ca_cert: tls.server_root_ca_cert,
|
42
|
+
client_cert: tls.client_cert,
|
43
|
+
client_private_key: tls.client_private_key,
|
44
|
+
server_name_override: tls.server_name_override,
|
45
|
+
),
|
46
|
+
metadata: metadata,
|
47
|
+
retry_config: retry_config && Temporalio::Bridge::RetryConfig.new(
|
48
|
+
initial_interval_millis: retry_config.initial_interval_millis,
|
49
|
+
randomization_factor: retry_config.randomization_factor,
|
50
|
+
multiplier: retry_config.multiplier,
|
51
|
+
max_interval_millis: retry_config.max_interval_millis,
|
52
|
+
max_elapsed_time_millis: retry_config.max_elapsed_time_millis,
|
53
|
+
max_retries: retry_config.max_retries,
|
54
|
+
),
|
55
|
+
client_version: Temporalio::VERSION,
|
56
|
+
),
|
57
|
+
)
|
711
58
|
end
|
712
59
|
|
713
|
-
#
|
714
|
-
# @param metadata [Hash<String, String>] Headers used on the RPC call.
|
715
|
-
# Keys here override client-level RPC metadata keys.
|
716
|
-
# @param timeout [Integer] Optional RPC deadline to set for each RPC call.
|
60
|
+
# Get an object for making WorkflowService RPCs.
|
717
61
|
#
|
718
|
-
# @return [Temporalio::
|
719
|
-
def
|
720
|
-
|
721
|
-
response = core_connection.call(:describe_batch_operation, encoded, metadata, timeout)
|
722
|
-
|
723
|
-
Temporalio::Api::WorkflowService::V1::DescribeBatchOperationResponse.decode(response)
|
62
|
+
# @return [Temporalio::Connection::WorkflowService]
|
63
|
+
def workflow_service
|
64
|
+
@workflow_service ||= Temporalio::Connection::WorkflowService.new(core_connection)
|
724
65
|
end
|
725
66
|
|
726
|
-
#
|
727
|
-
# @param metadata [Hash<String, String>] Headers used on the RPC call.
|
728
|
-
# Keys here override client-level RPC metadata keys.
|
729
|
-
# @param timeout [Integer] Optional RPC deadline to set for each RPC call.
|
67
|
+
# Get an object for making TestService RPCs.
|
730
68
|
#
|
731
|
-
# @return [Temporalio::
|
732
|
-
def
|
733
|
-
|
734
|
-
response = core_connection.call(:list_batch_operations, encoded, metadata, timeout)
|
735
|
-
|
736
|
-
Temporalio::Api::WorkflowService::V1::ListBatchOperationsResponse.decode(response)
|
69
|
+
# @return [Temporalio::Connection::TestService]
|
70
|
+
def test_service
|
71
|
+
@test_service ||= Temporalio::Connection::TestService.new(core_connection)
|
737
72
|
end
|
738
73
|
|
739
74
|
private
|
740
75
|
|
741
76
|
def parse_url(url)
|
77
|
+
url ||= 'localhost:7233'
|
78
|
+
|
742
79
|
# Turn this into a valid URI before parsing
|
743
80
|
uri = URI.parse(url.include?('://') ? url : "//#{url}")
|
744
81
|
raise Temporalio::Error, 'Target host as URL with scheme are not supported' if uri.scheme
|
745
82
|
|
746
|
-
|
747
|
-
uri.scheme = 'http'
|
748
|
-
uri.to_s
|
83
|
+
[uri.host || 'localhost', uri.port || 7233]
|
749
84
|
end
|
750
85
|
end
|
751
86
|
end
|