amit-temporalio 0.3.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.
- checksums.yaml +7 -0
- data/.yardopts +2 -0
- data/Gemfile +23 -0
- data/Rakefile +101 -0
- data/lib/temporalio/activity/complete_async_error.rb +11 -0
- data/lib/temporalio/activity/context.rb +116 -0
- data/lib/temporalio/activity/definition.rb +189 -0
- data/lib/temporalio/activity/info.rb +64 -0
- data/lib/temporalio/activity.rb +12 -0
- data/lib/temporalio/api/activity/v1/message.rb +25 -0
- data/lib/temporalio/api/batch/v1/message.rb +31 -0
- data/lib/temporalio/api/cloud/account/v1/message.rb +28 -0
- data/lib/temporalio/api/cloud/cloudservice/v1/request_response.rb +126 -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 +41 -0
- data/lib/temporalio/api/cloud/namespace/v1/message.rb +42 -0
- data/lib/temporalio/api/cloud/nexus/v1/message.rb +31 -0
- data/lib/temporalio/api/cloud/operation/v1/message.rb +28 -0
- data/lib/temporalio/api/cloud/region/v1/message.rb +24 -0
- data/lib/temporalio/api/cloud/resource/v1/message.rb +23 -0
- data/lib/temporalio/api/cloud/sink/v1/message.rb +24 -0
- data/lib/temporalio/api/cloud/usage/v1/message.rb +31 -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 +47 -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/payload_visitor.rb +1513 -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 +43 -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/testservice/v1/request_response.rb +31 -0
- data/lib/temporalio/api/testservice/v1/service.rb +23 -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 +204 -0
- data/lib/temporalio/api/workflowservice/v1/service.rb +23 -0
- data/lib/temporalio/api/workflowservice.rb +3 -0
- data/lib/temporalio/api.rb +14 -0
- data/lib/temporalio/cancellation.rb +170 -0
- data/lib/temporalio/client/activity_id_reference.rb +32 -0
- data/lib/temporalio/client/async_activity_handle.rb +85 -0
- data/lib/temporalio/client/connection/cloud_service.rb +726 -0
- data/lib/temporalio/client/connection/operator_service.rb +201 -0
- data/lib/temporalio/client/connection/service.rb +42 -0
- data/lib/temporalio/client/connection/test_service.rb +111 -0
- data/lib/temporalio/client/connection/workflow_service.rb +1041 -0
- data/lib/temporalio/client/connection.rb +316 -0
- data/lib/temporalio/client/interceptor.rb +416 -0
- data/lib/temporalio/client/schedule.rb +967 -0
- data/lib/temporalio/client/schedule_handle.rb +126 -0
- data/lib/temporalio/client/workflow_execution.rb +100 -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 +389 -0
- data/lib/temporalio/client/workflow_query_reject_condition.rb +14 -0
- data/lib/temporalio/client/workflow_update_handle.rb +65 -0
- data/lib/temporalio/client/workflow_update_wait_stage.rb +17 -0
- data/lib/temporalio/client.rb +484 -0
- data/lib/temporalio/common_enums.rb +41 -0
- data/lib/temporalio/converters/data_converter.rb +99 -0
- data/lib/temporalio/converters/failure_converter.rb +202 -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 +66 -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 +71 -0
- data/lib/temporalio/converters/raw_value.rb +20 -0
- data/lib/temporalio/converters.rb +9 -0
- data/lib/temporalio/error/failure.rb +219 -0
- data/lib/temporalio/error.rb +155 -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 +40 -0
- data/lib/temporalio/internal/bridge/api/external_data/external_data.rb +27 -0
- data/lib/temporalio/internal/bridge/api/nexus/nexus.rb +33 -0
- data/lib/temporalio/internal/bridge/api/workflow_activation/workflow_activation.rb +56 -0
- data/lib/temporalio/internal/bridge/api/workflow_commands/workflow_commands.rb +57 -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 +95 -0
- data/lib/temporalio/internal/bridge/runtime.rb +53 -0
- data/lib/temporalio/internal/bridge/temporalio_bridge.so +0 -0
- data/lib/temporalio/internal/bridge/testing.rb +66 -0
- data/lib/temporalio/internal/bridge/worker.rb +85 -0
- data/lib/temporalio/internal/bridge.rb +36 -0
- data/lib/temporalio/internal/client/implementation.rb +700 -0
- data/lib/temporalio/internal/metric.rb +122 -0
- data/lib/temporalio/internal/proto_utils.rb +133 -0
- data/lib/temporalio/internal/worker/activity_worker.rb +376 -0
- data/lib/temporalio/internal/worker/multi_runner.rb +213 -0
- data/lib/temporalio/internal/worker/workflow_instance/child_workflow_handle.rb +54 -0
- data/lib/temporalio/internal/worker/workflow_instance/context.rb +333 -0
- data/lib/temporalio/internal/worker/workflow_instance/details.rb +44 -0
- data/lib/temporalio/internal/worker/workflow_instance/external_workflow_handle.rb +32 -0
- data/lib/temporalio/internal/worker/workflow_instance/externally_immutable_hash.rb +22 -0
- data/lib/temporalio/internal/worker/workflow_instance/handler_execution.rb +25 -0
- data/lib/temporalio/internal/worker/workflow_instance/handler_hash.rb +41 -0
- data/lib/temporalio/internal/worker/workflow_instance/illegal_call_tracer.rb +97 -0
- data/lib/temporalio/internal/worker/workflow_instance/inbound_implementation.rb +62 -0
- data/lib/temporalio/internal/worker/workflow_instance/outbound_implementation.rb +415 -0
- data/lib/temporalio/internal/worker/workflow_instance/replay_safe_logger.rb +37 -0
- data/lib/temporalio/internal/worker/workflow_instance/replay_safe_metric.rb +40 -0
- data/lib/temporalio/internal/worker/workflow_instance/scheduler.rb +163 -0
- data/lib/temporalio/internal/worker/workflow_instance.rb +730 -0
- data/lib/temporalio/internal/worker/workflow_worker.rb +236 -0
- data/lib/temporalio/internal.rb +7 -0
- data/lib/temporalio/metric.rb +109 -0
- data/lib/temporalio/retry_policy.rb +74 -0
- data/lib/temporalio/runtime.rb +314 -0
- data/lib/temporalio/scoped_logger.rb +96 -0
- data/lib/temporalio/search_attributes.rb +343 -0
- data/lib/temporalio/testing/activity_environment.rb +136 -0
- data/lib/temporalio/testing/workflow_environment.rb +383 -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 +46 -0
- data/lib/temporalio/worker/activity_executor.rb +55 -0
- data/lib/temporalio/worker/interceptor.rb +362 -0
- data/lib/temporalio/worker/thread_pool.rb +237 -0
- data/lib/temporalio/worker/tuner.rb +189 -0
- data/lib/temporalio/worker/workflow_executor/thread_pool.rb +230 -0
- data/lib/temporalio/worker/workflow_executor.rb +26 -0
- data/lib/temporalio/worker/workflow_replayer.rb +343 -0
- data/lib/temporalio/worker.rb +569 -0
- data/lib/temporalio/workflow/activity_cancellation_type.rb +20 -0
- data/lib/temporalio/workflow/child_workflow_cancellation_type.rb +21 -0
- data/lib/temporalio/workflow/child_workflow_handle.rb +43 -0
- data/lib/temporalio/workflow/definition.rb +566 -0
- data/lib/temporalio/workflow/external_workflow_handle.rb +41 -0
- data/lib/temporalio/workflow/future.rb +151 -0
- data/lib/temporalio/workflow/handler_unfinished_policy.rb +13 -0
- data/lib/temporalio/workflow/info.rb +82 -0
- data/lib/temporalio/workflow/parent_close_policy.rb +19 -0
- data/lib/temporalio/workflow/update_info.rb +20 -0
- data/lib/temporalio/workflow.rb +529 -0
- data/lib/temporalio/workflow_history.rb +47 -0
- data/lib/temporalio.rb +11 -0
- data/temporalio.gemspec +28 -0
- metadata +236 -0
@@ -0,0 +1,71 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'temporalio/converters/payload_converter/binary_null'
|
4
|
+
require 'temporalio/converters/payload_converter/binary_plain'
|
5
|
+
require 'temporalio/converters/payload_converter/binary_protobuf'
|
6
|
+
require 'temporalio/converters/payload_converter/composite'
|
7
|
+
require 'temporalio/converters/payload_converter/json_plain'
|
8
|
+
require 'temporalio/converters/payload_converter/json_protobuf'
|
9
|
+
|
10
|
+
module Temporalio
|
11
|
+
module Converters
|
12
|
+
# Base class for converting Ruby values to/from Temporal payloads.
|
13
|
+
class PayloadConverter
|
14
|
+
# @return [PayloadConverter::Composite] Default payload converter.
|
15
|
+
def self.default
|
16
|
+
@default ||= new_with_defaults
|
17
|
+
end
|
18
|
+
|
19
|
+
# Create a new payload converter with the default set of encoding converters.
|
20
|
+
#
|
21
|
+
# @param json_parse_options [Hash] Options for {::JSON.parse}.
|
22
|
+
# @param json_generate_options [Hash] Options for {::JSON.generate}.
|
23
|
+
# @return [PayloadConverter::Composite] Created payload converter.
|
24
|
+
def self.new_with_defaults(json_parse_options: { create_additions: true }, json_generate_options: {})
|
25
|
+
PayloadConverter::Composite.new(
|
26
|
+
PayloadConverter::BinaryNull.new,
|
27
|
+
PayloadConverter::BinaryPlain.new,
|
28
|
+
PayloadConverter::JSONProtobuf.new,
|
29
|
+
PayloadConverter::BinaryProtobuf.new,
|
30
|
+
PayloadConverter::JSONPlain.new(parse_options: json_parse_options, generate_options: json_generate_options)
|
31
|
+
)
|
32
|
+
end
|
33
|
+
|
34
|
+
# Convert a Ruby value to a payload.
|
35
|
+
#
|
36
|
+
# @param value [Object] Ruby value.
|
37
|
+
# @return [Api::Common::V1::Payload] Converted payload.
|
38
|
+
def to_payload(value)
|
39
|
+
raise NotImplementedError
|
40
|
+
end
|
41
|
+
|
42
|
+
# Convert multiple Ruby values to a payload set.
|
43
|
+
#
|
44
|
+
# @param values [Object] Ruby values, converted to array via {::Array}.
|
45
|
+
# @return [Api::Common::V1::Payloads] Converted payload set.
|
46
|
+
def to_payloads(values)
|
47
|
+
Api::Common::V1::Payloads.new(
|
48
|
+
payloads: Array(values).map { |value| to_payload(value) }
|
49
|
+
)
|
50
|
+
end
|
51
|
+
|
52
|
+
# Convert a payload to a Ruby value.
|
53
|
+
#
|
54
|
+
# @param payload [Api::Common::V1::Payload] Payload.
|
55
|
+
# @return [Object] Converted Ruby value.
|
56
|
+
def from_payload(payload)
|
57
|
+
raise NotImplementedError
|
58
|
+
end
|
59
|
+
|
60
|
+
# Convert a payload set to Ruby values.
|
61
|
+
#
|
62
|
+
# @param payloads [Api::Common::V1::Payloads, nil] Payload set.
|
63
|
+
# @return [Array<Object>] Converted Ruby values.
|
64
|
+
def from_payloads(payloads)
|
65
|
+
return [] unless payloads
|
66
|
+
|
67
|
+
payloads.payloads.map { |payload| from_payload(payload) }
|
68
|
+
end
|
69
|
+
end
|
70
|
+
end
|
71
|
+
end
|
@@ -0,0 +1,20 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Temporalio
|
4
|
+
module Converters
|
5
|
+
# Raw value wrapper that has the raw payload. When raw args are configured at implementation time, the inbound
|
6
|
+
# arguments will be instances of this class. When instances of this class are sent outbound or returned from
|
7
|
+
# inbound calls, the raw payload will be serialized instead of applying traditional conversion.
|
8
|
+
class RawValue
|
9
|
+
# @return [Api::Common::V1::Payload] Payload.
|
10
|
+
attr_reader :payload
|
11
|
+
|
12
|
+
# Create a raw value.
|
13
|
+
#
|
14
|
+
# @param payload [Api::Common::V1::Payload] Payload.
|
15
|
+
def initialize(payload)
|
16
|
+
@payload = payload
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
@@ -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, 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
|
+
# 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,155 @@
|
|
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(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
|
+
|
128
|
+
Api::Common::V1::GrpcStatus.decode(@raw_grpc_status)
|
129
|
+
end
|
130
|
+
|
131
|
+
# Status code for RPC errors. These are gRPC status codes.
|
132
|
+
module Code
|
133
|
+
OK = 0
|
134
|
+
CANCELED = 1 # Intentionally one-L while gRPC is two-L
|
135
|
+
UNKNOWN = 2
|
136
|
+
INVALID_ARGUMENT = 3
|
137
|
+
DEADLINE_EXCEEDED = 4
|
138
|
+
NOT_FOUND = 5
|
139
|
+
ALREADY_EXISTS = 6
|
140
|
+
PERMISSION_DENIED = 7
|
141
|
+
RESOURCE_EXHAUSTED = 8
|
142
|
+
FAILED_PRECONDITION = 9
|
143
|
+
ABORTED = 10
|
144
|
+
OUT_OF_RANGE = 11
|
145
|
+
UNIMPLEMENTED = 12
|
146
|
+
INTERNAL = 13
|
147
|
+
UNAVAILABLE = 14
|
148
|
+
DATA_LOSS = 15
|
149
|
+
UNAUTHENTICATED = 16
|
150
|
+
end
|
151
|
+
end
|
152
|
+
end
|
153
|
+
end
|
154
|
+
|
155
|
+
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,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,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
|