clara-temporalio 0.4.3-x86_64-linux

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (190) hide show
  1. checksums.yaml +7 -0
  2. data/.yardopts +2 -0
  3. data/Gemfile +27 -0
  4. data/Rakefile +101 -0
  5. data/lib/temporalio/activity/cancellation_details.rb +58 -0
  6. data/lib/temporalio/activity/complete_async_error.rb +11 -0
  7. data/lib/temporalio/activity/context.rb +131 -0
  8. data/lib/temporalio/activity/definition.rb +197 -0
  9. data/lib/temporalio/activity/info.rb +70 -0
  10. data/lib/temporalio/activity.rb +14 -0
  11. data/lib/temporalio/api/activity/v1/message.rb +25 -0
  12. data/lib/temporalio/api/batch/v1/message.rb +38 -0
  13. data/lib/temporalio/api/cloud/account/v1/message.rb +28 -0
  14. data/lib/temporalio/api/cloud/cloudservice/v1/request_response.rb +135 -0
  15. data/lib/temporalio/api/cloud/cloudservice/v1/service.rb +25 -0
  16. data/lib/temporalio/api/cloud/cloudservice.rb +3 -0
  17. data/lib/temporalio/api/cloud/identity/v1/message.rb +46 -0
  18. data/lib/temporalio/api/cloud/namespace/v1/message.rb +46 -0
  19. data/lib/temporalio/api/cloud/nexus/v1/message.rb +32 -0
  20. data/lib/temporalio/api/cloud/operation/v1/message.rb +28 -0
  21. data/lib/temporalio/api/cloud/region/v1/message.rb +24 -0
  22. data/lib/temporalio/api/cloud/resource/v1/message.rb +23 -0
  23. data/lib/temporalio/api/cloud/sink/v1/message.rb +24 -0
  24. data/lib/temporalio/api/cloud/usage/v1/message.rb +31 -0
  25. data/lib/temporalio/api/command/v1/message.rb +46 -0
  26. data/lib/temporalio/api/common/v1/grpc_status.rb +23 -0
  27. data/lib/temporalio/api/common/v1/message.rb +49 -0
  28. data/lib/temporalio/api/deployment/v1/message.rb +39 -0
  29. data/lib/temporalio/api/enums/v1/batch_operation.rb +22 -0
  30. data/lib/temporalio/api/enums/v1/command_type.rb +21 -0
  31. data/lib/temporalio/api/enums/v1/common.rb +28 -0
  32. data/lib/temporalio/api/enums/v1/deployment.rb +23 -0
  33. data/lib/temporalio/api/enums/v1/event_type.rb +21 -0
  34. data/lib/temporalio/api/enums/v1/failed_cause.rb +26 -0
  35. data/lib/temporalio/api/enums/v1/namespace.rb +23 -0
  36. data/lib/temporalio/api/enums/v1/nexus.rb +21 -0
  37. data/lib/temporalio/api/enums/v1/query.rb +22 -0
  38. data/lib/temporalio/api/enums/v1/reset.rb +23 -0
  39. data/lib/temporalio/api/enums/v1/schedule.rb +21 -0
  40. data/lib/temporalio/api/enums/v1/task_queue.rb +25 -0
  41. data/lib/temporalio/api/enums/v1/update.rb +22 -0
  42. data/lib/temporalio/api/enums/v1/workflow.rb +31 -0
  43. data/lib/temporalio/api/errordetails/v1/message.rb +44 -0
  44. data/lib/temporalio/api/export/v1/message.rb +24 -0
  45. data/lib/temporalio/api/failure/v1/message.rb +38 -0
  46. data/lib/temporalio/api/filter/v1/message.rb +27 -0
  47. data/lib/temporalio/api/history/v1/message.rb +94 -0
  48. data/lib/temporalio/api/namespace/v1/message.rb +31 -0
  49. data/lib/temporalio/api/nexus/v1/message.rb +41 -0
  50. data/lib/temporalio/api/operatorservice/v1/request_response.rb +49 -0
  51. data/lib/temporalio/api/operatorservice/v1/service.rb +23 -0
  52. data/lib/temporalio/api/operatorservice.rb +3 -0
  53. data/lib/temporalio/api/payload_visitor.rb +1668 -0
  54. data/lib/temporalio/api/protocol/v1/message.rb +23 -0
  55. data/lib/temporalio/api/query/v1/message.rb +28 -0
  56. data/lib/temporalio/api/replication/v1/message.rb +26 -0
  57. data/lib/temporalio/api/rules/v1/message.rb +27 -0
  58. data/lib/temporalio/api/schedule/v1/message.rb +43 -0
  59. data/lib/temporalio/api/sdk/v1/enhanced_stack_trace.rb +25 -0
  60. data/lib/temporalio/api/sdk/v1/task_complete_metadata.rb +21 -0
  61. data/lib/temporalio/api/sdk/v1/user_metadata.rb +23 -0
  62. data/lib/temporalio/api/sdk/v1/workflow_metadata.rb +23 -0
  63. data/lib/temporalio/api/taskqueue/v1/message.rb +48 -0
  64. data/lib/temporalio/api/testservice/v1/request_response.rb +31 -0
  65. data/lib/temporalio/api/testservice/v1/service.rb +23 -0
  66. data/lib/temporalio/api/update/v1/message.rb +33 -0
  67. data/lib/temporalio/api/version/v1/message.rb +26 -0
  68. data/lib/temporalio/api/workflow/v1/message.rb +63 -0
  69. data/lib/temporalio/api/workflowservice/v1/request_response.rb +244 -0
  70. data/lib/temporalio/api/workflowservice/v1/service.rb +23 -0
  71. data/lib/temporalio/api/workflowservice.rb +3 -0
  72. data/lib/temporalio/api.rb +15 -0
  73. data/lib/temporalio/cancellation.rb +170 -0
  74. data/lib/temporalio/client/activity_id_reference.rb +32 -0
  75. data/lib/temporalio/client/async_activity_handle.rb +85 -0
  76. data/lib/temporalio/client/connection/cloud_service.rb +786 -0
  77. data/lib/temporalio/client/connection/operator_service.rb +201 -0
  78. data/lib/temporalio/client/connection/service.rb +42 -0
  79. data/lib/temporalio/client/connection/test_service.rb +111 -0
  80. data/lib/temporalio/client/connection/workflow_service.rb +1326 -0
  81. data/lib/temporalio/client/connection.rb +316 -0
  82. data/lib/temporalio/client/interceptor.rb +457 -0
  83. data/lib/temporalio/client/schedule.rb +991 -0
  84. data/lib/temporalio/client/schedule_handle.rb +126 -0
  85. data/lib/temporalio/client/with_start_workflow_operation.rb +115 -0
  86. data/lib/temporalio/client/workflow_execution.rb +119 -0
  87. data/lib/temporalio/client/workflow_execution_count.rb +36 -0
  88. data/lib/temporalio/client/workflow_execution_status.rb +18 -0
  89. data/lib/temporalio/client/workflow_handle.rb +389 -0
  90. data/lib/temporalio/client/workflow_query_reject_condition.rb +14 -0
  91. data/lib/temporalio/client/workflow_update_handle.rb +65 -0
  92. data/lib/temporalio/client/workflow_update_wait_stage.rb +17 -0
  93. data/lib/temporalio/client.rb +625 -0
  94. data/lib/temporalio/common_enums.rb +55 -0
  95. data/lib/temporalio/contrib/open_telemetry.rb +469 -0
  96. data/lib/temporalio/converters/data_converter.rb +99 -0
  97. data/lib/temporalio/converters/failure_converter.rb +205 -0
  98. data/lib/temporalio/converters/payload_codec.rb +26 -0
  99. data/lib/temporalio/converters/payload_converter/binary_null.rb +34 -0
  100. data/lib/temporalio/converters/payload_converter/binary_plain.rb +35 -0
  101. data/lib/temporalio/converters/payload_converter/binary_protobuf.rb +42 -0
  102. data/lib/temporalio/converters/payload_converter/composite.rb +66 -0
  103. data/lib/temporalio/converters/payload_converter/encoding.rb +35 -0
  104. data/lib/temporalio/converters/payload_converter/json_plain.rb +44 -0
  105. data/lib/temporalio/converters/payload_converter/json_protobuf.rb +41 -0
  106. data/lib/temporalio/converters/payload_converter.rb +71 -0
  107. data/lib/temporalio/converters/raw_value.rb +20 -0
  108. data/lib/temporalio/converters.rb +9 -0
  109. data/lib/temporalio/error/failure.rb +237 -0
  110. data/lib/temporalio/error.rb +156 -0
  111. data/lib/temporalio/internal/bridge/3.2/temporalio_bridge.so +0 -0
  112. data/lib/temporalio/internal/bridge/3.3/temporalio_bridge.so +0 -0
  113. data/lib/temporalio/internal/bridge/3.4/temporalio_bridge.so +0 -0
  114. data/lib/temporalio/internal/bridge/api/activity_result/activity_result.rb +34 -0
  115. data/lib/temporalio/internal/bridge/api/activity_task/activity_task.rb +32 -0
  116. data/lib/temporalio/internal/bridge/api/child_workflow/child_workflow.rb +33 -0
  117. data/lib/temporalio/internal/bridge/api/common/common.rb +27 -0
  118. data/lib/temporalio/internal/bridge/api/core_interface.rb +40 -0
  119. data/lib/temporalio/internal/bridge/api/external_data/external_data.rb +27 -0
  120. data/lib/temporalio/internal/bridge/api/nexus/nexus.rb +34 -0
  121. data/lib/temporalio/internal/bridge/api/workflow_activation/workflow_activation.rb +56 -0
  122. data/lib/temporalio/internal/bridge/api/workflow_commands/workflow_commands.rb +58 -0
  123. data/lib/temporalio/internal/bridge/api/workflow_completion/workflow_completion.rb +31 -0
  124. data/lib/temporalio/internal/bridge/api.rb +3 -0
  125. data/lib/temporalio/internal/bridge/client.rb +95 -0
  126. data/lib/temporalio/internal/bridge/runtime.rb +56 -0
  127. data/lib/temporalio/internal/bridge/testing.rb +69 -0
  128. data/lib/temporalio/internal/bridge/worker.rb +109 -0
  129. data/lib/temporalio/internal/bridge.rb +36 -0
  130. data/lib/temporalio/internal/client/implementation.rb +926 -0
  131. data/lib/temporalio/internal/metric.rb +122 -0
  132. data/lib/temporalio/internal/proto_utils.rb +165 -0
  133. data/lib/temporalio/internal/worker/activity_worker.rb +448 -0
  134. data/lib/temporalio/internal/worker/multi_runner.rb +213 -0
  135. data/lib/temporalio/internal/worker/workflow_instance/child_workflow_handle.rb +54 -0
  136. data/lib/temporalio/internal/worker/workflow_instance/context.rb +391 -0
  137. data/lib/temporalio/internal/worker/workflow_instance/details.rb +49 -0
  138. data/lib/temporalio/internal/worker/workflow_instance/external_workflow_handle.rb +32 -0
  139. data/lib/temporalio/internal/worker/workflow_instance/externally_immutable_hash.rb +22 -0
  140. data/lib/temporalio/internal/worker/workflow_instance/handler_execution.rb +25 -0
  141. data/lib/temporalio/internal/worker/workflow_instance/handler_hash.rb +41 -0
  142. data/lib/temporalio/internal/worker/workflow_instance/illegal_call_tracer.rb +97 -0
  143. data/lib/temporalio/internal/worker/workflow_instance/inbound_implementation.rb +62 -0
  144. data/lib/temporalio/internal/worker/workflow_instance/outbound_implementation.rb +404 -0
  145. data/lib/temporalio/internal/worker/workflow_instance/replay_safe_logger.rb +37 -0
  146. data/lib/temporalio/internal/worker/workflow_instance/replay_safe_metric.rb +40 -0
  147. data/lib/temporalio/internal/worker/workflow_instance/scheduler.rb +183 -0
  148. data/lib/temporalio/internal/worker/workflow_instance.rb +800 -0
  149. data/lib/temporalio/internal/worker/workflow_worker.rb +249 -0
  150. data/lib/temporalio/internal.rb +7 -0
  151. data/lib/temporalio/metric.rb +109 -0
  152. data/lib/temporalio/priority.rb +59 -0
  153. data/lib/temporalio/retry_policy.rb +74 -0
  154. data/lib/temporalio/runtime/metric_buffer.rb +94 -0
  155. data/lib/temporalio/runtime.rb +352 -0
  156. data/lib/temporalio/scoped_logger.rb +96 -0
  157. data/lib/temporalio/search_attributes.rb +356 -0
  158. data/lib/temporalio/testing/activity_environment.rb +175 -0
  159. data/lib/temporalio/testing/workflow_environment.rb +406 -0
  160. data/lib/temporalio/testing.rb +10 -0
  161. data/lib/temporalio/version.rb +5 -0
  162. data/lib/temporalio/versioning_override.rb +55 -0
  163. data/lib/temporalio/worker/activity_executor/fiber.rb +49 -0
  164. data/lib/temporalio/worker/activity_executor/thread_pool.rb +46 -0
  165. data/lib/temporalio/worker/activity_executor.rb +55 -0
  166. data/lib/temporalio/worker/deployment_options.rb +45 -0
  167. data/lib/temporalio/worker/interceptor.rb +367 -0
  168. data/lib/temporalio/worker/poller_behavior.rb +61 -0
  169. data/lib/temporalio/worker/thread_pool.rb +237 -0
  170. data/lib/temporalio/worker/tuner.rb +189 -0
  171. data/lib/temporalio/worker/workflow_executor/thread_pool.rb +236 -0
  172. data/lib/temporalio/worker/workflow_executor.rb +26 -0
  173. data/lib/temporalio/worker/workflow_replayer.rb +349 -0
  174. data/lib/temporalio/worker.rb +633 -0
  175. data/lib/temporalio/worker_deployment_version.rb +67 -0
  176. data/lib/temporalio/workflow/activity_cancellation_type.rb +20 -0
  177. data/lib/temporalio/workflow/child_workflow_cancellation_type.rb +21 -0
  178. data/lib/temporalio/workflow/child_workflow_handle.rb +43 -0
  179. data/lib/temporalio/workflow/definition.rb +680 -0
  180. data/lib/temporalio/workflow/external_workflow_handle.rb +41 -0
  181. data/lib/temporalio/workflow/future.rb +151 -0
  182. data/lib/temporalio/workflow/handler_unfinished_policy.rb +13 -0
  183. data/lib/temporalio/workflow/info.rb +107 -0
  184. data/lib/temporalio/workflow/parent_close_policy.rb +19 -0
  185. data/lib/temporalio/workflow/update_info.rb +20 -0
  186. data/lib/temporalio/workflow.rb +594 -0
  187. data/lib/temporalio/workflow_history.rb +47 -0
  188. data/lib/temporalio.rb +12 -0
  189. data/temporalio.gemspec +31 -0
  190. metadata +267 -0
