temporalio 0.4.0-aarch64-linux-musl

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 (183) 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/complete_async_error.rb +11 -0
  6. data/lib/temporalio/activity/context.rb +123 -0
  7. data/lib/temporalio/activity/definition.rb +192 -0
  8. data/lib/temporalio/activity/info.rb +67 -0
  9. data/lib/temporalio/activity.rb +12 -0
  10. data/lib/temporalio/api/activity/v1/message.rb +25 -0
  11. data/lib/temporalio/api/batch/v1/message.rb +36 -0
  12. data/lib/temporalio/api/cloud/account/v1/message.rb +28 -0
  13. data/lib/temporalio/api/cloud/cloudservice/v1/request_response.rb +126 -0
  14. data/lib/temporalio/api/cloud/cloudservice/v1/service.rb +25 -0
  15. data/lib/temporalio/api/cloud/cloudservice.rb +3 -0
  16. data/lib/temporalio/api/cloud/identity/v1/message.rb +41 -0
  17. data/lib/temporalio/api/cloud/namespace/v1/message.rb +42 -0
  18. data/lib/temporalio/api/cloud/nexus/v1/message.rb +31 -0
  19. data/lib/temporalio/api/cloud/operation/v1/message.rb +28 -0
  20. data/lib/temporalio/api/cloud/region/v1/message.rb +24 -0
  21. data/lib/temporalio/api/cloud/resource/v1/message.rb +23 -0
  22. data/lib/temporalio/api/cloud/sink/v1/message.rb +24 -0
  23. data/lib/temporalio/api/cloud/usage/v1/message.rb +31 -0
  24. data/lib/temporalio/api/command/v1/message.rb +46 -0
  25. data/lib/temporalio/api/common/v1/grpc_status.rb +23 -0
  26. data/lib/temporalio/api/common/v1/message.rb +48 -0
  27. data/lib/temporalio/api/deployment/v1/message.rb +38 -0
  28. data/lib/temporalio/api/enums/v1/batch_operation.rb +22 -0
  29. data/lib/temporalio/api/enums/v1/command_type.rb +21 -0
  30. data/lib/temporalio/api/enums/v1/common.rb +26 -0
  31. data/lib/temporalio/api/enums/v1/deployment.rb +23 -0
  32. data/lib/temporalio/api/enums/v1/event_type.rb +21 -0
  33. data/lib/temporalio/api/enums/v1/failed_cause.rb +26 -0
  34. data/lib/temporalio/api/enums/v1/namespace.rb +23 -0
  35. data/lib/temporalio/api/enums/v1/nexus.rb +21 -0
  36. data/lib/temporalio/api/enums/v1/query.rb +22 -0
  37. data/lib/temporalio/api/enums/v1/reset.rb +23 -0
  38. data/lib/temporalio/api/enums/v1/schedule.rb +21 -0
  39. data/lib/temporalio/api/enums/v1/task_queue.rb +25 -0
  40. data/lib/temporalio/api/enums/v1/update.rb +22 -0
  41. data/lib/temporalio/api/enums/v1/workflow.rb +31 -0
  42. data/lib/temporalio/api/errordetails/v1/message.rb +44 -0
  43. data/lib/temporalio/api/export/v1/message.rb +24 -0
  44. data/lib/temporalio/api/failure/v1/message.rb +37 -0
  45. data/lib/temporalio/api/filter/v1/message.rb +27 -0
  46. data/lib/temporalio/api/history/v1/message.rb +92 -0
  47. data/lib/temporalio/api/namespace/v1/message.rb +31 -0
  48. data/lib/temporalio/api/nexus/v1/message.rb +41 -0
  49. data/lib/temporalio/api/operatorservice/v1/request_response.rb +49 -0
  50. data/lib/temporalio/api/operatorservice/v1/service.rb +23 -0
  51. data/lib/temporalio/api/operatorservice.rb +3 -0
  52. data/lib/temporalio/api/payload_visitor.rb +1581 -0
  53. data/lib/temporalio/api/protocol/v1/message.rb +23 -0
  54. data/lib/temporalio/api/query/v1/message.rb +28 -0
  55. data/lib/temporalio/api/replication/v1/message.rb +26 -0
  56. data/lib/temporalio/api/schedule/v1/message.rb +43 -0
  57. data/lib/temporalio/api/sdk/v1/enhanced_stack_trace.rb +25 -0
  58. data/lib/temporalio/api/sdk/v1/task_complete_metadata.rb +21 -0
  59. data/lib/temporalio/api/sdk/v1/user_metadata.rb +23 -0
  60. data/lib/temporalio/api/sdk/v1/workflow_metadata.rb +23 -0
  61. data/lib/temporalio/api/taskqueue/v1/message.rb +48 -0
  62. data/lib/temporalio/api/testservice/v1/request_response.rb +31 -0
  63. data/lib/temporalio/api/testservice/v1/service.rb +23 -0
  64. data/lib/temporalio/api/update/v1/message.rb +33 -0
  65. data/lib/temporalio/api/version/v1/message.rb +26 -0
  66. data/lib/temporalio/api/workflow/v1/message.rb +51 -0
  67. data/lib/temporalio/api/workflowservice/v1/request_response.rb +233 -0
  68. data/lib/temporalio/api/workflowservice/v1/service.rb +23 -0
  69. data/lib/temporalio/api/workflowservice.rb +3 -0
  70. data/lib/temporalio/api.rb +15 -0
  71. data/lib/temporalio/cancellation.rb +170 -0
  72. data/lib/temporalio/client/activity_id_reference.rb +32 -0
  73. data/lib/temporalio/client/async_activity_handle.rb +85 -0
  74. data/lib/temporalio/client/connection/cloud_service.rb +726 -0
  75. data/lib/temporalio/client/connection/operator_service.rb +201 -0
  76. data/lib/temporalio/client/connection/service.rb +42 -0
  77. data/lib/temporalio/client/connection/test_service.rb +111 -0
  78. data/lib/temporalio/client/connection/workflow_service.rb +1251 -0
  79. data/lib/temporalio/client/connection.rb +316 -0
  80. data/lib/temporalio/client/interceptor.rb +455 -0
  81. data/lib/temporalio/client/schedule.rb +991 -0
  82. data/lib/temporalio/client/schedule_handle.rb +126 -0
  83. data/lib/temporalio/client/with_start_workflow_operation.rb +115 -0
  84. data/lib/temporalio/client/workflow_execution.rb +119 -0
  85. data/lib/temporalio/client/workflow_execution_count.rb +36 -0
  86. data/lib/temporalio/client/workflow_execution_status.rb +18 -0
  87. data/lib/temporalio/client/workflow_handle.rb +389 -0
  88. data/lib/temporalio/client/workflow_query_reject_condition.rb +14 -0
  89. data/lib/temporalio/client/workflow_update_handle.rb +65 -0
  90. data/lib/temporalio/client/workflow_update_wait_stage.rb +17 -0
  91. data/lib/temporalio/client.rb +607 -0
  92. data/lib/temporalio/common_enums.rb +41 -0
  93. data/lib/temporalio/contrib/open_telemetry.rb +470 -0
  94. data/lib/temporalio/converters/data_converter.rb +99 -0
  95. data/lib/temporalio/converters/failure_converter.rb +202 -0
  96. data/lib/temporalio/converters/payload_codec.rb +26 -0
  97. data/lib/temporalio/converters/payload_converter/binary_null.rb +34 -0
  98. data/lib/temporalio/converters/payload_converter/binary_plain.rb +35 -0
  99. data/lib/temporalio/converters/payload_converter/binary_protobuf.rb +42 -0
  100. data/lib/temporalio/converters/payload_converter/composite.rb +66 -0
  101. data/lib/temporalio/converters/payload_converter/encoding.rb +35 -0
  102. data/lib/temporalio/converters/payload_converter/json_plain.rb +44 -0
  103. data/lib/temporalio/converters/payload_converter/json_protobuf.rb +41 -0
  104. data/lib/temporalio/converters/payload_converter.rb +71 -0
  105. data/lib/temporalio/converters/raw_value.rb +20 -0
  106. data/lib/temporalio/converters.rb +9 -0
  107. data/lib/temporalio/error/failure.rb +219 -0
  108. data/lib/temporalio/error.rb +156 -0
  109. data/lib/temporalio/internal/bridge/3.2/temporalio_bridge.so +0 -0
  110. data/lib/temporalio/internal/bridge/3.3/temporalio_bridge.so +0 -0
  111. data/lib/temporalio/internal/bridge/3.4/temporalio_bridge.so +0 -0
  112. data/lib/temporalio/internal/bridge/api/activity_result/activity_result.rb +34 -0
  113. data/lib/temporalio/internal/bridge/api/activity_task/activity_task.rb +31 -0
  114. data/lib/temporalio/internal/bridge/api/child_workflow/child_workflow.rb +33 -0
  115. data/lib/temporalio/internal/bridge/api/common/common.rb +27 -0
  116. data/lib/temporalio/internal/bridge/api/core_interface.rb +40 -0
  117. data/lib/temporalio/internal/bridge/api/external_data/external_data.rb +27 -0
  118. data/lib/temporalio/internal/bridge/api/nexus/nexus.rb +33 -0
  119. data/lib/temporalio/internal/bridge/api/workflow_activation/workflow_activation.rb +56 -0
  120. data/lib/temporalio/internal/bridge/api/workflow_commands/workflow_commands.rb +57 -0
  121. data/lib/temporalio/internal/bridge/api/workflow_completion/workflow_completion.rb +31 -0
  122. data/lib/temporalio/internal/bridge/api.rb +3 -0
  123. data/lib/temporalio/internal/bridge/client.rb +95 -0
  124. data/lib/temporalio/internal/bridge/runtime.rb +56 -0
  125. data/lib/temporalio/internal/bridge/testing.rb +69 -0
  126. data/lib/temporalio/internal/bridge/worker.rb +85 -0
  127. data/lib/temporalio/internal/bridge.rb +36 -0
  128. data/lib/temporalio/internal/client/implementation.rb +922 -0
  129. data/lib/temporalio/internal/metric.rb +122 -0
  130. data/lib/temporalio/internal/proto_utils.rb +165 -0
  131. data/lib/temporalio/internal/worker/activity_worker.rb +385 -0
  132. data/lib/temporalio/internal/worker/multi_runner.rb +213 -0
  133. data/lib/temporalio/internal/worker/workflow_instance/child_workflow_handle.rb +54 -0
  134. data/lib/temporalio/internal/worker/workflow_instance/context.rb +383 -0
  135. data/lib/temporalio/internal/worker/workflow_instance/details.rb +46 -0
  136. data/lib/temporalio/internal/worker/workflow_instance/external_workflow_handle.rb +32 -0
  137. data/lib/temporalio/internal/worker/workflow_instance/externally_immutable_hash.rb +22 -0
  138. data/lib/temporalio/internal/worker/workflow_instance/handler_execution.rb +25 -0
  139. data/lib/temporalio/internal/worker/workflow_instance/handler_hash.rb +41 -0
  140. data/lib/temporalio/internal/worker/workflow_instance/illegal_call_tracer.rb +97 -0
  141. data/lib/temporalio/internal/worker/workflow_instance/inbound_implementation.rb +62 -0
  142. data/lib/temporalio/internal/worker/workflow_instance/outbound_implementation.rb +400 -0
  143. data/lib/temporalio/internal/worker/workflow_instance/replay_safe_logger.rb +37 -0
  144. data/lib/temporalio/internal/worker/workflow_instance/replay_safe_metric.rb +40 -0
  145. data/lib/temporalio/internal/worker/workflow_instance/scheduler.rb +183 -0
  146. data/lib/temporalio/internal/worker/workflow_instance.rb +774 -0
  147. data/lib/temporalio/internal/worker/workflow_worker.rb +239 -0
  148. data/lib/temporalio/internal.rb +7 -0
  149. data/lib/temporalio/metric.rb +109 -0
  150. data/lib/temporalio/retry_policy.rb +74 -0
  151. data/lib/temporalio/runtime/metric_buffer.rb +94 -0
  152. data/lib/temporalio/runtime.rb +352 -0
  153. data/lib/temporalio/scoped_logger.rb +96 -0
  154. data/lib/temporalio/search_attributes.rb +356 -0
  155. data/lib/temporalio/testing/activity_environment.rb +160 -0
  156. data/lib/temporalio/testing/workflow_environment.rb +406 -0
  157. data/lib/temporalio/testing.rb +10 -0
  158. data/lib/temporalio/version.rb +5 -0
  159. data/lib/temporalio/worker/activity_executor/fiber.rb +49 -0
  160. data/lib/temporalio/worker/activity_executor/thread_pool.rb +46 -0
  161. data/lib/temporalio/worker/activity_executor.rb +55 -0
  162. data/lib/temporalio/worker/interceptor.rb +365 -0
  163. data/lib/temporalio/worker/thread_pool.rb +237 -0
  164. data/lib/temporalio/worker/tuner.rb +189 -0
  165. data/lib/temporalio/worker/workflow_executor/thread_pool.rb +235 -0
  166. data/lib/temporalio/worker/workflow_executor.rb +26 -0
  167. data/lib/temporalio/worker/workflow_replayer.rb +350 -0
  168. data/lib/temporalio/worker.rb +603 -0
  169. data/lib/temporalio/workflow/activity_cancellation_type.rb +20 -0
  170. data/lib/temporalio/workflow/child_workflow_cancellation_type.rb +21 -0
  171. data/lib/temporalio/workflow/child_workflow_handle.rb +43 -0
  172. data/lib/temporalio/workflow/definition.rb +598 -0
  173. data/lib/temporalio/workflow/external_workflow_handle.rb +41 -0
  174. data/lib/temporalio/workflow/future.rb +151 -0
  175. data/lib/temporalio/workflow/handler_unfinished_policy.rb +13 -0
  176. data/lib/temporalio/workflow/info.rb +104 -0
  177. data/lib/temporalio/workflow/parent_close_policy.rb +19 -0
  178. data/lib/temporalio/workflow/update_info.rb +20 -0
  179. data/lib/temporalio/workflow.rb +575 -0
  180. data/lib/temporalio/workflow_history.rb +47 -0
  181. data/lib/temporalio.rb +11 -0
  182. data/temporalio.gemspec +29 -0
  183. metadata +258 -0
