temporalio 0.2.0-x86_64-linux
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/lib/temporalio/activity/complete_async_error.rb +11 -0
- data/lib/temporalio/activity/context.rb +107 -0
- data/lib/temporalio/activity/definition.rb +77 -0
- data/lib/temporalio/activity/info.rb +63 -0
- data/lib/temporalio/activity.rb +69 -0
- data/lib/temporalio/api/batch/v1/message.rb +31 -0
- data/lib/temporalio/api/cloud/cloudservice/v1/request_response.rb +93 -0
- data/lib/temporalio/api/cloud/cloudservice/v1/service.rb +25 -0
- data/lib/temporalio/api/cloud/cloudservice.rb +3 -0
- data/lib/temporalio/api/cloud/identity/v1/message.rb +36 -0
- data/lib/temporalio/api/cloud/namespace/v1/message.rb +35 -0
- data/lib/temporalio/api/cloud/operation/v1/message.rb +27 -0
- data/lib/temporalio/api/cloud/region/v1/message.rb +23 -0
- data/lib/temporalio/api/command/v1/message.rb +46 -0
- data/lib/temporalio/api/common/v1/grpc_status.rb +23 -0
- data/lib/temporalio/api/common/v1/message.rb +41 -0
- data/lib/temporalio/api/enums/v1/batch_operation.rb +22 -0
- data/lib/temporalio/api/enums/v1/command_type.rb +21 -0
- data/lib/temporalio/api/enums/v1/common.rb +26 -0
- data/lib/temporalio/api/enums/v1/event_type.rb +21 -0
- data/lib/temporalio/api/enums/v1/failed_cause.rb +26 -0
- data/lib/temporalio/api/enums/v1/namespace.rb +23 -0
- data/lib/temporalio/api/enums/v1/query.rb +22 -0
- data/lib/temporalio/api/enums/v1/reset.rb +23 -0
- data/lib/temporalio/api/enums/v1/schedule.rb +21 -0
- data/lib/temporalio/api/enums/v1/task_queue.rb +25 -0
- data/lib/temporalio/api/enums/v1/update.rb +22 -0
- data/lib/temporalio/api/enums/v1/workflow.rb +30 -0
- data/lib/temporalio/api/errordetails/v1/message.rb +42 -0
- data/lib/temporalio/api/export/v1/message.rb +24 -0
- data/lib/temporalio/api/failure/v1/message.rb +35 -0
- data/lib/temporalio/api/filter/v1/message.rb +27 -0
- data/lib/temporalio/api/history/v1/message.rb +90 -0
- data/lib/temporalio/api/namespace/v1/message.rb +31 -0
- data/lib/temporalio/api/nexus/v1/message.rb +40 -0
- data/lib/temporalio/api/operatorservice/v1/request_response.rb +49 -0
- data/lib/temporalio/api/operatorservice/v1/service.rb +23 -0
- data/lib/temporalio/api/operatorservice.rb +3 -0
- data/lib/temporalio/api/protocol/v1/message.rb +23 -0
- data/lib/temporalio/api/query/v1/message.rb +27 -0
- data/lib/temporalio/api/replication/v1/message.rb +26 -0
- data/lib/temporalio/api/schedule/v1/message.rb +42 -0
- data/lib/temporalio/api/sdk/v1/enhanced_stack_trace.rb +25 -0
- data/lib/temporalio/api/sdk/v1/task_complete_metadata.rb +21 -0
- data/lib/temporalio/api/sdk/v1/user_metadata.rb +23 -0
- data/lib/temporalio/api/sdk/v1/workflow_metadata.rb +23 -0
- data/lib/temporalio/api/taskqueue/v1/message.rb +45 -0
- data/lib/temporalio/api/update/v1/message.rb +33 -0
- data/lib/temporalio/api/version/v1/message.rb +26 -0
- data/lib/temporalio/api/workflow/v1/message.rb +43 -0
- data/lib/temporalio/api/workflowservice/v1/request_response.rb +189 -0
- data/lib/temporalio/api/workflowservice/v1/service.rb +23 -0
- data/lib/temporalio/api/workflowservice.rb +3 -0
- data/lib/temporalio/api.rb +13 -0
- data/lib/temporalio/cancellation.rb +150 -0
- data/lib/temporalio/client/activity_id_reference.rb +32 -0
- data/lib/temporalio/client/async_activity_handle.rb +110 -0
- data/lib/temporalio/client/connection/cloud_service.rb +648 -0
- data/lib/temporalio/client/connection/operator_service.rb +249 -0
- data/lib/temporalio/client/connection/service.rb +41 -0
- data/lib/temporalio/client/connection/workflow_service.rb +1218 -0
- data/lib/temporalio/client/connection.rb +270 -0
- data/lib/temporalio/client/interceptor.rb +316 -0
- data/lib/temporalio/client/workflow_execution.rb +103 -0
- data/lib/temporalio/client/workflow_execution_count.rb +36 -0
- data/lib/temporalio/client/workflow_execution_status.rb +18 -0
- data/lib/temporalio/client/workflow_handle.rb +446 -0
- data/lib/temporalio/client/workflow_query_reject_condition.rb +14 -0
- data/lib/temporalio/client/workflow_update_handle.rb +67 -0
- data/lib/temporalio/client/workflow_update_wait_stage.rb +17 -0
- data/lib/temporalio/client.rb +404 -0
- data/lib/temporalio/common_enums.rb +24 -0
- data/lib/temporalio/converters/data_converter.rb +102 -0
- data/lib/temporalio/converters/failure_converter.rb +200 -0
- data/lib/temporalio/converters/payload_codec.rb +26 -0
- data/lib/temporalio/converters/payload_converter/binary_null.rb +34 -0
- data/lib/temporalio/converters/payload_converter/binary_plain.rb +35 -0
- data/lib/temporalio/converters/payload_converter/binary_protobuf.rb +42 -0
- data/lib/temporalio/converters/payload_converter/composite.rb +62 -0
- data/lib/temporalio/converters/payload_converter/encoding.rb +35 -0
- data/lib/temporalio/converters/payload_converter/json_plain.rb +44 -0
- data/lib/temporalio/converters/payload_converter/json_protobuf.rb +41 -0
- data/lib/temporalio/converters/payload_converter.rb +73 -0
- data/lib/temporalio/converters.rb +9 -0
- data/lib/temporalio/error/failure.rb +219 -0
- data/lib/temporalio/error.rb +147 -0
- data/lib/temporalio/internal/bridge/3.1/temporalio_bridge.so +0 -0
- data/lib/temporalio/internal/bridge/3.2/temporalio_bridge.so +0 -0
- data/lib/temporalio/internal/bridge/3.3/temporalio_bridge.so +0 -0
- data/lib/temporalio/internal/bridge/api/activity_result/activity_result.rb +34 -0
- data/lib/temporalio/internal/bridge/api/activity_task/activity_task.rb +31 -0
- data/lib/temporalio/internal/bridge/api/child_workflow/child_workflow.rb +33 -0
- data/lib/temporalio/internal/bridge/api/common/common.rb +26 -0
- data/lib/temporalio/internal/bridge/api/core_interface.rb +36 -0
- data/lib/temporalio/internal/bridge/api/external_data/external_data.rb +27 -0
- data/lib/temporalio/internal/bridge/api/workflow_activation/workflow_activation.rb +52 -0
- data/lib/temporalio/internal/bridge/api/workflow_commands/workflow_commands.rb +54 -0
- data/lib/temporalio/internal/bridge/api/workflow_completion/workflow_completion.rb +30 -0
- data/lib/temporalio/internal/bridge/api.rb +3 -0
- data/lib/temporalio/internal/bridge/client.rb +90 -0
- data/lib/temporalio/internal/bridge/runtime.rb +53 -0
- data/lib/temporalio/internal/bridge/testing.rb +46 -0
- data/lib/temporalio/internal/bridge/worker.rb +83 -0
- data/lib/temporalio/internal/bridge.rb +36 -0
- data/lib/temporalio/internal/client/implementation.rb +525 -0
- data/lib/temporalio/internal/proto_utils.rb +54 -0
- data/lib/temporalio/internal/worker/activity_worker.rb +345 -0
- data/lib/temporalio/internal/worker/multi_runner.rb +169 -0
- data/lib/temporalio/internal.rb +7 -0
- data/lib/temporalio/retry_policy.rb +51 -0
- data/lib/temporalio/runtime.rb +271 -0
- data/lib/temporalio/scoped_logger.rb +96 -0
- data/lib/temporalio/search_attributes.rb +300 -0
- data/lib/temporalio/testing/activity_environment.rb +132 -0
- data/lib/temporalio/testing/workflow_environment.rb +137 -0
- data/lib/temporalio/testing.rb +10 -0
- data/lib/temporalio/version.rb +5 -0
- data/lib/temporalio/worker/activity_executor/fiber.rb +49 -0
- data/lib/temporalio/worker/activity_executor/thread_pool.rb +254 -0
- data/lib/temporalio/worker/activity_executor.rb +55 -0
- data/lib/temporalio/worker/interceptor.rb +88 -0
- data/lib/temporalio/worker/tuner.rb +151 -0
- data/lib/temporalio/worker.rb +426 -0
- data/lib/temporalio/workflow_history.rb +22 -0
- data/lib/temporalio.rb +7 -0
- data/temporalio.gemspec +28 -0
- metadata +189 -0
@@ -0,0 +1,219 @@
|
|
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] 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
|
+
# Create an application error.
|
50
|
+
#
|
51
|
+
# @param message [String] Error message.
|
52
|
+
# @param details [Array<Object, nil>] Error details.
|
53
|
+
# @param type [String, nil] Error type.
|
54
|
+
# @param non_retryable [Boolean] Whether this error should be considered non-retryable.
|
55
|
+
# @param next_retry_delay [Float, nil] Specific amount of time to delay before next retry.
|
56
|
+
def initialize(message, *details, type: nil, non_retryable: false, next_retry_delay: nil)
|
57
|
+
super(message)
|
58
|
+
@details = details
|
59
|
+
@type = type
|
60
|
+
@non_retryable = non_retryable
|
61
|
+
@next_retry_delay = next_retry_delay
|
62
|
+
end
|
63
|
+
|
64
|
+
# @return [Boolean] Inverse of {non_retryable}.
|
65
|
+
def retryable?
|
66
|
+
!@non_retryable
|
67
|
+
end
|
68
|
+
end
|
69
|
+
|
70
|
+
# Error raised on workflow/activity cancellation.
|
71
|
+
class CanceledError < Failure
|
72
|
+
attr_reader :details
|
73
|
+
|
74
|
+
# @!visibility private
|
75
|
+
def initialize(message, details: [])
|
76
|
+
super(message)
|
77
|
+
@details = details
|
78
|
+
end
|
79
|
+
end
|
80
|
+
|
81
|
+
# Error raised on workflow termination.
|
82
|
+
class TerminatedError < Failure
|
83
|
+
# @return [Array<Object?>] User-defined details on the error.
|
84
|
+
attr_reader :details
|
85
|
+
|
86
|
+
# @!visibility private
|
87
|
+
def initialize(message, details:)
|
88
|
+
super(message)
|
89
|
+
@details = details
|
90
|
+
end
|
91
|
+
end
|
92
|
+
|
93
|
+
# Error raised on workflow/activity timeout.
|
94
|
+
class TimeoutError < Failure
|
95
|
+
# @return [TimeoutType] Type of timeout error.
|
96
|
+
attr_reader :type
|
97
|
+
|
98
|
+
# @return [Array<Object>] Last heartbeat details if this is for an activity heartbeat.
|
99
|
+
attr_reader :last_heartbeat_details
|
100
|
+
|
101
|
+
# @!visibility private
|
102
|
+
def initialize(message, type:, last_heartbeat_details:)
|
103
|
+
super(message)
|
104
|
+
@type = type
|
105
|
+
@last_heartbeat_details = last_heartbeat_details
|
106
|
+
end
|
107
|
+
|
108
|
+
# Type of timeout error.
|
109
|
+
module TimeoutType
|
110
|
+
START_TO_CLOSE = Api::Enums::V1::TimeoutType::TIMEOUT_TYPE_START_TO_CLOSE
|
111
|
+
SCHEDULE_TO_START = Api::Enums::V1::TimeoutType::TIMEOUT_TYPE_SCHEDULE_TO_START
|
112
|
+
SCHEDULE_TO_CLOSE = Api::Enums::V1::TimeoutType::TIMEOUT_TYPE_SCHEDULE_TO_CLOSE
|
113
|
+
HEARTBEAT = Api::Enums::V1::TimeoutType::TIMEOUT_TYPE_HEARTBEAT
|
114
|
+
end
|
115
|
+
end
|
116
|
+
|
117
|
+
# Error originating in the Temporal server.
|
118
|
+
class ServerError < Failure
|
119
|
+
# @return [Boolean] Whether this error is non-retryable.
|
120
|
+
attr_reader :non_retryable
|
121
|
+
|
122
|
+
# @!visibility private
|
123
|
+
def initialize(message, non_retryable:)
|
124
|
+
super(message)
|
125
|
+
@non_retryable = non_retryable
|
126
|
+
end
|
127
|
+
|
128
|
+
# @return [Boolean] Inverse of {non_retryable}.
|
129
|
+
def retryable?
|
130
|
+
!@non_retryable
|
131
|
+
end
|
132
|
+
end
|
133
|
+
|
134
|
+
# Current retry state of the workflow/activity during error.
|
135
|
+
module RetryState
|
136
|
+
IN_PROGRESS = Api::Enums::V1::RetryState::RETRY_STATE_IN_PROGRESS
|
137
|
+
NON_RETRYABLE_FAILURE = Api::Enums::V1::RetryState::RETRY_STATE_NON_RETRYABLE_FAILURE
|
138
|
+
TIMEOUT = Api::Enums::V1::RetryState::RETRY_STATE_TIMEOUT
|
139
|
+
MAXIMUM_ATTEMPTS_REACHED = Api::Enums::V1::RetryState::RETRY_STATE_MAXIMUM_ATTEMPTS_REACHED
|
140
|
+
RETRY_POLICY_NOT_SET = Api::Enums::V1::RetryState::RETRY_STATE_RETRY_POLICY_NOT_SET
|
141
|
+
INTERNAL_SERVER_ERROR = Api::Enums::V1::RetryState::RETRY_STATE_INTERNAL_SERVER_ERROR
|
142
|
+
CANCEL_REQUESTED = Api::Enums::V1::RetryState::RETRY_STATE_CANCEL_REQUESTED
|
143
|
+
end
|
144
|
+
|
145
|
+
# Error raised on activity failure.
|
146
|
+
class ActivityError < Failure
|
147
|
+
# @return [Integer] Scheduled event ID for this activity.
|
148
|
+
attr_reader :scheduled_event_id
|
149
|
+
# @return [Integer] Started event ID for this activity.
|
150
|
+
attr_reader :started_event_id
|
151
|
+
# @return [String] Client/worker identity.
|
152
|
+
attr_reader :identity
|
153
|
+
# @return [String] Activity type name.
|
154
|
+
attr_reader :activity_type
|
155
|
+
# @return [String] Activity ID.
|
156
|
+
attr_reader :activity_id
|
157
|
+
# @return [RetryState, nil] Retry state.
|
158
|
+
attr_reader :retry_state
|
159
|
+
|
160
|
+
# @!visibility private
|
161
|
+
def initialize(
|
162
|
+
message,
|
163
|
+
scheduled_event_id:,
|
164
|
+
started_event_id:,
|
165
|
+
identity:,
|
166
|
+
activity_type:,
|
167
|
+
activity_id:,
|
168
|
+
retry_state:
|
169
|
+
)
|
170
|
+
super(message)
|
171
|
+
@scheduled_event_id = scheduled_event_id
|
172
|
+
@started_event_id = started_event_id
|
173
|
+
@identity = identity
|
174
|
+
@activity_type = activity_type
|
175
|
+
@activity_id = activity_id
|
176
|
+
@retry_state = retry_state
|
177
|
+
end
|
178
|
+
end
|
179
|
+
|
180
|
+
# Error raised on child workflow failure.
|
181
|
+
class ChildWorkflowError < Failure
|
182
|
+
# @return [String] Child workflow namespace.
|
183
|
+
attr_reader :namespace
|
184
|
+
# @return [String] Child workflow ID.
|
185
|
+
attr_reader :workflow_id
|
186
|
+
# @return [String] Child workflow run ID.
|
187
|
+
attr_reader :run_id
|
188
|
+
# @return [String] Child workflow type name.
|
189
|
+
attr_reader :workflow_type
|
190
|
+
# @return [Integer] Child workflow initiated event ID.
|
191
|
+
attr_reader :initiated_event_id
|
192
|
+
# @return [Integer] Child workflow started event ID.
|
193
|
+
attr_reader :started_event_id
|
194
|
+
# @return [RetryState, nil] Retry state.
|
195
|
+
attr_reader :retry_state
|
196
|
+
|
197
|
+
# @!visibility private
|
198
|
+
def initialize(
|
199
|
+
message,
|
200
|
+
namespace:,
|
201
|
+
workflow_id:,
|
202
|
+
run_id:,
|
203
|
+
workflow_type:,
|
204
|
+
initiated_event_id:,
|
205
|
+
started_event_id:,
|
206
|
+
retry_state:
|
207
|
+
)
|
208
|
+
super(message)
|
209
|
+
@namespace = namespace
|
210
|
+
@workflow_id = workflow_id
|
211
|
+
@run_id = run_id
|
212
|
+
@workflow_type = workflow_type
|
213
|
+
@initiated_event_id = initiated_event_id
|
214
|
+
@started_event_id = started_event_id
|
215
|
+
@retry_state = retry_state
|
216
|
+
end
|
217
|
+
end
|
218
|
+
end
|
219
|
+
end
|
@@ -0,0 +1,147 @@
|
|
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)
|
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
|
39
|
+
super('Workflow failed')
|
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 that occurs when an async activity handle tries to heartbeat and the activity is marked as canceled.
|
91
|
+
class AsyncActivityCanceledError < Error
|
92
|
+
# @!visibility private
|
93
|
+
def initialize
|
94
|
+
super('Activity canceled')
|
95
|
+
end
|
96
|
+
end
|
97
|
+
|
98
|
+
# Error raised by a client for a general RPC failure.
|
99
|
+
class RPCError < Error
|
100
|
+
# @return [Code] Status code for the error.
|
101
|
+
attr_reader :code
|
102
|
+
|
103
|
+
# @!visibility private
|
104
|
+
def initialize(message, code:, raw_grpc_status:)
|
105
|
+
super(message)
|
106
|
+
@code = code
|
107
|
+
@raw_grpc_status = raw_grpc_status
|
108
|
+
end
|
109
|
+
|
110
|
+
# @return [Api::Common::V1::GrpcStatus] Status of the gRPC call with details.
|
111
|
+
def grpc_status
|
112
|
+
@grpc_status ||= create_grpc_status
|
113
|
+
end
|
114
|
+
|
115
|
+
private
|
116
|
+
|
117
|
+
def create_grpc_status
|
118
|
+
return Api::Common::V1::GrpcStatus.new(code: @code) unless @raw_grpc_status
|
119
|
+
|
120
|
+
Api::Common::V1::GrpcStatus.decode(@raw_grpc_status)
|
121
|
+
end
|
122
|
+
|
123
|
+
# Status code for RPC errors. These are gRPC status codes.
|
124
|
+
module Code
|
125
|
+
OK = 0
|
126
|
+
CANCELED = 1 # Intentionally one-L while gRPC is two-L
|
127
|
+
UNKNOWN = 2
|
128
|
+
INVALID_ARGUMENT = 3
|
129
|
+
DEADLINE_EXCEEDED = 4
|
130
|
+
NOT_FOUND = 5
|
131
|
+
ALREADY_EXISTS = 6
|
132
|
+
PERMISSION_DENIED = 7
|
133
|
+
RESOURCE_EXHAUSTED = 8
|
134
|
+
FAILED_PRECONDITION = 9
|
135
|
+
ABORTED = 10
|
136
|
+
OUT_OF_RANGE = 11
|
137
|
+
UNIMPLEMENTED = 12
|
138
|
+
INTERNAL = 13
|
139
|
+
UNAVAILABLE = 14
|
140
|
+
DATA_LOSS = 15
|
141
|
+
UNAUTHENTICATED = 16
|
142
|
+
end
|
143
|
+
end
|
144
|
+
end
|
145
|
+
end
|
146
|
+
|
147
|
+
require 'temporalio/error/failure'
|
Binary file
|
Binary file
|
Binary file
|
@@ -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,31 @@
|
|
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\"\xed\x06\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\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\"E\n\x06\x43\x61ncel\x12;\n\x06reason\x18\x01 \x01(\x0e\x32+.coresdk.activity_task.ActivityCancelReason*X\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\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
|
+
ActivityCancelReason = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("coresdk.activity_task.ActivityCancelReason").enummodule
|
27
|
+
end
|
28
|
+
end
|
29
|
+
end
|
30
|
+
end
|
31
|
+
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,26 @@
|
|
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*@\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
|
+
VersioningIntent = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("coresdk.common.VersioningIntent").enummodule
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
@@ -0,0 +1,36 @@
|
|
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.ActivityExecutionResultB3\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
|
+
end
|
33
|
+
end
|
34
|
+
end
|
35
|
+
end
|
36
|
+
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,52 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
3
|
+
# source: temporal/sdk/core/workflow_activation/workflow_activation.proto
|
4
|
+
|
5
|
+
require 'google/protobuf'
|
6
|
+
|
7
|
+
require 'google/protobuf/timestamp_pb'
|
8
|
+
require 'google/protobuf/duration_pb'
|
9
|
+
require 'temporalio/api/failure/v1/message'
|
10
|
+
require 'temporalio/api/update/v1/message'
|
11
|
+
require 'temporalio/api/common/v1/message'
|
12
|
+
require 'temporalio/api/enums/v1/workflow'
|
13
|
+
require 'temporalio/internal/bridge/api/activity_result/activity_result'
|
14
|
+
require 'temporalio/internal/bridge/api/child_workflow/child_workflow'
|
15
|
+
require 'temporalio/internal/bridge/api/common/common'
|
16
|
+
|
17
|
+
|
18
|
+
descriptor_data = "\n?temporal/sdk/core/workflow_activation/workflow_activation.proto\x12\x1b\x63oresdk.workflow_activation\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x1egoogle/protobuf/duration.proto\x1a%temporal/api/failure/v1/message.proto\x1a$temporal/api/update/v1/message.proto\x1a$temporal/api/common/v1/message.proto\x1a$temporal/api/enums/v1/workflow.proto\x1a\x37temporal/sdk/core/activity_result/activity_result.proto\x1a\x35temporal/sdk/core/child_workflow/child_workflow.proto\x1a%temporal/sdk/core/common/common.proto\"\xc7\x02\n\x12WorkflowActivation\x12\x0e\n\x06run_id\x18\x01 \x01(\t\x12-\n\ttimestamp\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x14\n\x0cis_replaying\x18\x03 \x01(\x08\x12\x16\n\x0ehistory_length\x18\x04 \x01(\r\x12@\n\x04jobs\x18\x05 \x03(\x0b\x32\x32.coresdk.workflow_activation.WorkflowActivationJob\x12 \n\x18\x61vailable_internal_flags\x18\x06 \x03(\r\x12\x1a\n\x12history_size_bytes\x18\x07 \x01(\x04\x12!\n\x19\x63ontinue_as_new_suggested\x18\x08 \x01(\x08\x12!\n\x19\x62uild_id_for_current_task\x18\t \x01(\t\"\xa7\t\n\x15WorkflowActivationJob\x12N\n\x13initialize_workflow\x18\x01 \x01(\x0b\x32/.coresdk.workflow_activation.InitializeWorkflowH\x00\x12<\n\nfire_timer\x18\x02 \x01(\x0b\x32&.coresdk.workflow_activation.FireTimerH\x00\x12K\n\x12update_random_seed\x18\x04 \x01(\x0b\x32-.coresdk.workflow_activation.UpdateRandomSeedH\x00\x12\x44\n\x0equery_workflow\x18\x05 \x01(\x0b\x32*.coresdk.workflow_activation.QueryWorkflowH\x00\x12\x46\n\x0f\x63\x61ncel_workflow\x18\x06 \x01(\x0b\x32+.coresdk.workflow_activation.CancelWorkflowH\x00\x12\x46\n\x0fsignal_workflow\x18\x07 \x01(\x0b\x32+.coresdk.workflow_activation.SignalWorkflowH\x00\x12H\n\x10resolve_activity\x18\x08 \x01(\x0b\x32,.coresdk.workflow_activation.ResolveActivityH\x00\x12G\n\x10notify_has_patch\x18\t \x01(\x0b\x32+.coresdk.workflow_activation.NotifyHasPatchH\x00\x12q\n&resolve_child_workflow_execution_start\x18\n \x01(\x0b\x32?.coresdk.workflow_activation.ResolveChildWorkflowExecutionStartH\x00\x12\x66\n resolve_child_workflow_execution\x18\x0b \x01(\x0b\x32:.coresdk.workflow_activation.ResolveChildWorkflowExecutionH\x00\x12\x66\n resolve_signal_external_workflow\x18\x0c \x01(\x0b\x32:.coresdk.workflow_activation.ResolveSignalExternalWorkflowH\x00\x12u\n(resolve_request_cancel_external_workflow\x18\r \x01(\x0b\x32\x41.coresdk.workflow_activation.ResolveRequestCancelExternalWorkflowH\x00\x12:\n\tdo_update\x18\x0e \x01(\x0b\x32%.coresdk.workflow_activation.DoUpdateH\x00\x12I\n\x11remove_from_cache\x18\x32 \x01(\x0b\x32,.coresdk.workflow_activation.RemoveFromCacheH\x00\x42\t\n\x07variant\"\xe3\t\n\x12InitializeWorkflow\x12\x15\n\rworkflow_type\x18\x01 \x01(\t\x12\x13\n\x0bworkflow_id\x18\x02 \x01(\t\x12\x32\n\targuments\x18\x03 \x03(\x0b\x32\x1f.temporal.api.common.v1.Payload\x12\x17\n\x0frandomness_seed\x18\x04 \x01(\x04\x12M\n\x07headers\x18\x05 \x03(\x0b\x32<.coresdk.workflow_activation.InitializeWorkflow.HeadersEntry\x12\x10\n\x08identity\x18\x06 \x01(\t\x12I\n\x14parent_workflow_info\x18\x07 \x01(\x0b\x32+.coresdk.common.NamespacedWorkflowExecution\x12=\n\x1aworkflow_execution_timeout\x18\x08 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x37\n\x14workflow_run_timeout\x18\t \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x38\n\x15workflow_task_timeout\x18\n \x01(\x0b\x32\x19.google.protobuf.Duration\x12\'\n\x1f\x63ontinued_from_execution_run_id\x18\x0b \x01(\t\x12J\n\x13\x63ontinued_initiator\x18\x0c \x01(\x0e\x32-.temporal.api.enums.v1.ContinueAsNewInitiator\x12;\n\x11\x63ontinued_failure\x18\r \x01(\x0b\x32 .temporal.api.failure.v1.Failure\x12@\n\x16last_completion_result\x18\x0e \x01(\x0b\x32 .temporal.api.common.v1.Payloads\x12\x1e\n\x16\x66irst_execution_run_id\x18\x0f \x01(\t\x12\x39\n\x0cretry_policy\x18\x10 \x01(\x0b\x32#.temporal.api.common.v1.RetryPolicy\x12\x0f\n\x07\x61ttempt\x18\x11 \x01(\x05\x12\x15\n\rcron_schedule\x18\x12 \x01(\t\x12\x46\n\"workflow_execution_expiration_time\x18\x13 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x45\n\"cron_schedule_to_schedule_interval\x18\x14 \x01(\x0b\x32\x19.google.protobuf.Duration\x12*\n\x04memo\x18\x15 \x01(\x0b\x32\x1c.temporal.api.common.v1.Memo\x12\x43\n\x11search_attributes\x18\x16 \x01(\x0b\x32(.temporal.api.common.v1.SearchAttributes\x12.\n\nstart_time\x18\x17 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x1aO\n\x0cHeadersEntry\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\"\x18\n\tFireTimer\x12\x0b\n\x03seq\x18\x01 \x01(\r\"m\n\x0fResolveActivity\x12\x0b\n\x03seq\x18\x01 \x01(\r\x12;\n\x06result\x18\x02 \x01(\x0b\x32+.coresdk.activity_result.ActivityResolution\x12\x10\n\x08is_local\x18\x03 \x01(\x08\"\xd1\x02\n\"ResolveChildWorkflowExecutionStart\x12\x0b\n\x03seq\x18\x01 \x01(\r\x12[\n\tsucceeded\x18\x02 \x01(\x0b\x32\x46.coresdk.workflow_activation.ResolveChildWorkflowExecutionStartSuccessH\x00\x12X\n\x06\x66\x61iled\x18\x03 \x01(\x0b\x32\x46.coresdk.workflow_activation.ResolveChildWorkflowExecutionStartFailureH\x00\x12]\n\tcancelled\x18\x04 \x01(\x0b\x32H.coresdk.workflow_activation.ResolveChildWorkflowExecutionStartCancelledH\x00\x42\x08\n\x06status\";\n)ResolveChildWorkflowExecutionStartSuccess\x12\x0e\n\x06run_id\x18\x01 \x01(\t\"\xa6\x01\n)ResolveChildWorkflowExecutionStartFailure\x12\x13\n\x0bworkflow_id\x18\x01 \x01(\t\x12\x15\n\rworkflow_type\x18\x02 \x01(\t\x12M\n\x05\x63\x61use\x18\x03 \x01(\x0e\x32>.coresdk.child_workflow.StartChildWorkflowExecutionFailedCause\"`\n+ResolveChildWorkflowExecutionStartCancelled\x12\x31\n\x07\x66\x61ilure\x18\x01 \x01(\x0b\x32 .temporal.api.failure.v1.Failure\"i\n\x1dResolveChildWorkflowExecution\x12\x0b\n\x03seq\x18\x01 \x01(\r\x12;\n\x06result\x18\x02 \x01(\x0b\x32+.coresdk.child_workflow.ChildWorkflowResult\"+\n\x10UpdateRandomSeed\x12\x17\n\x0frandomness_seed\x18\x01 \x01(\x04\"\x84\x02\n\rQueryWorkflow\x12\x10\n\x08query_id\x18\x01 \x01(\t\x12\x12\n\nquery_type\x18\x02 \x01(\t\x12\x32\n\targuments\x18\x03 \x03(\x0b\x32\x1f.temporal.api.common.v1.Payload\x12H\n\x07headers\x18\x05 \x03(\x0b\x32\x37.coresdk.workflow_activation.QueryWorkflow.HeadersEntry\x1aO\n\x0cHeadersEntry\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\"B\n\x0e\x43\x61ncelWorkflow\x12\x30\n\x07\x64\x65tails\x18\x01 \x03(\x0b\x32\x1f.temporal.api.common.v1.Payload\"\x83\x02\n\x0eSignalWorkflow\x12\x13\n\x0bsignal_name\x18\x01 \x01(\t\x12.\n\x05input\x18\x02 \x03(\x0b\x32\x1f.temporal.api.common.v1.Payload\x12\x10\n\x08identity\x18\x03 \x01(\t\x12I\n\x07headers\x18\x05 \x03(\x0b\x32\x38.coresdk.workflow_activation.SignalWorkflow.HeadersEntry\x1aO\n\x0cHeadersEntry\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\"\"\n\x0eNotifyHasPatch\x12\x10\n\x08patch_id\x18\x01 \x01(\t\"_\n\x1dResolveSignalExternalWorkflow\x12\x0b\n\x03seq\x18\x01 \x01(\r\x12\x31\n\x07\x66\x61ilure\x18\x02 \x01(\x0b\x32 .temporal.api.failure.v1.Failure\"f\n$ResolveRequestCancelExternalWorkflow\x12\x0b\n\x03seq\x18\x01 \x01(\r\x12\x31\n\x07\x66\x61ilure\x18\x02 \x01(\x0b\x32 .temporal.api.failure.v1.Failure\"\xcb\x02\n\x08\x44oUpdate\x12\n\n\x02id\x18\x01 \x01(\t\x12\x1c\n\x14protocol_instance_id\x18\x02 \x01(\t\x12\x0c\n\x04name\x18\x03 \x01(\t\x12.\n\x05input\x18\x04 \x03(\x0b\x32\x1f.temporal.api.common.v1.Payload\x12\x43\n\x07headers\x18\x05 \x03(\x0b\x32\x32.coresdk.workflow_activation.DoUpdate.HeadersEntry\x12*\n\x04meta\x18\x06 \x01(\x0b\x32\x1c.temporal.api.update.v1.Meta\x12\x15\n\rrun_validator\x18\x07 \x01(\x08\x1aO\n\x0cHeadersEntry\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\"\xc1\x02\n\x0fRemoveFromCache\x12\x0f\n\x07message\x18\x01 \x01(\t\x12K\n\x06reason\x18\x02 \x01(\x0e\x32;.coresdk.workflow_activation.RemoveFromCache.EvictionReason\"\xcf\x01\n\x0e\x45victionReason\x12\x0f\n\x0bUNSPECIFIED\x10\x00\x12\x0e\n\nCACHE_FULL\x10\x01\x12\x0e\n\nCACHE_MISS\x10\x02\x12\x12\n\x0eNONDETERMINISM\x10\x03\x12\r\n\tLANG_FAIL\x10\x04\x12\x12\n\x0eLANG_REQUESTED\x10\x05\x12\x12\n\x0eTASK_NOT_FOUND\x10\x06\x12\x15\n\x11UNHANDLED_COMMAND\x10\x07\x12\t\n\x05\x46\x41TAL\x10\x08\x12\x1f\n\x1bPAGINATION_OR_HISTORY_FETCH\x10\tB8\xea\x02\x35Temporalio::Internal::Bridge::Api::WorkflowActivationb\x06proto3"
|
19
|
+
|
20
|
+
pool = Google::Protobuf::DescriptorPool.generated_pool
|
21
|
+
pool.add_serialized_file(descriptor_data)
|
22
|
+
|
23
|
+
module Temporalio
|
24
|
+
module Internal
|
25
|
+
module Bridge
|
26
|
+
module Api
|
27
|
+
module WorkflowActivation
|
28
|
+
WorkflowActivation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("coresdk.workflow_activation.WorkflowActivation").msgclass
|
29
|
+
WorkflowActivationJob = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("coresdk.workflow_activation.WorkflowActivationJob").msgclass
|
30
|
+
InitializeWorkflow = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("coresdk.workflow_activation.InitializeWorkflow").msgclass
|
31
|
+
FireTimer = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("coresdk.workflow_activation.FireTimer").msgclass
|
32
|
+
ResolveActivity = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("coresdk.workflow_activation.ResolveActivity").msgclass
|
33
|
+
ResolveChildWorkflowExecutionStart = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("coresdk.workflow_activation.ResolveChildWorkflowExecutionStart").msgclass
|
34
|
+
ResolveChildWorkflowExecutionStartSuccess = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("coresdk.workflow_activation.ResolveChildWorkflowExecutionStartSuccess").msgclass
|
35
|
+
ResolveChildWorkflowExecutionStartFailure = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("coresdk.workflow_activation.ResolveChildWorkflowExecutionStartFailure").msgclass
|
36
|
+
ResolveChildWorkflowExecutionStartCancelled = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("coresdk.workflow_activation.ResolveChildWorkflowExecutionStartCancelled").msgclass
|
37
|
+
ResolveChildWorkflowExecution = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("coresdk.workflow_activation.ResolveChildWorkflowExecution").msgclass
|
38
|
+
UpdateRandomSeed = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("coresdk.workflow_activation.UpdateRandomSeed").msgclass
|
39
|
+
QueryWorkflow = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("coresdk.workflow_activation.QueryWorkflow").msgclass
|
40
|
+
CancelWorkflow = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("coresdk.workflow_activation.CancelWorkflow").msgclass
|
41
|
+
SignalWorkflow = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("coresdk.workflow_activation.SignalWorkflow").msgclass
|
42
|
+
NotifyHasPatch = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("coresdk.workflow_activation.NotifyHasPatch").msgclass
|
43
|
+
ResolveSignalExternalWorkflow = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("coresdk.workflow_activation.ResolveSignalExternalWorkflow").msgclass
|
44
|
+
ResolveRequestCancelExternalWorkflow = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("coresdk.workflow_activation.ResolveRequestCancelExternalWorkflow").msgclass
|
45
|
+
DoUpdate = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("coresdk.workflow_activation.DoUpdate").msgclass
|
46
|
+
RemoveFromCache = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("coresdk.workflow_activation.RemoveFromCache").msgclass
|
47
|
+
RemoveFromCache::EvictionReason = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("coresdk.workflow_activation.RemoveFromCache.EvictionReason").enummodule
|
48
|
+
end
|
49
|
+
end
|
50
|
+
end
|
51
|
+
end
|
52
|
+
end
|