@@ -0,0 +1,237 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'temporalio/api'
4
+ require 'temporalio/error'
5
+
6
+ module Temporalio
7
+ class Error
8
+ # Base class for all Temporal serializable failures.
9
+ class Failure < Error
10
+ end
11
+
12
+ # Error raised by a client or workflow when a workflow execution has already started.
13
+ class WorkflowAlreadyStartedError < Failure
14
+ # @return [String] ID of the already-started workflow.
15
+ attr_reader :workflow_id
16
+
17
+ # @return [String] Workflow type name of the already-started workflow.
18
+ attr_reader :workflow_type
19
+
20
+ # @return [String, nil] Run ID of the already-started workflow if this was raised by the client.
21
+ attr_reader :run_id
22
+
23
+ # @!visibility private
24
+ def initialize(workflow_id:, workflow_type:, run_id:)
25
+ super('Workflow execution already started')
26
+ @workflow_id = workflow_id
27
+ @workflow_type = workflow_type
28
+ @run_id = run_id
29
+ end
30
+ end
31
+
32
+ # Error raised during workflow/activity execution.
33
+ class ApplicationError < Failure
34
+ # @return [Array<Object, nil>] User-defined details on the error.
35
+ attr_reader :details
36
+
37
+ # @return [String, nil] General error type.
38
+ attr_reader :type
39
+
40
+ # @return [Boolean] Whether the error was set as non-retryable when created.
41
+ #
42
+ # @note This is not whether the error is non-retryable via other means such as retry policy. This is just
43
+ # whether the error was marked non-retryable upon creation by the user.
44
+ attr_reader :non_retryable
45
+
46
+ # @return [Float, nil] Delay in seconds before the next activity retry attempt.
47
+ attr_reader :next_retry_delay
48
+
49
+ # @return [Category] Error category.
50
+ attr_reader :category
51
+
52
+ # Create an application error.
53
+ #
54
+ # @param message [String] Error message.
55
+ # @param details [Array<Object, nil>] Error details.
56
+ # @param type [String, nil] Error type.
57
+ # @param non_retryable [Boolean] Whether this error should be considered non-retryable.
58
+ # @param next_retry_delay [Float, nil] Specific amount of time to delay before next retry.
59
+ # @param category [Category] Error category.
60
+ def initialize(
61
+ message,
62
+ *details,
63
+ type: nil,
64
+ non_retryable: false,
65
+ next_retry_delay: nil,
66
+ category: Category::UNSPECIFIED
67
+ )
68
+ super(message)
69
+ @details = details
70
+ @type = type
71
+ @non_retryable = non_retryable
72
+ @next_retry_delay = next_retry_delay
73
+ @category = category
74
+ end
75
+
76
+ # @return [Boolean] Inverse of {non_retryable}.
77
+ def retryable?
78
+ !@non_retryable
79
+ end
80
+
81
+ # Error category.
82
+ module Category
83
+ UNSPECIFIED = Api::Enums::V1::ApplicationErrorCategory::APPLICATION_ERROR_CATEGORY_UNSPECIFIED
84
+ BENIGN = Api::Enums::V1::ApplicationErrorCategory::APPLICATION_ERROR_CATEGORY_BENIGN
85
+ end
86
+ end
87
+
88
+ # Error raised on workflow/activity cancellation.
89
+ class CanceledError < Failure
90
+ attr_reader :details
91
+
92
+ # @!visibility private
93
+ def initialize(message, details: [])
94
+ super(message)
95
+ @details = details
96
+ end
97
+ end
98
+
99
+ # Error raised on workflow termination.
100
+ class TerminatedError < Failure
101
+ # @return [Array<Object?>] User-defined details on the error.
102
+ attr_reader :details
103
+
104
+ # @!visibility private
105
+ def initialize(message, details:)
106
+ super(message)
107
+ @details = details
108
+ end
109
+ end
110
+
111
+ # Error raised on workflow/activity timeout.
112
+ class TimeoutError < Failure
113
+ # @return [TimeoutType] Type of timeout error.
114
+ attr_reader :type
115
+
116
+ # @return [Array<Object>] Last heartbeat details if this is for an activity heartbeat.
117
+ attr_reader :last_heartbeat_details
118
+
119
+ # @!visibility private
120
+ def initialize(message, type:, last_heartbeat_details:)
121
+ super(message)
122
+ @type = type
123
+ @last_heartbeat_details = last_heartbeat_details
124
+ end
125
+
126
+ # Type of timeout error.
127
+ module TimeoutType
128
+ START_TO_CLOSE = Api::Enums::V1::TimeoutType::TIMEOUT_TYPE_START_TO_CLOSE
129
+ SCHEDULE_TO_START = Api::Enums::V1::TimeoutType::TIMEOUT_TYPE_SCHEDULE_TO_START
130
+ SCHEDULE_TO_CLOSE = Api::Enums::V1::TimeoutType::TIMEOUT_TYPE_SCHEDULE_TO_CLOSE
131
+ HEARTBEAT = Api::Enums::V1::TimeoutType::TIMEOUT_TYPE_HEARTBEAT
132
+ end
133
+ end
134
+
135
+ # Error originating in the Temporal server.
136
+ class ServerError < Failure
137
+ # @return [Boolean] Whether this error is non-retryable.
138
+ attr_reader :non_retryable
139
+
140
+ # @!visibility private
141
+ def initialize(message, non_retryable:)
142
+ super(message)
143
+ @non_retryable = non_retryable
144
+ end
145
+
146
+ # @return [Boolean] Inverse of {non_retryable}.
147
+ def retryable?
148
+ !@non_retryable
149
+ end
150
+ end
151
+
152
+ # Current retry state of the workflow/activity during error.
153
+ module RetryState
154
+ IN_PROGRESS = Api::Enums::V1::RetryState::RETRY_STATE_IN_PROGRESS
155
+ NON_RETRYABLE_FAILURE = Api::Enums::V1::RetryState::RETRY_STATE_NON_RETRYABLE_FAILURE
156
+ TIMEOUT = Api::Enums::V1::RetryState::RETRY_STATE_TIMEOUT
157
+ MAXIMUM_ATTEMPTS_REACHED = Api::Enums::V1::RetryState::RETRY_STATE_MAXIMUM_ATTEMPTS_REACHED
158
+ RETRY_POLICY_NOT_SET = Api::Enums::V1::RetryState::RETRY_STATE_RETRY_POLICY_NOT_SET
159
+ INTERNAL_SERVER_ERROR = Api::Enums::V1::RetryState::RETRY_STATE_INTERNAL_SERVER_ERROR
160
+ CANCEL_REQUESTED = Api::Enums::V1::RetryState::RETRY_STATE_CANCEL_REQUESTED
161
+ end
162
+
163
+ # Error raised on activity failure.
164
+ class ActivityError < Failure
165
+ # @return [Integer] Scheduled event ID for this activity.
166
+ attr_reader :scheduled_event_id
167
+ # @return [Integer] Started event ID for this activity.
168
+ attr_reader :started_event_id
169
+ # @return [String] Client/worker identity.
170
+ attr_reader :identity
171
+ # @return [String] Activity type name.
172
+ attr_reader :activity_type
173
+ # @return [String] Activity ID.
174
+ attr_reader :activity_id
175
+ # @return [RetryState, nil] Retry state.
176
+ attr_reader :retry_state
177
+
178
+ # @!visibility private
179
+ def initialize(
180
+ message,
181
+ scheduled_event_id:,
182
+ started_event_id:,
183
+ identity:,
184
+ activity_type:,
185
+ activity_id:,
186
+ retry_state:
187
+ )
188
+ super(message)
189
+ @scheduled_event_id = scheduled_event_id
190
+ @started_event_id = started_event_id
191
+ @identity = identity
192
+ @activity_type = activity_type
193
+ @activity_id = activity_id
194
+ @retry_state = retry_state
195
+ end
196
+ end
197
+
198
+ # Error raised on child workflow failure.
199
+ class ChildWorkflowError < Failure
200
+ # @return [String] Child workflow namespace.
201
+ attr_reader :namespace
202
+ # @return [String] Child workflow ID.
203
+ attr_reader :workflow_id
204
+ # @return [String] Child workflow run ID.
205
+ attr_reader :run_id
206
+ # @return [String] Child workflow type name.
207
+ attr_reader :workflow_type
208
+ # @return [Integer] Child workflow initiated event ID.
209
+ attr_reader :initiated_event_id
210
+ # @return [Integer] Child workflow started event ID.
211
+ attr_reader :started_event_id
212
+ # @return [RetryState, nil] Retry state.
213
+ attr_reader :retry_state
214
+
215
+ # @!visibility private
216
+ def initialize(
217
+ message,
218
+ namespace:,
219
+ workflow_id:,
220
+ run_id:,
221
+ workflow_type:,
222
+ initiated_event_id:,
223
+ started_event_id:,
224
+ retry_state:
225
+ )
226
+ super(message)
227
+ @namespace = namespace
228
+ @workflow_id = workflow_id
229
+ @run_id = run_id
230
+ @workflow_type = workflow_type
231
+ @initiated_event_id = initiated_event_id
232
+ @started_event_id = started_event_id
233
+ @retry_state = retry_state
234
+ end
235
+ end
236
+ end
237
+ end
@@ -0,0 +1,156 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'temporalio/api'
4
+
5
+ module Temporalio
6
+ # Superclass for all Temporal errors
7
+ class Error < StandardError
8
+ # Whether the error represents some form of cancellation from an activity or workflow.
9
+ #
10
+ # @param error [Exception] Error to check.
11
+ # @return [Boolean] True if some form of canceled, false otherwise.
12
+ def self.canceled?(error)
13
+ error.is_a?(CanceledError) ||
14
+ (error.is_a?(ActivityError) && error.cause.is_a?(CanceledError)) ||
15
+ (error.is_a?(ChildWorkflowError) && error.cause.is_a?(CanceledError))
16
+ end
17
+
18
+ # @!visibility private
19
+ def self._with_backtrace_and_cause(err, backtrace:, cause:)
20
+ if cause
21
+ # The only way to set a _real_ cause in Ruby is to use `raise`. Even if
22
+ # you try to override `def cause`, it won't be outputted in situations
23
+ # where Ruby outputs cause.
24
+ begin
25
+ raise(err, err.message, backtrace, cause:)
26
+ rescue StandardError => e
27
+ e
28
+ end
29
+ else
30
+ err.set_backtrace(backtrace) if backtrace
31
+ err
32
+ end
33
+ end
34
+
35
+ # Error that is returned from when a workflow is unsuccessful.
36
+ class WorkflowFailedError < Error
37
+ # @!visibility private
38
+ def initialize(message = 'Workflow execution failed')
39
+ super
40
+ end
41
+ end
42
+
43
+ # Error that occurs when a workflow was continued as new.
44
+ class WorkflowContinuedAsNewError < Error
45
+ # @return [String] New execution run ID the workflow continued to.
46
+ attr_reader :new_run_id
47
+
48
+ # @!visibility private
49
+ def initialize(new_run_id:)
50
+ super('Workflow execution continued as new')
51
+ @new_run_id = new_run_id
52
+ end
53
+ end
54
+
55
+ # Error that occurs when a query fails.
56
+ class WorkflowQueryFailedError < Error
57
+ end
58
+
59
+ # Error that occurs when a query was rejected.
60
+ class WorkflowQueryRejectedError < Error
61
+ # @return [Client::WorkflowExecutionStatus] Workflow execution status causing rejection.
62
+ attr_reader :status
63
+
64
+ # @!visibility private
65
+ def initialize(status:)
66
+ super("Query rejected, #{status}")
67
+ @status = status
68
+ end
69
+ end
70
+
71
+ # Error that occurs when an update fails.
72
+ class WorkflowUpdateFailedError < Error
73
+ # @!visibility private
74
+ def initialize
75
+ super('Workflow update failed')
76
+ end
77
+ end
78
+
79
+ # Error that occurs when update RPC call times out or is canceled.
80
+ #
81
+ # @note This is not related to any general concept of timing out or cancelling a running update, this is only
82
+ # related to the client call itself.
83
+ class WorkflowUpdateRPCTimeoutOrCanceledError < Error
84
+ # @!visibility private
85
+ def initialize
86
+ super('Timeout or cancellation waiting for update')
87
+ end
88
+ end
89
+
90
+ # Error when a schedule is already running.
91
+ class ScheduleAlreadyRunningError < Error
92
+ # @!visibility private
93
+ def initialize
94
+ super('Schedule already running')
95
+ end
96
+ end
97
+
98
+ # Error that occurs when an async activity handle tries to heartbeat and the activity is marked as canceled.
99
+ class AsyncActivityCanceledError < Error
100
+ # @!visibility private
101
+ def initialize
102
+ super('Activity canceled')
103
+ end
104
+ end
105
+
106
+ # Error raised by a client for a general RPC failure.
107
+ class RPCError < Error
108
+ # @return [Code] Status code for the error.
109
+ attr_reader :code
110
+
111
+ # @!visibility private
112
+ def initialize(message, code:, raw_grpc_status:)
113
+ super(message)
114
+ @code = code
115
+ @raw_grpc_status = raw_grpc_status
116
+ end
117
+
118
+ # @return [Api::Common::V1::GrpcStatus] Status of the gRPC call with details.
119
+ def grpc_status
120
+ @grpc_status ||= create_grpc_status
121
+ end
122
+
123
+ private
124
+
125
+ def create_grpc_status
126
+ return Api::Common::V1::GrpcStatus.new(code: @code) unless @raw_grpc_status
127
+ return @raw_grpc_status if @raw_grpc_status.is_a?(Api::Common::V1::GrpcStatus)
128
+
129
+ Api::Common::V1::GrpcStatus.decode(@raw_grpc_status)
130
+ end
131
+
132
+ # Status code for RPC errors. These are gRPC status codes.
133
+ module Code
134
+ OK = 0
135
+ CANCELED = 1 # Intentionally one-L while gRPC is two-L
136
+ UNKNOWN = 2
137
+ INVALID_ARGUMENT = 3
138
+ DEADLINE_EXCEEDED = 4
139
+ NOT_FOUND = 5
140
+ ALREADY_EXISTS = 6
141
+ PERMISSION_DENIED = 7
142
+ RESOURCE_EXHAUSTED = 8
143
+ FAILED_PRECONDITION = 9
144
+ ABORTED = 10
145
+ OUT_OF_RANGE = 11
146
+ UNIMPLEMENTED = 12
147
+ INTERNAL = 13
148
+ UNAVAILABLE = 14
149
+ DATA_LOSS = 15
150
+ UNAUTHENTICATED = 16
151
+ end
152
+ end
153
+ end
154
+ end
155
+
156
+ require 'temporalio/error/failure'
@@ -0,0 +1,34 @@
1
+ # frozen_string_literal: true
2
+ # Generated by the protocol buffer compiler. DO NOT EDIT!
3
+ # source: temporal/sdk/core/activity_result/activity_result.proto
4
+
5
+ require 'google/protobuf'
6
+
7
+ require 'google/protobuf/duration_pb'
8
+ require 'google/protobuf/timestamp_pb'
9
+ require 'temporalio/api/common/v1/message'
10
+ require 'temporalio/api/failure/v1/message'
11
+
12
+
13
+ descriptor_data = "\n7temporal/sdk/core/activity_result/activity_result.proto\x12\x17\x63oresdk.activity_result\x1a\x1egoogle/protobuf/duration.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a$temporal/api/common/v1/message.proto\x1a%temporal/api/failure/v1/message.proto\"\x95\x02\n\x17\x41\x63tivityExecutionResult\x12\x35\n\tcompleted\x18\x01 \x01(\x0b\x32 .coresdk.activity_result.SuccessH\x00\x12\x32\n\x06\x66\x61iled\x18\x02 \x01(\x0b\x32 .coresdk.activity_result.FailureH\x00\x12:\n\tcancelled\x18\x03 \x01(\x0b\x32%.coresdk.activity_result.CancellationH\x00\x12I\n\x13will_complete_async\x18\x04 \x01(\x0b\x32*.coresdk.activity_result.WillCompleteAsyncH\x00\x42\x08\n\x06status\"\xfc\x01\n\x12\x41\x63tivityResolution\x12\x35\n\tcompleted\x18\x01 \x01(\x0b\x32 .coresdk.activity_result.SuccessH\x00\x12\x32\n\x06\x66\x61iled\x18\x02 \x01(\x0b\x32 .coresdk.activity_result.FailureH\x00\x12:\n\tcancelled\x18\x03 \x01(\x0b\x32%.coresdk.activity_result.CancellationH\x00\x12\x35\n\x07\x62\x61\x63koff\x18\x04 \x01(\x0b\x32\".coresdk.activity_result.DoBackoffH\x00\x42\x08\n\x06status\":\n\x07Success\x12/\n\x06result\x18\x01 \x01(\x0b\x32\x1f.temporal.api.common.v1.Payload\"<\n\x07\x46\x61ilure\x12\x31\n\x07\x66\x61ilure\x18\x01 \x01(\x0b\x32 .temporal.api.failure.v1.Failure\"A\n\x0c\x43\x61ncellation\x12\x31\n\x07\x66\x61ilure\x18\x01 \x01(\x0b\x32 .temporal.api.failure.v1.Failure\"\x13\n\x11WillCompleteAsync\"\x8d\x01\n\tDoBackoff\x12\x0f\n\x07\x61ttempt\x18\x01 \x01(\r\x12\x33\n\x10\x62\x61\x63koff_duration\x18\x02 \x01(\x0b\x32\x19.google.protobuf.Duration\x12:\n\x16original_schedule_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB4\xea\x02\x31Temporalio::Internal::Bridge::Api::ActivityResultb\x06proto3"
14
+
15
+ pool = Google::Protobuf::DescriptorPool.generated_pool
16
+ pool.add_serialized_file(descriptor_data)
17
+
18
+ module Temporalio
19
+ module Internal
20
+ module Bridge
21
+ module Api
22
+ module ActivityResult
23
+ ActivityExecutionResult = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("coresdk.activity_result.ActivityExecutionResult").msgclass
24
+ ActivityResolution = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("coresdk.activity_result.ActivityResolution").msgclass
25
+ Success = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("coresdk.activity_result.Success").msgclass
26
+ Failure = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("coresdk.activity_result.Failure").msgclass
27
+ Cancellation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("coresdk.activity_result.Cancellation").msgclass
28
+ WillCompleteAsync = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("coresdk.activity_result.WillCompleteAsync").msgclass
29
+ DoBackoff = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("coresdk.activity_result.DoBackoff").msgclass
30
+ end
31
+ end
32
+ end
33
+ end
34
+ end
@@ -0,0 +1,32 @@
1
+ # frozen_string_literal: true
2
+ # Generated by the protocol buffer compiler. DO NOT EDIT!
3
+ # source: temporal/sdk/core/activity_task/activity_task.proto
4
+
5
+ require 'google/protobuf'
6
+
7
+ require 'google/protobuf/duration_pb'
8
+ require 'google/protobuf/timestamp_pb'
9
+ require 'temporalio/api/common/v1/message'
10
+ require 'temporalio/internal/bridge/api/common/common'
11
+
12
+
13
+ descriptor_data = "\n3temporal/sdk/core/activity_task/activity_task.proto\x12\x15\x63oresdk.activity_task\x1a\x1egoogle/protobuf/duration.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a$temporal/api/common/v1/message.proto\x1a%temporal/sdk/core/common/common.proto\"\x8d\x01\n\x0c\x41\x63tivityTask\x12\x12\n\ntask_token\x18\x01 \x01(\x0c\x12-\n\x05start\x18\x03 \x01(\x0b\x32\x1c.coresdk.activity_task.StartH\x00\x12/\n\x06\x63\x61ncel\x18\x04 \x01(\x0b\x32\x1d.coresdk.activity_task.CancelH\x00\x42\t\n\x07variant\"\xa1\x07\n\x05Start\x12\x1a\n\x12workflow_namespace\x18\x01 \x01(\t\x12\x15\n\rworkflow_type\x18\x02 \x01(\t\x12\x45\n\x12workflow_execution\x18\x03 \x01(\x0b\x32).temporal.api.common.v1.WorkflowExecution\x12\x13\n\x0b\x61\x63tivity_id\x18\x04 \x01(\t\x12\x15\n\ractivity_type\x18\x05 \x01(\t\x12\x45\n\rheader_fields\x18\x06 \x03(\x0b\x32..coresdk.activity_task.Start.HeaderFieldsEntry\x12.\n\x05input\x18\x07 \x03(\x0b\x32\x1f.temporal.api.common.v1.Payload\x12:\n\x11heartbeat_details\x18\x08 \x03(\x0b\x32\x1f.temporal.api.common.v1.Payload\x12\x32\n\x0escheduled_time\x18\t \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x42\n\x1e\x63urrent_attempt_scheduled_time\x18\n \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x30\n\x0cstarted_time\x18\x0b \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x0f\n\x07\x61ttempt\x18\x0c \x01(\r\x12<\n\x19schedule_to_close_timeout\x18\r \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x39\n\x16start_to_close_timeout\x18\x0e \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x34\n\x11heartbeat_timeout\x18\x0f \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x39\n\x0cretry_policy\x18\x10 \x01(\x0b\x32#.temporal.api.common.v1.RetryPolicy\x12\x32\n\x08priority\x18\x12 \x01(\x0b\x32 .temporal.api.common.v1.Priority\x12\x10\n\x08is_local\x18\x11 \x01(\x08\x1aT\n\x11HeaderFieldsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12.\n\x05value\x18\x02 \x01(\x0b\x32\x1f.temporal.api.common.v1.Payload:\x02\x38\x01\"\x8a\x01\n\x06\x43\x61ncel\x12;\n\x06reason\x18\x01 \x01(\x0e\x32+.coresdk.activity_task.ActivityCancelReason\x12\x43\n\x07\x64\x65tails\x18\x02 \x01(\x0b\x32\x32.coresdk.activity_task.ActivityCancellationDetails\"\xa0\x01\n\x1b\x41\x63tivityCancellationDetails\x12\x14\n\x0cis_not_found\x18\x01 \x01(\x08\x12\x14\n\x0cis_cancelled\x18\x02 \x01(\x08\x12\x11\n\tis_paused\x18\x03 \x01(\x08\x12\x14\n\x0cis_timed_out\x18\x04 \x01(\x08\x12\x1a\n\x12is_worker_shutdown\x18\x05 \x01(\x08\x12\x10\n\x08is_reset\x18\x06 \x01(\x08*o\n\x14\x41\x63tivityCancelReason\x12\r\n\tNOT_FOUND\x10\x00\x12\r\n\tCANCELLED\x10\x01\x12\r\n\tTIMED_OUT\x10\x02\x12\x13\n\x0fWORKER_SHUTDOWN\x10\x03\x12\n\n\x06PAUSED\x10\x04\x12\t\n\x05RESET\x10\x05\x42\x32\xea\x02/Temporalio::Internal::Bridge::Api::ActivityTaskb\x06proto3"
14
+
15
+ pool = Google::Protobuf::DescriptorPool.generated_pool
16
+ pool.add_serialized_file(descriptor_data)
17
+
18
+ module Temporalio
19
+ module Internal
20
+ module Bridge
21
+ module Api
22
+ module ActivityTask
23
+ ActivityTask = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("coresdk.activity_task.ActivityTask").msgclass
24
+ Start = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("coresdk.activity_task.Start").msgclass
25
+ Cancel = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("coresdk.activity_task.Cancel").msgclass
26
+ ActivityCancellationDetails = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("coresdk.activity_task.ActivityCancellationDetails").msgclass
27
+ ActivityCancelReason = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("coresdk.activity_task.ActivityCancelReason").enummodule
28
+ end
29
+ end
30
+ end
31
+ end
32
+ end
@@ -0,0 +1,33 @@
1
+ # frozen_string_literal: true
2
+ # Generated by the protocol buffer compiler. DO NOT EDIT!
3
+ # source: temporal/sdk/core/child_workflow/child_workflow.proto
4
+
5
+ require 'google/protobuf'
6
+
7
+ require 'temporalio/api/common/v1/message'
8
+ require 'temporalio/api/failure/v1/message'
9
+ require 'temporalio/internal/bridge/api/common/common'
10
+
11
+
12
+ descriptor_data = "\n5temporal/sdk/core/child_workflow/child_workflow.proto\x12\x16\x63oresdk.child_workflow\x1a$temporal/api/common/v1/message.proto\x1a%temporal/api/failure/v1/message.proto\x1a%temporal/sdk/core/common/common.proto\"\xc3\x01\n\x13\x43hildWorkflowResult\x12\x34\n\tcompleted\x18\x01 \x01(\x0b\x32\x1f.coresdk.child_workflow.SuccessH\x00\x12\x31\n\x06\x66\x61iled\x18\x02 \x01(\x0b\x32\x1f.coresdk.child_workflow.FailureH\x00\x12\x39\n\tcancelled\x18\x03 \x01(\x0b\x32$.coresdk.child_workflow.CancellationH\x00\x42\x08\n\x06status\":\n\x07Success\x12/\n\x06result\x18\x01 \x01(\x0b\x32\x1f.temporal.api.common.v1.Payload\"<\n\x07\x46\x61ilure\x12\x31\n\x07\x66\x61ilure\x18\x01 \x01(\x0b\x32 .temporal.api.failure.v1.Failure\"A\n\x0c\x43\x61ncellation\x12\x31\n\x07\x66\x61ilure\x18\x01 \x01(\x0b\x32 .temporal.api.failure.v1.Failure*\xa4\x01\n\x11ParentClosePolicy\x12#\n\x1fPARENT_CLOSE_POLICY_UNSPECIFIED\x10\x00\x12!\n\x1dPARENT_CLOSE_POLICY_TERMINATE\x10\x01\x12\x1f\n\x1bPARENT_CLOSE_POLICY_ABANDON\x10\x02\x12&\n\"PARENT_CLOSE_POLICY_REQUEST_CANCEL\x10\x03*\xae\x01\n&StartChildWorkflowExecutionFailedCause\x12;\n7START_CHILD_WORKFLOW_EXECUTION_FAILED_CAUSE_UNSPECIFIED\x10\x00\x12G\nCSTART_CHILD_WORKFLOW_EXECUTION_FAILED_CAUSE_WORKFLOW_ALREADY_EXISTS\x10\x01*~\n\x1d\x43hildWorkflowCancellationType\x12\x0b\n\x07\x41\x42\x41NDON\x10\x00\x12\x0e\n\nTRY_CANCEL\x10\x01\x12\x1f\n\x1bWAIT_CANCELLATION_COMPLETED\x10\x02\x12\x1f\n\x1bWAIT_CANCELLATION_REQUESTED\x10\x03\x42\x33\xea\x02\x30Temporalio::Internal::Bridge::Api::ChildWorkflowb\x06proto3"
13
+
14
+ pool = Google::Protobuf::DescriptorPool.generated_pool
15
+ pool.add_serialized_file(descriptor_data)
16
+
17
+ module Temporalio
18
+ module Internal
19
+ module Bridge
20
+ module Api
21
+ module ChildWorkflow
22
+ ChildWorkflowResult = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("coresdk.child_workflow.ChildWorkflowResult").msgclass
23
+ Success = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("coresdk.child_workflow.Success").msgclass
24
+ Failure = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("coresdk.child_workflow.Failure").msgclass
25
+ Cancellation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("coresdk.child_workflow.Cancellation").msgclass
26
+ ParentClosePolicy = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("coresdk.child_workflow.ParentClosePolicy").enummodule
27
+ StartChildWorkflowExecutionFailedCause = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("coresdk.child_workflow.StartChildWorkflowExecutionFailedCause").enummodule
28
+ ChildWorkflowCancellationType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("coresdk.child_workflow.ChildWorkflowCancellationType").enummodule
29
+ end
30
+ end
31
+ end
32
+ end
33
+ end
@@ -0,0 +1,27 @@
1
+ # frozen_string_literal: true
2
+ # Generated by the protocol buffer compiler. DO NOT EDIT!
3
+ # source: temporal/sdk/core/common/common.proto
4
+
5
+ require 'google/protobuf'
6
+
7
+ require 'google/protobuf/duration_pb'
8
+
9
+
10
+ descriptor_data = "\n%temporal/sdk/core/common/common.proto\x12\x0e\x63oresdk.common\x1a\x1egoogle/protobuf/duration.proto\"U\n\x1bNamespacedWorkflowExecution\x12\x11\n\tnamespace\x18\x01 \x01(\t\x12\x13\n\x0bworkflow_id\x18\x02 \x01(\t\x12\x0e\n\x06run_id\x18\x03 \x01(\t\"D\n\x17WorkerDeploymentVersion\x12\x17\n\x0f\x64\x65ployment_name\x18\x01 \x01(\t\x12\x10\n\x08\x62uild_id\x18\x02 \x01(\t*@\n\x10VersioningIntent\x12\x0f\n\x0bUNSPECIFIED\x10\x00\x12\x0e\n\nCOMPATIBLE\x10\x01\x12\x0b\n\x07\x44\x45\x46\x41ULT\x10\x02\x42,\xea\x02)Temporalio::Internal::Bridge::Api::Commonb\x06proto3"
11
+
12
+ pool = Google::Protobuf::DescriptorPool.generated_pool
13
+ pool.add_serialized_file(descriptor_data)
14
+
15
+ module Temporalio
16
+ module Internal
17
+ module Bridge
18
+ module Api
19
+ module Common
20
+ NamespacedWorkflowExecution = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("coresdk.common.NamespacedWorkflowExecution").msgclass
21
+ WorkerDeploymentVersion = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("coresdk.common.WorkerDeploymentVersion").msgclass
22
+ VersioningIntent = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("coresdk.common.VersioningIntent").enummodule
23
+ end
24
+ end
25
+ end
26
+ end
27
+ end
@@ -0,0 +1,40 @@
1
+ # frozen_string_literal: true
2
+ # Generated by the protocol buffer compiler. DO NOT EDIT!
3
+ # source: temporal/sdk/core/core_interface.proto
4
+
5
+ require 'google/protobuf'
6
+
7
+ require 'google/protobuf/duration_pb'
8
+ require 'google/protobuf/empty_pb'
9
+ require 'google/protobuf/timestamp_pb'
10
+ require 'temporalio/api/common/v1/message'
11
+ require 'temporalio/internal/bridge/api/activity_result/activity_result'
12
+ require 'temporalio/internal/bridge/api/activity_task/activity_task'
13
+ require 'temporalio/internal/bridge/api/common/common'
14
+ require 'temporalio/internal/bridge/api/external_data/external_data'
15
+ require 'temporalio/internal/bridge/api/workflow_activation/workflow_activation'
16
+ require 'temporalio/internal/bridge/api/workflow_commands/workflow_commands'
17
+ require 'temporalio/internal/bridge/api/workflow_completion/workflow_completion'
18
+
19
+
20
+ descriptor_data = "\n&temporal/sdk/core/core_interface.proto\x12\x07\x63oresdk\x1a\x1egoogle/protobuf/duration.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a$temporal/api/common/v1/message.proto\x1a\x37temporal/sdk/core/activity_result/activity_result.proto\x1a\x33temporal/sdk/core/activity_task/activity_task.proto\x1a%temporal/sdk/core/common/common.proto\x1a\x33temporal/sdk/core/external_data/external_data.proto\x1a?temporal/sdk/core/workflow_activation/workflow_activation.proto\x1a;temporal/sdk/core/workflow_commands/workflow_commands.proto\x1a?temporal/sdk/core/workflow_completion/workflow_completion.proto\"Y\n\x11\x41\x63tivityHeartbeat\x12\x12\n\ntask_token\x18\x01 \x01(\x0c\x12\x30\n\x07\x64\x65tails\x18\x02 \x03(\x0b\x32\x1f.temporal.api.common.v1.Payload\"n\n\x16\x41\x63tivityTaskCompletion\x12\x12\n\ntask_token\x18\x01 \x01(\x0c\x12@\n\x06result\x18\x02 \x01(\x0b\x32\x30.coresdk.activity_result.ActivityExecutionResult\"<\n\x10WorkflowSlotInfo\x12\x15\n\rworkflow_type\x18\x01 \x01(\t\x12\x11\n\tis_sticky\x18\x02 \x01(\x08\")\n\x10\x41\x63tivitySlotInfo\x12\x15\n\ractivity_type\x18\x01 \x01(\t\".\n\x15LocalActivitySlotInfo\x12\x15\n\ractivity_type\x18\x01 \x01(\t\"3\n\rNexusSlotInfo\x12\x0f\n\x07service\x18\x01 \x01(\t\x12\x11\n\toperation\x18\x02 \x01(\tB3\xea\x02\x30Temporalio::Internal::Bridge::Api::CoreInterfaceb\x06proto3"
21
+
22
+ pool = Google::Protobuf::DescriptorPool.generated_pool
23
+ pool.add_serialized_file(descriptor_data)
24
+
25
+ module Temporalio
26
+ module Internal
27
+ module Bridge
28
+ module Api
29
+ module CoreInterface
30
+ ActivityHeartbeat = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("coresdk.ActivityHeartbeat").msgclass
31
+ ActivityTaskCompletion = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("coresdk.ActivityTaskCompletion").msgclass
32
+ WorkflowSlotInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("coresdk.WorkflowSlotInfo").msgclass
33
+ ActivitySlotInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("coresdk.ActivitySlotInfo").msgclass
34
+ LocalActivitySlotInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("coresdk.LocalActivitySlotInfo").msgclass
35
+ NexusSlotInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("coresdk.NexusSlotInfo").msgclass
36
+ end
37
+ end
38
+ end
39
+ end
40
+ end
@@ -0,0 +1,27 @@
1
+ # frozen_string_literal: true
2
+ # Generated by the protocol buffer compiler. DO NOT EDIT!
3
+ # source: temporal/sdk/core/external_data/external_data.proto
4
+
5
+ require 'google/protobuf'
6
+
7
+ require 'google/protobuf/duration_pb'
8
+ require 'google/protobuf/timestamp_pb'
9
+
10
+
11
+ descriptor_data = "\n3temporal/sdk/core/external_data/external_data.proto\x12\x15\x63oresdk.external_data\x1a\x1egoogle/protobuf/duration.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xfe\x01\n\x17LocalActivityMarkerData\x12\x0b\n\x03seq\x18\x01 \x01(\r\x12\x0f\n\x07\x61ttempt\x18\x02 \x01(\r\x12\x13\n\x0b\x61\x63tivity_id\x18\x03 \x01(\t\x12\x15\n\ractivity_type\x18\x04 \x01(\t\x12\x31\n\rcomplete_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12*\n\x07\x62\x61\x63koff\x18\x06 \x01(\x0b\x32\x19.google.protobuf.Duration\x12:\n\x16original_schedule_time\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\"3\n\x11PatchedMarkerData\x12\n\n\x02id\x18\x01 \x01(\t\x12\x12\n\ndeprecated\x18\x02 \x01(\x08\x42\x32\xea\x02/Temporalio::Internal::Bridge::Api::ExternalDatab\x06proto3"
12
+
13
+ pool = Google::Protobuf::DescriptorPool.generated_pool
14
+ pool.add_serialized_file(descriptor_data)
15
+
16
+ module Temporalio
17
+ module Internal
18
+ module Bridge
19
+ module Api
20
+ module ExternalData
21
+ LocalActivityMarkerData = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("coresdk.external_data.LocalActivityMarkerData").msgclass
22
+ PatchedMarkerData = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("coresdk.external_data.PatchedMarkerData").msgclass
23
+ end
24
+ end
25
+ end
26
+ end
27
+ end
@@ -0,0 +1,34 @@
1
+ # frozen_string_literal: true
2
+ # Generated by the protocol buffer compiler. DO NOT EDIT!
3
+ # source: temporal/sdk/core/nexus/nexus.proto
4
+
5
+ require 'google/protobuf'
6
+
7
+ require 'temporalio/api/common/v1/message'
8
+ require 'temporalio/api/failure/v1/message'
9
+ require 'temporalio/api/nexus/v1/message'
10
+ require 'temporalio/api/workflowservice/v1/request_response'
11
+ require 'temporalio/internal/bridge/api/common/common'
12
+
13
+
14
+ descriptor_data = "\n#temporal/sdk/core/nexus/nexus.proto\x12\rcoresdk.nexus\x1a$temporal/api/common/v1/message.proto\x1a%temporal/api/failure/v1/message.proto\x1a#temporal/api/nexus/v1/message.proto\x1a\x36temporal/api/workflowservice/v1/request_response.proto\x1a%temporal/sdk/core/common/common.proto\"\xf8\x01\n\x14NexusOperationResult\x12\x34\n\tcompleted\x18\x01 \x01(\x0b\x32\x1f.temporal.api.common.v1.PayloadH\x00\x12\x32\n\x06\x66\x61iled\x18\x02 \x01(\x0b\x32 .temporal.api.failure.v1.FailureH\x00\x12\x35\n\tcancelled\x18\x03 \x01(\x0b\x32 .temporal.api.failure.v1.FailureH\x00\x12\x35\n\ttimed_out\x18\x04 \x01(\x0b\x32 .temporal.api.failure.v1.FailureH\x00\x42\x08\n\x06status\"\xb5\x01\n\x13NexusTaskCompletion\x12\x12\n\ntask_token\x18\x01 \x01(\x0c\x12\x34\n\tcompleted\x18\x02 \x01(\x0b\x32\x1f.temporal.api.nexus.v1.ResponseH\x00\x12\x34\n\x05\x65rror\x18\x03 \x01(\x0b\x32#.temporal.api.nexus.v1.HandlerErrorH\x00\x12\x14\n\nack_cancel\x18\x04 \x01(\x08H\x00\x42\x08\n\x06status\"\x9a\x01\n\tNexusTask\x12K\n\x04task\x18\x01 \x01(\x0b\x32;.temporal.api.workflowservice.v1.PollNexusTaskQueueResponseH\x00\x12\x35\n\x0b\x63\x61ncel_task\x18\x02 \x01(\x0b\x32\x1e.coresdk.nexus.CancelNexusTaskH\x00\x42\t\n\x07variant\"[\n\x0f\x43\x61ncelNexusTask\x12\x12\n\ntask_token\x18\x01 \x01(\x0c\x12\x34\n\x06reason\x18\x02 \x01(\x0e\x32$.coresdk.nexus.NexusTaskCancelReason*;\n\x15NexusTaskCancelReason\x12\r\n\tTIMED_OUT\x10\x00\x12\x13\n\x0fWORKER_SHUTDOWN\x10\x01*\x7f\n\x1eNexusOperationCancellationType\x12\x0b\n\x07\x41\x42\x41NDON\x10\x00\x12\x0e\n\nTRY_CANCEL\x10\x01\x12\x1f\n\x1bWAIT_CANCELLATION_REQUESTED\x10\x02\x12\x1f\n\x1bWAIT_CANCELLATION_COMPLETED\x10\x03\x42+\xea\x02(Temporalio::Internal::Bridge::Api::Nexusb\x06proto3"
15
+
16
+ pool = Google::Protobuf::DescriptorPool.generated_pool
17
+ pool.add_serialized_file(descriptor_data)
18
+
19
+ module Temporalio
20
+ module Internal
21
+ module Bridge
22
+ module Api
23
+ module Nexus
24
+ NexusOperationResult = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("coresdk.nexus.NexusOperationResult").msgclass
25
+ NexusTaskCompletion = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("coresdk.nexus.NexusTaskCompletion").msgclass
26
+ NexusTask = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("coresdk.nexus.NexusTask").msgclass
27
+ CancelNexusTask = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("coresdk.nexus.CancelNexusTask").msgclass
28
+ NexusTaskCancelReason = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("coresdk.nexus.NexusTaskCancelReason").enummodule
29
+ NexusOperationCancellationType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("coresdk.nexus.NexusOperationCancellationType").enummodule
30
+ end
31
+ end
32
+ end
33
+ end
34
+ end