temporal-ruby 0.0.0 → 0.0.1.pre.pre1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +19 -42
- data/lib/gen/temporal/api/command/v1/message_pb.rb +146 -0
- data/lib/gen/temporal/api/common/v1/message_pb.rb +67 -0
- data/lib/gen/temporal/api/enums/v1/command_type_pb.rb +35 -0
- data/lib/gen/temporal/api/enums/v1/common_pb.rb +34 -0
- data/lib/gen/temporal/api/enums/v1/event_type_pb.rb +62 -0
- data/lib/gen/temporal/api/enums/v1/failed_cause_pb.rb +60 -0
- data/lib/gen/temporal/api/enums/v1/namespace_pb.rb +31 -0
- data/lib/gen/temporal/api/enums/v1/query_pb.rb +31 -0
- data/lib/gen/temporal/api/enums/v1/task_queue_pb.rb +30 -0
- data/lib/gen/temporal/api/enums/v1/workflow_pb.rb +82 -0
- data/lib/gen/temporal/api/errordetails/v1/message_pb.rb +55 -0
- data/lib/gen/temporal/api/failure/v1/message_pb.rb +81 -0
- data/lib/gen/temporal/api/filter/v1/message_pb.rb +38 -0
- data/lib/gen/temporal/api/history/v1/message_pb.rb +423 -0
- data/lib/gen/temporal/api/namespace/v1/message_pb.rb +55 -0
- data/lib/gen/temporal/api/query/v1/message_pb.rb +36 -0
- data/lib/gen/temporal/api/replication/v1/message_pb.rb +27 -0
- data/lib/gen/temporal/api/taskqueue/v1/message_pb.rb +60 -0
- data/lib/gen/temporal/api/version/v1/message_pb.rb +28 -0
- data/lib/gen/temporal/api/workflow/v1/message_pb.rb +83 -0
- data/lib/gen/temporal/api/workflowservice/v1/request_response_pb.rb +538 -0
- data/lib/gen/temporal/api/workflowservice/v1/service_pb.rb +19 -0
- data/lib/gen/temporal/api/workflowservice/v1/service_services_pb.rb +223 -0
- data/lib/temporal-ruby.rb +1 -0
- data/lib/temporal.rb +137 -0
- data/lib/temporal/activity.rb +33 -0
- data/lib/temporal/activity/async_token.rb +34 -0
- data/lib/temporal/activity/context.rb +64 -0
- data/lib/temporal/activity/poller.rb +79 -0
- data/lib/temporal/activity/task_processor.rb +78 -0
- data/lib/temporal/activity/workflow_convenience_methods.rb +41 -0
- data/lib/temporal/client.rb +21 -0
- data/lib/temporal/client/errors.rb +8 -0
- data/lib/temporal/client/grpc_client.rb +345 -0
- data/lib/temporal/client/serializer.rb +31 -0
- data/lib/temporal/client/serializer/base.rb +23 -0
- data/lib/temporal/client/serializer/cancel_timer.rb +19 -0
- data/lib/temporal/client/serializer/complete_workflow.rb +20 -0
- data/lib/temporal/client/serializer/fail_workflow.rb +20 -0
- data/lib/temporal/client/serializer/failure.rb +29 -0
- data/lib/temporal/client/serializer/payload.rb +25 -0
- data/lib/temporal/client/serializer/record_marker.rb +23 -0
- data/lib/temporal/client/serializer/request_activity_cancellation.rb +19 -0
- data/lib/temporal/client/serializer/schedule_activity.rb +53 -0
- data/lib/temporal/client/serializer/start_child_workflow.rb +51 -0
- data/lib/temporal/client/serializer/start_timer.rb +20 -0
- data/lib/temporal/concerns/executable.rb +37 -0
- data/lib/temporal/concerns/typed.rb +40 -0
- data/lib/temporal/configuration.rb +44 -0
- data/lib/temporal/errors.rb +38 -0
- data/lib/temporal/executable_lookup.rb +25 -0
- data/lib/temporal/execution_options.rb +35 -0
- data/lib/temporal/json.rb +18 -0
- data/lib/temporal/metadata.rb +68 -0
- data/lib/temporal/metadata/activity.rb +27 -0
- data/lib/temporal/metadata/base.rb +17 -0
- data/lib/temporal/metadata/workflow.rb +22 -0
- data/lib/temporal/metadata/workflow_task.rb +25 -0
- data/lib/temporal/metrics.rb +37 -0
- data/lib/temporal/metrics_adapters/log.rb +33 -0
- data/lib/temporal/metrics_adapters/null.rb +9 -0
- data/lib/temporal/middleware/chain.rb +30 -0
- data/lib/temporal/middleware/entry.rb +9 -0
- data/lib/temporal/retry_policy.rb +27 -0
- data/lib/temporal/saga/concern.rb +23 -0
- data/lib/temporal/saga/result.rb +22 -0
- data/lib/temporal/saga/saga.rb +24 -0
- data/lib/temporal/testing.rb +50 -0
- data/lib/temporal/testing/future_registry.rb +27 -0
- data/lib/temporal/testing/local_activity_context.rb +17 -0
- data/lib/temporal/testing/local_workflow_context.rb +178 -0
- data/lib/temporal/testing/temporal_override.rb +121 -0
- data/lib/temporal/testing/workflow_execution.rb +44 -0
- data/lib/temporal/testing/workflow_override.rb +36 -0
- data/lib/temporal/thread_local_context.rb +14 -0
- data/lib/temporal/thread_pool.rb +63 -0
- data/lib/temporal/types.rb +7 -0
- data/lib/temporal/uuid.rb +19 -0
- data/lib/temporal/version.rb +1 -1
- data/lib/temporal/worker.rb +88 -0
- data/lib/temporal/workflow.rb +42 -0
- data/lib/temporal/workflow/command.rb +39 -0
- data/lib/temporal/workflow/command_state_machine.rb +48 -0
- data/lib/temporal/workflow/context.rb +243 -0
- data/lib/temporal/workflow/convenience_methods.rb +34 -0
- data/lib/temporal/workflow/dispatcher.rb +31 -0
- data/lib/temporal/workflow/execution_info.rb +51 -0
- data/lib/temporal/workflow/executor.rb +45 -0
- data/lib/temporal/workflow/future.rb +77 -0
- data/lib/temporal/workflow/history.rb +76 -0
- data/lib/temporal/workflow/history/event.rb +69 -0
- data/lib/temporal/workflow/history/event_target.rb +75 -0
- data/lib/temporal/workflow/history/window.rb +40 -0
- data/lib/temporal/workflow/poller.rb +67 -0
- data/lib/temporal/workflow/replay_aware_logger.rb +36 -0
- data/lib/temporal/workflow/state_manager.rb +342 -0
- data/lib/temporal/workflow/task_processor.rb +78 -0
- data/rbi/temporal-ruby.rbi +43 -0
- data/temporal.gemspec +10 -2
- metadata +186 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 42114cc4bbe2bc250e8c8e5dd5cfef7701fc48ea5b18eb1be4581dc8d8aa1a62
|
4
|
+
data.tar.gz: 4824e86f5440afe08de9d15fb7462eef948bef48696d85fca0fd5714cc117d9e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2a8a04ab82160833c6d0ebe0dc7cd8601341821aa1ab8124ccfc5cae854c275868d32765ad5c0c8563d70e72b2d36110c8f61addf44e75899826b57f9123a05b
|
7
|
+
data.tar.gz: 30d8479367f29a687b203c5ecef4e6de1c32bb9263c2e91e6e822a93c7db3f418641e6095a8e4ef0e552ba3973caa6b016f864ea92802bc2189c47185a7e6fff
|
data/README.md
CHANGED
@@ -9,9 +9,6 @@ To find more about Temporal please visit <https://temporal.io/>.
|
|
9
9
|
|
10
10
|
## Getting Started
|
11
11
|
|
12
|
-
*NOTE: Make sure you have both Temporal and TChannel Proxy up and running. Head over to
|
13
|
-
[this section](#installing-dependencies) for installation instructions.*
|
14
|
-
|
15
12
|
Clone this repository:
|
16
13
|
|
17
14
|
```sh
|
@@ -21,17 +18,17 @@ Clone this repository:
|
|
21
18
|
Include this gem to your `Gemfile`:
|
22
19
|
|
23
20
|
```ruby
|
24
|
-
gem 'temporal-ruby',
|
21
|
+
gem 'temporal-ruby', github: 'coinbase/temporal-ruby'
|
25
22
|
```
|
26
23
|
|
27
24
|
Define an activity:
|
28
25
|
|
29
26
|
```ruby
|
30
|
-
class HelloActivity < Temporal::
|
27
|
+
class HelloActivity < Temporal::Activity
|
31
28
|
def execute(name)
|
32
29
|
puts "Hello #{name}!"
|
33
30
|
|
34
|
-
return
|
31
|
+
return nil
|
35
32
|
end
|
36
33
|
end
|
37
34
|
```
|
@@ -45,7 +42,7 @@ class HelloWorldWorkflow < Temporal::Workflow
|
|
45
42
|
def execute
|
46
43
|
HelloActivity.execute!('World')
|
47
44
|
|
48
|
-
return
|
45
|
+
return nil
|
49
46
|
end
|
50
47
|
end
|
51
48
|
```
|
@@ -55,16 +52,16 @@ Configure your Temporal connection:
|
|
55
52
|
```ruby
|
56
53
|
Temporal.configure do |config|
|
57
54
|
config.host = 'localhost'
|
58
|
-
config.port =
|
59
|
-
config.
|
60
|
-
config.
|
55
|
+
config.port = 7233
|
56
|
+
config.namespace = 'ruby-samples'
|
57
|
+
config.task_queue = 'hello-world'
|
61
58
|
end
|
62
59
|
```
|
63
60
|
|
64
|
-
Register
|
61
|
+
Register namespace with the Temporal service:
|
65
62
|
|
66
63
|
```ruby
|
67
|
-
Temporal.
|
64
|
+
Temporal.register_namespace('ruby-samples', 'A safe space for playing with Temporal Ruby')
|
68
65
|
```
|
69
66
|
|
70
67
|
Configure and start your worker process:
|
@@ -89,7 +86,7 @@ Temporal.start_workflow(HelloWorldWorkflow)
|
|
89
86
|
Congratulation you've just created and executed a distributed workflow!
|
90
87
|
|
91
88
|
To view more details about your execution, point your browser to
|
92
|
-
<http://localhost:8088/
|
89
|
+
<http://localhost:8088/namespace/ruby-samples/workflows?range=last-3-hours&status=CLOSED>.
|
93
90
|
|
94
91
|
There are plenty of [runnable examples](examples/) demonstrating various features of this library
|
95
92
|
available, make sure to check them out.
|
@@ -97,11 +94,6 @@ available, make sure to check them out.
|
|
97
94
|
|
98
95
|
## Installing dependencies
|
99
96
|
|
100
|
-
In order to run your Ruby workers you need to have the Temporal service and the TChannel Proxy
|
101
|
-
running. Below are the instructions on setting these up:
|
102
|
-
|
103
|
-
### Temporal
|
104
|
-
|
105
97
|
Temporal service handles all the persistence, fault tolerance and coordination of your workflows and
|
106
98
|
activities. To set it up locally, download and boot the Docker Compose file from the official repo:
|
107
99
|
|
@@ -111,21 +103,6 @@ activities. To set it up locally, download and boot the Docker Compose file from
|
|
111
103
|
> docker-compose up
|
112
104
|
```
|
113
105
|
|
114
|
-
### TChannel Proxy
|
115
|
-
|
116
|
-
Right now the Temporal service only communicates with the workers using Thrift over TChannel.
|
117
|
-
Unfortunately there isn't a working TChannel protocol implementation for Ruby, so in order to
|
118
|
-
connect to the Temporal service a simple proxy was created. You can run it using:
|
119
|
-
|
120
|
-
```sh
|
121
|
-
> cd proxy
|
122
|
-
|
123
|
-
> bin/proxy
|
124
|
-
```
|
125
|
-
|
126
|
-
The code and detailed instructions can be found [here](proxy/).
|
127
|
-
|
128
|
-
|
129
106
|
## Workflows
|
130
107
|
|
131
108
|
A workflow is defined using pure Ruby code, however it should contain only a high-level
|
@@ -182,7 +159,7 @@ future = workflow.execute_activity(MyActivity, arg1, arg2)
|
|
182
159
|
# In case your workflow code does not have access to activity classes (separate
|
183
160
|
# process, activities implemented in a different language, etc), you can
|
184
161
|
# simply reference them by their names
|
185
|
-
workflow.execute_activity('MyActivity', arg1, arg2, options: {
|
162
|
+
workflow.execute_activity('MyActivity', arg1, arg2, options: { namespace: 'my-namespace', task_queue: 'my-task-queue' })
|
186
163
|
```
|
187
164
|
|
188
165
|
Besides calling activities workflows can:
|
@@ -212,7 +189,7 @@ class CloseUserAccountActivity < Temporal::Activity
|
|
212
189
|
|
213
190
|
AccountClosureEmail.deliver(user)
|
214
191
|
|
215
|
-
return
|
192
|
+
return nil
|
216
193
|
end
|
217
194
|
end
|
218
195
|
```
|
@@ -297,8 +274,8 @@ worker you can split processing across as many workers as you need.
|
|
297
274
|
|
298
275
|
## Starting a workflow
|
299
276
|
|
300
|
-
All communication is handled via Temporal service, so in order to start a workflow you need to send
|
301
|
-
message to Temporal:
|
277
|
+
All communication is handled via Temporal service, so in order to start a workflow you need to send
|
278
|
+
a message to Temporal:
|
302
279
|
|
303
280
|
```ruby
|
304
281
|
Temporal.start_workflow(HelloWorldWorkflow)
|
@@ -312,7 +289,7 @@ Temporal.start_workflow(RenewSubscriptionWorkflow, user_id, options: { workflow_
|
|
312
289
|
|
313
290
|
Passing in a `workflow_id` allows you to prevent concurrent execution of a workflow — a subsequent
|
314
291
|
call with the same `workflow_id` will always get rejected while it is still running, raising
|
315
|
-
`
|
292
|
+
`Temporal::WorkflowExecutionAlreadyStartedFailure`. You can adjust the behaviour for finished
|
316
293
|
workflows by supplying the `workflow_id_reuse_policy:` argument with one of these options:
|
317
294
|
|
318
295
|
- `:allow_failed` will allow re-running workflows that have failed (terminated, cancelled, timed out or failed)
|
@@ -323,11 +300,11 @@ workflows by supplying the `workflow_id_reuse_policy:` argument with one of thes
|
|
323
300
|
## Execution Options
|
324
301
|
|
325
302
|
There are lots of ways in which you can configure your Workflows and Activities. The common ones
|
326
|
-
(
|
303
|
+
(namespace, task_queue, timeouts and retry policy) can be defined in one of these places (in the order
|
327
304
|
of precedence):
|
328
305
|
|
329
306
|
1. Inline when starting or registering a workflow/activity (use `options:` argument)
|
330
|
-
2. In your workflow/activity class definitions by calling a class method (e.g. `
|
307
|
+
2. In your workflow/activity class definitions by calling a class method (e.g. `namespace 'my-namespace'`)
|
331
308
|
3. Globally, when configuring your Temporal library via `Temporal.configure`
|
332
309
|
|
333
310
|
|
@@ -356,7 +333,7 @@ class MyWorkflow < Temporal::Workflow
|
|
356
333
|
|
357
334
|
ActivityOld2.execute!
|
358
335
|
|
359
|
-
return
|
336
|
+
return nil
|
360
337
|
end
|
361
338
|
end
|
362
339
|
```
|
@@ -384,7 +361,7 @@ class MyWorkflow < Temporal::Workflow
|
|
384
361
|
ActivityNew3.execute!
|
385
362
|
end
|
386
363
|
|
387
|
-
return
|
364
|
+
return nil
|
388
365
|
end
|
389
366
|
end
|
390
367
|
```
|
@@ -0,0 +1,146 @@
|
|
1
|
+
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
2
|
+
# source: temporal/api/command/v1/message.proto
|
3
|
+
|
4
|
+
require 'google/protobuf'
|
5
|
+
|
6
|
+
require 'google/protobuf/duration_pb'
|
7
|
+
require 'temporal/api/enums/v1/workflow_pb'
|
8
|
+
require 'temporal/api/enums/v1/command_type_pb'
|
9
|
+
require 'temporal/api/common/v1/message_pb'
|
10
|
+
require 'temporal/api/failure/v1/message_pb'
|
11
|
+
require 'temporal/api/taskqueue/v1/message_pb'
|
12
|
+
Google::Protobuf::DescriptorPool.generated_pool.build do
|
13
|
+
add_file("temporal/api/command/v1/message.proto", :syntax => :proto3) do
|
14
|
+
add_message "temporal.api.command.v1.ScheduleActivityTaskCommandAttributes" do
|
15
|
+
optional :activity_id, :string, 1
|
16
|
+
optional :activity_type, :message, 2, "temporal.api.common.v1.ActivityType"
|
17
|
+
optional :namespace, :string, 3
|
18
|
+
optional :task_queue, :message, 4, "temporal.api.taskqueue.v1.TaskQueue"
|
19
|
+
optional :header, :message, 5, "temporal.api.common.v1.Header"
|
20
|
+
optional :input, :message, 6, "temporal.api.common.v1.Payloads"
|
21
|
+
optional :schedule_to_close_timeout, :message, 7, "google.protobuf.Duration"
|
22
|
+
optional :schedule_to_start_timeout, :message, 8, "google.protobuf.Duration"
|
23
|
+
optional :start_to_close_timeout, :message, 9, "google.protobuf.Duration"
|
24
|
+
optional :heartbeat_timeout, :message, 10, "google.protobuf.Duration"
|
25
|
+
optional :retry_policy, :message, 11, "temporal.api.common.v1.RetryPolicy"
|
26
|
+
end
|
27
|
+
add_message "temporal.api.command.v1.RequestCancelActivityTaskCommandAttributes" do
|
28
|
+
optional :scheduled_event_id, :int64, 1
|
29
|
+
end
|
30
|
+
add_message "temporal.api.command.v1.StartTimerCommandAttributes" do
|
31
|
+
optional :timer_id, :string, 1
|
32
|
+
optional :start_to_fire_timeout, :message, 2, "google.protobuf.Duration"
|
33
|
+
end
|
34
|
+
add_message "temporal.api.command.v1.CompleteWorkflowExecutionCommandAttributes" do
|
35
|
+
optional :result, :message, 1, "temporal.api.common.v1.Payloads"
|
36
|
+
end
|
37
|
+
add_message "temporal.api.command.v1.FailWorkflowExecutionCommandAttributes" do
|
38
|
+
optional :failure, :message, 1, "temporal.api.failure.v1.Failure"
|
39
|
+
end
|
40
|
+
add_message "temporal.api.command.v1.CancelTimerCommandAttributes" do
|
41
|
+
optional :timer_id, :string, 1
|
42
|
+
end
|
43
|
+
add_message "temporal.api.command.v1.CancelWorkflowExecutionCommandAttributes" do
|
44
|
+
optional :details, :message, 1, "temporal.api.common.v1.Payloads"
|
45
|
+
end
|
46
|
+
add_message "temporal.api.command.v1.RequestCancelExternalWorkflowExecutionCommandAttributes" do
|
47
|
+
optional :namespace, :string, 1
|
48
|
+
optional :workflow_id, :string, 2
|
49
|
+
optional :run_id, :string, 3
|
50
|
+
optional :control, :string, 4
|
51
|
+
optional :child_workflow_only, :bool, 5
|
52
|
+
end
|
53
|
+
add_message "temporal.api.command.v1.SignalExternalWorkflowExecutionCommandAttributes" do
|
54
|
+
optional :namespace, :string, 1
|
55
|
+
optional :execution, :message, 2, "temporal.api.common.v1.WorkflowExecution"
|
56
|
+
optional :signal_name, :string, 3
|
57
|
+
optional :input, :message, 4, "temporal.api.common.v1.Payloads"
|
58
|
+
optional :control, :string, 5
|
59
|
+
optional :child_workflow_only, :bool, 6
|
60
|
+
end
|
61
|
+
add_message "temporal.api.command.v1.UpsertWorkflowSearchAttributesCommandAttributes" do
|
62
|
+
optional :search_attributes, :message, 1, "temporal.api.common.v1.SearchAttributes"
|
63
|
+
end
|
64
|
+
add_message "temporal.api.command.v1.RecordMarkerCommandAttributes" do
|
65
|
+
optional :marker_name, :string, 1
|
66
|
+
map :details, :string, :message, 2, "temporal.api.common.v1.Payloads"
|
67
|
+
optional :header, :message, 3, "temporal.api.common.v1.Header"
|
68
|
+
optional :failure, :message, 4, "temporal.api.failure.v1.Failure"
|
69
|
+
end
|
70
|
+
add_message "temporal.api.command.v1.ContinueAsNewWorkflowExecutionCommandAttributes" do
|
71
|
+
optional :workflow_type, :message, 1, "temporal.api.common.v1.WorkflowType"
|
72
|
+
optional :task_queue, :message, 2, "temporal.api.taskqueue.v1.TaskQueue"
|
73
|
+
optional :input, :message, 3, "temporal.api.common.v1.Payloads"
|
74
|
+
optional :workflow_run_timeout, :message, 4, "google.protobuf.Duration"
|
75
|
+
optional :workflow_task_timeout, :message, 5, "google.protobuf.Duration"
|
76
|
+
optional :backoff_start_interval, :message, 6, "google.protobuf.Duration"
|
77
|
+
optional :retry_policy, :message, 7, "temporal.api.common.v1.RetryPolicy"
|
78
|
+
optional :initiator, :enum, 8, "temporal.api.enums.v1.ContinueAsNewInitiator"
|
79
|
+
optional :failure, :message, 9, "temporal.api.failure.v1.Failure"
|
80
|
+
optional :last_completion_result, :message, 10, "temporal.api.common.v1.Payloads"
|
81
|
+
optional :cron_schedule, :string, 11
|
82
|
+
optional :header, :message, 12, "temporal.api.common.v1.Header"
|
83
|
+
optional :memo, :message, 13, "temporal.api.common.v1.Memo"
|
84
|
+
optional :search_attributes, :message, 14, "temporal.api.common.v1.SearchAttributes"
|
85
|
+
end
|
86
|
+
add_message "temporal.api.command.v1.StartChildWorkflowExecutionCommandAttributes" do
|
87
|
+
optional :namespace, :string, 1
|
88
|
+
optional :workflow_id, :string, 2
|
89
|
+
optional :workflow_type, :message, 3, "temporal.api.common.v1.WorkflowType"
|
90
|
+
optional :task_queue, :message, 4, "temporal.api.taskqueue.v1.TaskQueue"
|
91
|
+
optional :input, :message, 5, "temporal.api.common.v1.Payloads"
|
92
|
+
optional :workflow_execution_timeout, :message, 6, "google.protobuf.Duration"
|
93
|
+
optional :workflow_run_timeout, :message, 7, "google.protobuf.Duration"
|
94
|
+
optional :workflow_task_timeout, :message, 8, "google.protobuf.Duration"
|
95
|
+
optional :parent_close_policy, :enum, 9, "temporal.api.enums.v1.ParentClosePolicy"
|
96
|
+
optional :control, :string, 10
|
97
|
+
optional :workflow_id_reuse_policy, :enum, 11, "temporal.api.enums.v1.WorkflowIdReusePolicy"
|
98
|
+
optional :retry_policy, :message, 12, "temporal.api.common.v1.RetryPolicy"
|
99
|
+
optional :cron_schedule, :string, 13
|
100
|
+
optional :header, :message, 14, "temporal.api.common.v1.Header"
|
101
|
+
optional :memo, :message, 15, "temporal.api.common.v1.Memo"
|
102
|
+
optional :search_attributes, :message, 16, "temporal.api.common.v1.SearchAttributes"
|
103
|
+
end
|
104
|
+
add_message "temporal.api.command.v1.Command" do
|
105
|
+
optional :command_type, :enum, 1, "temporal.api.enums.v1.CommandType"
|
106
|
+
oneof :attributes do
|
107
|
+
optional :schedule_activity_task_command_attributes, :message, 2, "temporal.api.command.v1.ScheduleActivityTaskCommandAttributes"
|
108
|
+
optional :start_timer_command_attributes, :message, 3, "temporal.api.command.v1.StartTimerCommandAttributes"
|
109
|
+
optional :complete_workflow_execution_command_attributes, :message, 4, "temporal.api.command.v1.CompleteWorkflowExecutionCommandAttributes"
|
110
|
+
optional :fail_workflow_execution_command_attributes, :message, 5, "temporal.api.command.v1.FailWorkflowExecutionCommandAttributes"
|
111
|
+
optional :request_cancel_activity_task_command_attributes, :message, 6, "temporal.api.command.v1.RequestCancelActivityTaskCommandAttributes"
|
112
|
+
optional :cancel_timer_command_attributes, :message, 7, "temporal.api.command.v1.CancelTimerCommandAttributes"
|
113
|
+
optional :cancel_workflow_execution_command_attributes, :message, 8, "temporal.api.command.v1.CancelWorkflowExecutionCommandAttributes"
|
114
|
+
optional :request_cancel_external_workflow_execution_command_attributes, :message, 9, "temporal.api.command.v1.RequestCancelExternalWorkflowExecutionCommandAttributes"
|
115
|
+
optional :record_marker_command_attributes, :message, 10, "temporal.api.command.v1.RecordMarkerCommandAttributes"
|
116
|
+
optional :continue_as_new_workflow_execution_command_attributes, :message, 11, "temporal.api.command.v1.ContinueAsNewWorkflowExecutionCommandAttributes"
|
117
|
+
optional :start_child_workflow_execution_command_attributes, :message, 12, "temporal.api.command.v1.StartChildWorkflowExecutionCommandAttributes"
|
118
|
+
optional :signal_external_workflow_execution_command_attributes, :message, 13, "temporal.api.command.v1.SignalExternalWorkflowExecutionCommandAttributes"
|
119
|
+
optional :upsert_workflow_search_attributes_command_attributes, :message, 14, "temporal.api.command.v1.UpsertWorkflowSearchAttributesCommandAttributes"
|
120
|
+
end
|
121
|
+
end
|
122
|
+
end
|
123
|
+
end
|
124
|
+
|
125
|
+
module Temporal
|
126
|
+
module Api
|
127
|
+
module Decision
|
128
|
+
module V1
|
129
|
+
ScheduleActivityTaskCommandAttributes = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("temporal.api.command.v1.ScheduleActivityTaskCommandAttributes").msgclass
|
130
|
+
RequestCancelActivityTaskCommandAttributes = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("temporal.api.command.v1.RequestCancelActivityTaskCommandAttributes").msgclass
|
131
|
+
StartTimerCommandAttributes = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("temporal.api.command.v1.StartTimerCommandAttributes").msgclass
|
132
|
+
CompleteWorkflowExecutionCommandAttributes = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("temporal.api.command.v1.CompleteWorkflowExecutionCommandAttributes").msgclass
|
133
|
+
FailWorkflowExecutionCommandAttributes = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("temporal.api.command.v1.FailWorkflowExecutionCommandAttributes").msgclass
|
134
|
+
CancelTimerCommandAttributes = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("temporal.api.command.v1.CancelTimerCommandAttributes").msgclass
|
135
|
+
CancelWorkflowExecutionCommandAttributes = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("temporal.api.command.v1.CancelWorkflowExecutionCommandAttributes").msgclass
|
136
|
+
RequestCancelExternalWorkflowExecutionCommandAttributes = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("temporal.api.command.v1.RequestCancelExternalWorkflowExecutionCommandAttributes").msgclass
|
137
|
+
SignalExternalWorkflowExecutionCommandAttributes = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("temporal.api.command.v1.SignalExternalWorkflowExecutionCommandAttributes").msgclass
|
138
|
+
UpsertWorkflowSearchAttributesCommandAttributes = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("temporal.api.command.v1.UpsertWorkflowSearchAttributesCommandAttributes").msgclass
|
139
|
+
RecordMarkerCommandAttributes = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("temporal.api.command.v1.RecordMarkerCommandAttributes").msgclass
|
140
|
+
ContinueAsNewWorkflowExecutionCommandAttributes = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("temporal.api.command.v1.ContinueAsNewWorkflowExecutionCommandAttributes").msgclass
|
141
|
+
StartChildWorkflowExecutionCommandAttributes = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("temporal.api.command.v1.StartChildWorkflowExecutionCommandAttributes").msgclass
|
142
|
+
Command = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("temporal.api.command.v1.Command").msgclass
|
143
|
+
end
|
144
|
+
end
|
145
|
+
end
|
146
|
+
end
|
@@ -0,0 +1,67 @@
|
|
1
|
+
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
2
|
+
# source: temporal/api/common/v1/message.proto
|
3
|
+
|
4
|
+
require 'google/protobuf'
|
5
|
+
|
6
|
+
require 'google/protobuf/duration_pb'
|
7
|
+
require 'temporal/api/enums/v1/common_pb'
|
8
|
+
Google::Protobuf::DescriptorPool.generated_pool.build do
|
9
|
+
add_file("temporal/api/common/v1/message.proto", :syntax => :proto3) do
|
10
|
+
add_message "temporal.api.common.v1.DataBlob" do
|
11
|
+
optional :encoding_type, :enum, 1, "temporal.api.enums.v1.EncodingType"
|
12
|
+
optional :data, :bytes, 2
|
13
|
+
end
|
14
|
+
add_message "temporal.api.common.v1.Payloads" do
|
15
|
+
repeated :payloads, :message, 1, "temporal.api.common.v1.Payload"
|
16
|
+
end
|
17
|
+
add_message "temporal.api.common.v1.Payload" do
|
18
|
+
map :metadata, :string, :bytes, 1
|
19
|
+
optional :data, :bytes, 2
|
20
|
+
end
|
21
|
+
add_message "temporal.api.common.v1.SearchAttributes" do
|
22
|
+
map :indexed_fields, :string, :message, 1, "temporal.api.common.v1.Payload"
|
23
|
+
end
|
24
|
+
add_message "temporal.api.common.v1.Memo" do
|
25
|
+
map :fields, :string, :message, 1, "temporal.api.common.v1.Payload"
|
26
|
+
end
|
27
|
+
add_message "temporal.api.common.v1.Header" do
|
28
|
+
map :fields, :string, :message, 1, "temporal.api.common.v1.Payload"
|
29
|
+
end
|
30
|
+
add_message "temporal.api.common.v1.WorkflowExecution" do
|
31
|
+
optional :workflow_id, :string, 1
|
32
|
+
optional :run_id, :string, 2
|
33
|
+
end
|
34
|
+
add_message "temporal.api.common.v1.WorkflowType" do
|
35
|
+
optional :name, :string, 1
|
36
|
+
end
|
37
|
+
add_message "temporal.api.common.v1.ActivityType" do
|
38
|
+
optional :name, :string, 1
|
39
|
+
end
|
40
|
+
add_message "temporal.api.common.v1.RetryPolicy" do
|
41
|
+
optional :initial_interval, :message, 1, "google.protobuf.Duration"
|
42
|
+
optional :backoff_coefficient, :double, 2
|
43
|
+
optional :maximum_interval, :message, 3, "google.protobuf.Duration"
|
44
|
+
optional :maximum_attempts, :int32, 4
|
45
|
+
repeated :non_retryable_error_types, :string, 5
|
46
|
+
end
|
47
|
+
end
|
48
|
+
end
|
49
|
+
|
50
|
+
module Temporal
|
51
|
+
module Api
|
52
|
+
module Common
|
53
|
+
module V1
|
54
|
+
DataBlob = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("temporal.api.common.v1.DataBlob").msgclass
|
55
|
+
Payloads = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("temporal.api.common.v1.Payloads").msgclass
|
56
|
+
Payload = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("temporal.api.common.v1.Payload").msgclass
|
57
|
+
SearchAttributes = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("temporal.api.common.v1.SearchAttributes").msgclass
|
58
|
+
Memo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("temporal.api.common.v1.Memo").msgclass
|
59
|
+
Header = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("temporal.api.common.v1.Header").msgclass
|
60
|
+
WorkflowExecution = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("temporal.api.common.v1.WorkflowExecution").msgclass
|
61
|
+
WorkflowType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("temporal.api.common.v1.WorkflowType").msgclass
|
62
|
+
ActivityType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("temporal.api.common.v1.ActivityType").msgclass
|
63
|
+
RetryPolicy = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("temporal.api.common.v1.RetryPolicy").msgclass
|
64
|
+
end
|
65
|
+
end
|
66
|
+
end
|
67
|
+
end
|
@@ -0,0 +1,35 @@
|
|
1
|
+
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
2
|
+
# source: temporal/api/enums/v1/command_type.proto
|
3
|
+
|
4
|
+
require 'google/protobuf'
|
5
|
+
|
6
|
+
Google::Protobuf::DescriptorPool.generated_pool.build do
|
7
|
+
add_file("temporal/api/enums/v1/command_type.proto", :syntax => :proto3) do
|
8
|
+
add_enum "temporal.api.enums.v1.CommandType" do
|
9
|
+
value :COMMAND_TYPE_UNSPECIFIED, 0
|
10
|
+
value :COMMAND_TYPE_SCHEDULE_ACTIVITY_TASK, 1
|
11
|
+
value :COMMAND_TYPE_REQUEST_CANCEL_ACTIVITY_TASK, 2
|
12
|
+
value :COMMAND_TYPE_START_TIMER, 3
|
13
|
+
value :COMMAND_TYPE_COMPLETE_WORKFLOW_EXECUTION, 4
|
14
|
+
value :COMMAND_TYPE_FAIL_WORKFLOW_EXECUTION, 5
|
15
|
+
value :COMMAND_TYPE_CANCEL_TIMER, 6
|
16
|
+
value :COMMAND_TYPE_CANCEL_WORKFLOW_EXECUTION, 7
|
17
|
+
value :COMMAND_TYPE_REQUEST_CANCEL_EXTERNAL_WORKFLOW_EXECUTION, 8
|
18
|
+
value :COMMAND_TYPE_RECORD_MARKER, 9
|
19
|
+
value :COMMAND_TYPE_CONTINUE_AS_NEW_WORKFLOW_EXECUTION, 10
|
20
|
+
value :COMMAND_TYPE_START_CHILD_WORKFLOW_EXECUTION, 11
|
21
|
+
value :COMMAND_TYPE_SIGNAL_EXTERNAL_WORKFLOW_EXECUTION, 12
|
22
|
+
value :COMMAND_TYPE_UPSERT_WORKFLOW_SEARCH_ATTRIBUTES, 13
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|
26
|
+
|
27
|
+
module Temporal
|
28
|
+
module Api
|
29
|
+
module Enums
|
30
|
+
module V1
|
31
|
+
CommandType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("temporal.api.enums.v1.CommandType").enummodule
|
32
|
+
end
|
33
|
+
end
|
34
|
+
end
|
35
|
+
end
|
@@ -0,0 +1,34 @@
|
|
1
|
+
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
2
|
+
# source: temporal/api/enums/v1/common.proto
|
3
|
+
|
4
|
+
require 'google/protobuf'
|
5
|
+
|
6
|
+
Google::Protobuf::DescriptorPool.generated_pool.build do
|
7
|
+
add_file("temporal/api/enums/v1/common.proto", :syntax => :proto3) do
|
8
|
+
add_enum "temporal.api.enums.v1.EncodingType" do
|
9
|
+
value :ENCODING_TYPE_UNSPECIFIED, 0
|
10
|
+
value :ENCODING_TYPE_PROTO3, 1
|
11
|
+
value :ENCODING_TYPE_JSON, 2
|
12
|
+
end
|
13
|
+
add_enum "temporal.api.enums.v1.IndexedValueType" do
|
14
|
+
value :INDEXED_VALUE_TYPE_UNSPECIFIED, 0
|
15
|
+
value :INDEXED_VALUE_TYPE_STRING, 1
|
16
|
+
value :INDEXED_VALUE_TYPE_KEYWORD, 2
|
17
|
+
value :INDEXED_VALUE_TYPE_INT, 3
|
18
|
+
value :INDEXED_VALUE_TYPE_DOUBLE, 4
|
19
|
+
value :INDEXED_VALUE_TYPE_BOOL, 5
|
20
|
+
value :INDEXED_VALUE_TYPE_DATETIME, 6
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
24
|
+
|
25
|
+
module Temporal
|
26
|
+
module Api
|
27
|
+
module Enums
|
28
|
+
module V1
|
29
|
+
EncodingType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("temporal.api.enums.v1.EncodingType").enummodule
|
30
|
+
IndexedValueType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("temporal.api.enums.v1.IndexedValueType").enummodule
|
31
|
+
end
|
32
|
+
end
|
33
|
+
end
|
34
|
+
end
|