@@ -0,0 +1,151 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'temporalio/workflow'
4
+
5
+ module Temporalio
6
+ module Workflow
7
+ # Asynchronous future for use in workflows to do concurrent and background work. This can only be used inside
8
+ # workflows.
9
+ class Future
10
+ # Return a future that completes when any of the given futures complete. The returned future will return the first
11
+ # completed future's value or raise the first completed future's exception. To not raise the exception, see
12
+ # {try_any_of}.
13
+ #
14
+ # @param futures [Array<Future<Object>>] Futures to wait for the first to complete.
15
+ # @return [Future<Object>] Future that relays the first completed future's result/failure.
16
+ def self.any_of(*futures)
17
+ Future.new do
18
+ Workflow.wait_condition(cancellation: nil) { futures.any?(&:done?) }
19
+ # We know a future is always returned from find, the || just helps type checker
20
+ (futures.find(&:done?) || raise).wait
21
+ end
22
+ end
23
+
24
+ # Return a future that completes when all of the given futures complete or any future fails. The returned future
25
+ # will return nil on success or raise an exception if any of the futures failed. This means if any future fails,
26
+ # this will not wait for the other futures to complete. To wait for all futures to complete no matter what, see
27
+ # {try_all_of}.
28
+ #
29
+ # @param futures [Array<Future<Object>>] Futures to wait for all to complete (or first to fail).
30
+ # @return [Future<nil>] Future that completes successfully with nil when all futures complete, or raises on first
31
+ # future failure.
32
+ def self.all_of(*futures)
33
+ Future.new do
34
+ Workflow.wait_condition(cancellation: nil) { futures.all?(&:done?) || futures.any?(&:failure?) }
35
+ # Raise on error if any
36
+ futures.find(&:failure?)&.wait
37
+ nil
38
+ end
39
+ end
40
+
41
+ # Return a future that completes when the first future completes. The result of the future is the future from the
42
+ # list that completed first. The future returned will never raise even if the first completed future fails.
43
+ #
44
+ # @param futures [Array<Future<Object>>] Futures to wait for the first to complete.
45
+ # @return [Future<Future<Object>>] Future with the first completing future regardless of success/fail.
46
+ def self.try_any_of(*futures)
47
+ Future.new do
48
+ Workflow.wait_condition(cancellation: nil) { futures.any?(&:done?) }
49
+ futures.find(&:done?) || raise
50
+ end
51
+ end
52
+
53
+ # Return a future that completes when all of the given futures complete regardless of success/fail. The returned
54
+ # future will return nil when all futures are complete.
55
+ #
56
+ # @param futures [Array<Future<Object>>] Futures to wait for all to complete (regardless of success/fail).
57
+ # @return [Future<nil>] Future that completes successfully with nil when all futures complete.
58
+ def self.try_all_of(*futures)
59
+ Future.new do
60
+ Workflow.wait_condition(cancellation: nil) { futures.all?(&:done?) }
61
+ nil
62
+ end
63
+ end
64
+
65
+ # @return [Object, nil] Result if the future is done or nil if it is not. This will return nil if the result is
66
+ # nil too. Users can use {done?} to differentiate the situations.
67
+ attr_reader :result
68
+
69
+ # @return [Exception, nil] Failure if this future failed or nil if it didn't or hasn't yet completed.
70
+ attr_reader :failure
71
+
72
+ # Create a new future. If created with a block, the block is started in the background and its success/raise is
73
+ # the result of the future. If created without a block, the result or failure can be set on it.
74
+ def initialize(&block)
75
+ @done = false
76
+ @result = nil
77
+ @failure = nil
78
+ @block_given = block_given?
79
+ return unless block_given?
80
+
81
+ @fiber = Fiber.schedule do
82
+ @result = block.call # steep:ignore
83
+ rescue Exception => e # rubocop:disable Lint/RescueException
84
+ @failure = e
85
+ ensure
86
+ @done = true
87
+ end
88
+ end
89
+
90
+ # @return [Boolean] True if the future is done, false otherwise.
91
+ def done?
92
+ @done
93
+ end
94
+
95
+ # @return [Boolean] True if done and not a failure, false if still running or failed.
96
+ def result?
97
+ done? && !failure
98
+ end
99
+
100
+ # Mark the future as done and set the result. Does nothing if the future is already done. This cannot be invoked
101
+ # if the future was constructed with a block.
102
+ #
103
+ # @param result [Object] The result, which can be nil.
104
+ def result=(result)
105
+ Kernel.raise 'Cannot set result if block given in constructor' if @block_given
106
+ return if done?
107
+
108
+ @result = result
109
+ @done = true
110
+ end
111
+
112
+ # @return [Boolean] True if done and failed, false if still running or succeeded.
113
+ def failure?
114
+ done? && !failure.nil?
115
+ end
116
+
117
+ # Mark the future as done and set the failure. Does nothing if the future is already done. This cannot be invoked
118
+ # if the future was constructed with a block.
119
+ #
120
+ # @param failure [Exception] The failure.
121
+ def failure=(failure)
122
+ Kernel.raise 'Cannot set result if block given in constructor' if @block_given
123
+ Kernel.raise 'Cannot set nil failure' if failure.nil?
124
+ return if done?
125
+
126
+ @failure = failure
127
+ @done = true
128
+ end
129
+
130
+ # Wait on the future to complete. This will return the success or raise the failure. To not raise, use
131
+ # {wait_no_raise}.
132
+ #
133
+ # @return [Object] Result on success.
134
+ # @raise [Exception] Failure if occurred.
135
+ def wait
136
+ Workflow.wait_condition(cancellation: nil) { done? }
137
+ Kernel.raise failure if failure? # steep:ignore
138
+
139
+ result #: untyped
140
+ end
141
+
142
+ # Wait on the future to complete. This will return the success or nil if it failed, this will not raise.
143
+ #
144
+ # @return [Object, nil] Result on success or nil on failure.
145
+ def wait_no_raise
146
+ Workflow.wait_condition(cancellation: nil) { done? }
147
+ result
148
+ end
149
+ end
150
+ end
151
+ end
@@ -0,0 +1,13 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Temporalio
4
+ module Workflow
5
+ # Actions taken if a workflow completes with running handlers.
6
+ module HandlerUnfinishedPolicy
7
+ # Issue a warning in addition to abandoning.
8
+ WARN_AND_ABANDON = 1
9
+ # Abandon the handler with no warning.
10
+ ABANDON = 2
11
+ end
12
+ end
13
+ end
@@ -0,0 +1,104 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Temporalio
4
+ module Workflow
5
+ Info = Struct.new(
6
+ :attempt,
7
+ :continued_run_id,
8
+ :cron_schedule,
9
+ :execution_timeout,
10
+ :headers,
11
+ :last_failure,
12
+ :last_result,
13
+ :namespace,
14
+ :parent,
15
+ :retry_policy,
16
+ :root,
17
+ :run_id,
18
+ :run_timeout,
19
+ :start_time,
20
+ :task_queue,
21
+ :task_timeout,
22
+ :workflow_id,
23
+ :workflow_type,
24
+ keyword_init: true
25
+ )
26
+
27
+ # Information about the running workflow. This is immutable for the life of the workflow run.
28
+ #
29
+ # @!attribute attempt
30
+ # @return [Integer] Current workflow attempt.
31
+ # @!attribute continued_run_id
32
+ # @return [String, nil] Run ID if this was continued.
33
+ # @!attribute cron_schedule
34
+ # @return [String, nil] Cron schedule if applicable.
35
+ # @!attribute execution_timeout
36
+ # @return [Float, nil] Execution timeout for the workflow.
37
+ # @!attribute headers
38
+ # @return [Hash<String, Api::Common::V1::Payload>] Headers.
39
+ # @!attribute last_failure
40
+ # @return [Exception, nil] Failure if this workflow run is a continuation of a failure.
41
+ # @!attribute last_result
42
+ # @return [Object, nil] Successful result if this workflow is a continuation of a success.
43
+ # @!attribute namespace
44
+ # @return [String] Namespace for the workflow.
45
+ # @!attribute parent
46
+ # @return [ParentInfo, nil] Parent information for the workflow if this is a child.
47
+ # @!attribute retry_policy
48
+ # @return [RetryPolicy, nil] Retry policy for the workflow.
49
+ # @!attribute root
50
+ # @return [RootInfo, nil] Root information for the workflow. This is nil in pre-1.27.0 server versions or if there
51
+ # is no root (i.e. the root is itself).
52
+ # @!attribute run_id
53
+ # @return [String] Run ID for the workflow.
54
+ # @!attribute run_timeout
55
+ # @return [Float, nil] Run timeout for the workflow.
56
+ # @!attribute start_time
57
+ # @return [Time] Time when the workflow started.
58
+ # @!attribute task_queue
59
+ # @return [String] Task queue for the workflow.
60
+ # @!attribute task_timeout
61
+ # @return [Float] Task timeout for the workflow.
62
+ # @!attribute workflow_id
63
+ # @return [String] ID for the workflow.
64
+ # @!attribute workflow_type
65
+ # @return [String] Workflow type name.
66
+ #
67
+ # @note WARNING: This class may have required parameters added to its constructor. Users should not instantiate this
68
+ # class or it may break in incompatible ways.
69
+ class Info
70
+ # Information about a parent of a workflow.
71
+ #
72
+ # @!attribute namespace
73
+ # @return [String] Namespace for the parent.
74
+ # @!attribute run_id
75
+ # @return [String] Run ID for the parent.
76
+ # @!attribute workflow_id
77
+ # @return [String] Workflow ID for the parent.
78
+ #
79
+ # @note WARNING: This class may have required parameters added to its constructor. Users should not instantiate
80
+ # this class or it may break in incompatible ways.
81
+ ParentInfo = Struct.new(
82
+ :namespace,
83
+ :run_id,
84
+ :workflow_id,
85
+ keyword_init: true
86
+ )
87
+
88
+ # Information about a root of a workflow.
89
+ #
90
+ # @!attribute run_id
91
+ # @return [String] Run ID for the root.
92
+ # @!attribute workflow_id
93
+ # @return [String] Workflow ID for the root.
94
+ #
95
+ # @note WARNING: This class may have required parameters added to its constructor. Users should not instantiate
96
+ # this class or it may break in incompatible ways.
97
+ RootInfo = Struct.new(
98
+ :run_id,
99
+ :workflow_id,
100
+ keyword_init: true
101
+ )
102
+ end
103
+ end
104
+ end
@@ -0,0 +1,19 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'temporalio/internal/bridge/api'
4
+
5
+ module Temporalio
6
+ module Workflow
7
+ # How a child workflow should be handled when the parent closes.
8
+ module ParentClosePolicy
9
+ # Unset.
10
+ UNSPECIFIED = Internal::Bridge::Api::ChildWorkflow::ParentClosePolicy::PARENT_CLOSE_POLICY_UNSPECIFIED
11
+ # The child workflow will also terminate.
12
+ TERMINATE = Internal::Bridge::Api::ChildWorkflow::ParentClosePolicy::PARENT_CLOSE_POLICY_TERMINATE
13
+ # The child workflow will do nothing.
14
+ ABANDON = Internal::Bridge::Api::ChildWorkflow::ParentClosePolicy::PARENT_CLOSE_POLICY_ABANDON
15
+ # Cancellation will be requested of the child workflow.
16
+ REQUEST_CANCEL = Internal::Bridge::Api::ChildWorkflow::ParentClosePolicy::PARENT_CLOSE_POLICY_REQUEST_CANCEL
17
+ end
18
+ end
19
+ end
@@ -0,0 +1,20 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Temporalio
4
+ module Workflow
5
+ # Information about a workflow update
6
+ #
7
+ # @!attribute id
8
+ # @return [String] Update ID.
9
+ # @!attribute name
10
+ # @return [String] Update name.
11
+ #
12
+ # @note WARNING: This class may have required parameters added to its constructor. Users should not instantiate this
13
+ # class or it may break in incompatible ways.
14
+ UpdateInfo = Struct.new(
15
+ :id,
16
+ :name,
17
+ keyword_init: true
18
+ )
19
+ end
20
+ end