temporalio 0.0.0 → 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +130 -0
- data/bridge/Cargo.lock +2865 -0
- data/bridge/Cargo.toml +26 -0
- data/bridge/sdk-core/ARCHITECTURE.md +76 -0
- data/bridge/sdk-core/Cargo.lock +2606 -0
- data/bridge/sdk-core/Cargo.toml +2 -0
- data/bridge/sdk-core/LICENSE.txt +23 -0
- data/bridge/sdk-core/README.md +107 -0
- data/bridge/sdk-core/arch_docs/diagrams/README.md +10 -0
- data/bridge/sdk-core/arch_docs/diagrams/sticky_queues.puml +40 -0
- data/bridge/sdk-core/arch_docs/diagrams/workflow_internals.svg +1 -0
- data/bridge/sdk-core/arch_docs/sticky_queues.md +51 -0
- data/bridge/sdk-core/bridge-ffi/Cargo.toml +24 -0
- data/bridge/sdk-core/bridge-ffi/LICENSE.txt +23 -0
- data/bridge/sdk-core/bridge-ffi/build.rs +25 -0
- data/bridge/sdk-core/bridge-ffi/include/sdk-core-bridge.h +249 -0
- data/bridge/sdk-core/bridge-ffi/src/lib.rs +825 -0
- data/bridge/sdk-core/bridge-ffi/src/wrappers.rs +211 -0
- data/bridge/sdk-core/client/Cargo.toml +40 -0
- data/bridge/sdk-core/client/LICENSE.txt +23 -0
- data/bridge/sdk-core/client/src/lib.rs +1294 -0
- data/bridge/sdk-core/client/src/metrics.rs +165 -0
- data/bridge/sdk-core/client/src/raw.rs +931 -0
- data/bridge/sdk-core/client/src/retry.rs +674 -0
- data/bridge/sdk-core/client/src/workflow_handle/mod.rs +185 -0
- data/bridge/sdk-core/core/Cargo.toml +116 -0
- data/bridge/sdk-core/core/LICENSE.txt +23 -0
- data/bridge/sdk-core/core/benches/workflow_replay.rs +73 -0
- data/bridge/sdk-core/core/src/abstractions.rs +166 -0
- data/bridge/sdk-core/core/src/core_tests/activity_tasks.rs +911 -0
- data/bridge/sdk-core/core/src/core_tests/child_workflows.rs +221 -0
- data/bridge/sdk-core/core/src/core_tests/determinism.rs +107 -0
- data/bridge/sdk-core/core/src/core_tests/local_activities.rs +515 -0
- data/bridge/sdk-core/core/src/core_tests/mod.rs +100 -0
- data/bridge/sdk-core/core/src/core_tests/queries.rs +736 -0
- data/bridge/sdk-core/core/src/core_tests/replay_flag.rs +65 -0
- data/bridge/sdk-core/core/src/core_tests/workers.rs +259 -0
- data/bridge/sdk-core/core/src/core_tests/workflow_cancels.rs +124 -0
- data/bridge/sdk-core/core/src/core_tests/workflow_tasks.rs +2070 -0
- data/bridge/sdk-core/core/src/ephemeral_server/mod.rs +515 -0
- data/bridge/sdk-core/core/src/lib.rs +175 -0
- data/bridge/sdk-core/core/src/log_export.rs +62 -0
- data/bridge/sdk-core/core/src/pollers/mod.rs +54 -0
- data/bridge/sdk-core/core/src/pollers/poll_buffer.rs +297 -0
- data/bridge/sdk-core/core/src/protosext/mod.rs +428 -0
- data/bridge/sdk-core/core/src/replay/mod.rs +71 -0
- data/bridge/sdk-core/core/src/retry_logic.rs +202 -0
- data/bridge/sdk-core/core/src/telemetry/metrics.rs +383 -0
- data/bridge/sdk-core/core/src/telemetry/mod.rs +412 -0
- data/bridge/sdk-core/core/src/telemetry/prometheus_server.rs +77 -0
- data/bridge/sdk-core/core/src/test_help/mod.rs +875 -0
- data/bridge/sdk-core/core/src/worker/activities/activity_heartbeat_manager.rs +580 -0
- data/bridge/sdk-core/core/src/worker/activities/local_activities.rs +1042 -0
- data/bridge/sdk-core/core/src/worker/activities.rs +464 -0
- data/bridge/sdk-core/core/src/worker/client/mocks.rs +87 -0
- data/bridge/sdk-core/core/src/worker/client.rs +347 -0
- data/bridge/sdk-core/core/src/worker/mod.rs +566 -0
- data/bridge/sdk-core/core/src/worker/workflow/bridge.rs +37 -0
- data/bridge/sdk-core/core/src/worker/workflow/driven_workflow.rs +110 -0
- data/bridge/sdk-core/core/src/worker/workflow/history_update.rs +458 -0
- data/bridge/sdk-core/core/src/worker/workflow/machines/activity_state_machine.rs +911 -0
- data/bridge/sdk-core/core/src/worker/workflow/machines/cancel_external_state_machine.rs +298 -0
- data/bridge/sdk-core/core/src/worker/workflow/machines/cancel_workflow_state_machine.rs +171 -0
- data/bridge/sdk-core/core/src/worker/workflow/machines/child_workflow_state_machine.rs +860 -0
- data/bridge/sdk-core/core/src/worker/workflow/machines/complete_workflow_state_machine.rs +140 -0
- data/bridge/sdk-core/core/src/worker/workflow/machines/continue_as_new_workflow_state_machine.rs +161 -0
- data/bridge/sdk-core/core/src/worker/workflow/machines/fail_workflow_state_machine.rs +133 -0
- data/bridge/sdk-core/core/src/worker/workflow/machines/local_activity_state_machine.rs +1448 -0
- data/bridge/sdk-core/core/src/worker/workflow/machines/mod.rs +342 -0
- data/bridge/sdk-core/core/src/worker/workflow/machines/mutable_side_effect_state_machine.rs +127 -0
- data/bridge/sdk-core/core/src/worker/workflow/machines/patch_state_machine.rs +712 -0
- data/bridge/sdk-core/core/src/worker/workflow/machines/side_effect_state_machine.rs +71 -0
- data/bridge/sdk-core/core/src/worker/workflow/machines/signal_external_state_machine.rs +443 -0
- data/bridge/sdk-core/core/src/worker/workflow/machines/timer_state_machine.rs +439 -0
- data/bridge/sdk-core/core/src/worker/workflow/machines/transition_coverage.rs +169 -0
- data/bridge/sdk-core/core/src/worker/workflow/machines/upsert_search_attributes_state_machine.rs +246 -0
- data/bridge/sdk-core/core/src/worker/workflow/machines/workflow_machines/local_acts.rs +96 -0
- data/bridge/sdk-core/core/src/worker/workflow/machines/workflow_machines.rs +1184 -0
- data/bridge/sdk-core/core/src/worker/workflow/machines/workflow_task_state_machine.rs +277 -0
- data/bridge/sdk-core/core/src/worker/workflow/managed_run/managed_wf_test.rs +198 -0
- data/bridge/sdk-core/core/src/worker/workflow/managed_run.rs +647 -0
- data/bridge/sdk-core/core/src/worker/workflow/mod.rs +1143 -0
- data/bridge/sdk-core/core/src/worker/workflow/run_cache.rs +145 -0
- data/bridge/sdk-core/core/src/worker/workflow/wft_poller.rs +88 -0
- data/bridge/sdk-core/core/src/worker/workflow/workflow_stream.rs +940 -0
- data/bridge/sdk-core/core-api/Cargo.toml +31 -0
- data/bridge/sdk-core/core-api/LICENSE.txt +23 -0
- data/bridge/sdk-core/core-api/src/errors.rs +95 -0
- data/bridge/sdk-core/core-api/src/lib.rs +151 -0
- data/bridge/sdk-core/core-api/src/worker.rs +135 -0
- data/bridge/sdk-core/etc/deps.svg +187 -0
- data/bridge/sdk-core/etc/dynamic-config.yaml +2 -0
- data/bridge/sdk-core/etc/otel-collector-config.yaml +36 -0
- data/bridge/sdk-core/etc/prometheus.yaml +6 -0
- data/bridge/sdk-core/fsm/Cargo.toml +18 -0
- data/bridge/sdk-core/fsm/LICENSE.txt +23 -0
- data/bridge/sdk-core/fsm/README.md +3 -0
- data/bridge/sdk-core/fsm/rustfsm_procmacro/Cargo.toml +27 -0
- data/bridge/sdk-core/fsm/rustfsm_procmacro/LICENSE.txt +23 -0
- data/bridge/sdk-core/fsm/rustfsm_procmacro/src/lib.rs +647 -0
- data/bridge/sdk-core/fsm/rustfsm_procmacro/tests/progress.rs +8 -0
- data/bridge/sdk-core/fsm/rustfsm_procmacro/tests/trybuild/dupe_transitions_fail.rs +18 -0
- data/bridge/sdk-core/fsm/rustfsm_procmacro/tests/trybuild/dupe_transitions_fail.stderr +12 -0
- data/bridge/sdk-core/fsm/rustfsm_procmacro/tests/trybuild/dynamic_dest_pass.rs +41 -0
- data/bridge/sdk-core/fsm/rustfsm_procmacro/tests/trybuild/forgot_name_fail.rs +14 -0
- data/bridge/sdk-core/fsm/rustfsm_procmacro/tests/trybuild/forgot_name_fail.stderr +11 -0
- data/bridge/sdk-core/fsm/rustfsm_procmacro/tests/trybuild/handler_arg_pass.rs +32 -0
- data/bridge/sdk-core/fsm/rustfsm_procmacro/tests/trybuild/handler_pass.rs +31 -0
- data/bridge/sdk-core/fsm/rustfsm_procmacro/tests/trybuild/medium_complex_pass.rs +46 -0
- data/bridge/sdk-core/fsm/rustfsm_procmacro/tests/trybuild/no_handle_conversions_require_into_fail.rs +29 -0
- data/bridge/sdk-core/fsm/rustfsm_procmacro/tests/trybuild/no_handle_conversions_require_into_fail.stderr +12 -0
- data/bridge/sdk-core/fsm/rustfsm_procmacro/tests/trybuild/simple_pass.rs +32 -0
- data/bridge/sdk-core/fsm/rustfsm_procmacro/tests/trybuild/struct_event_variant_fail.rs +18 -0
- data/bridge/sdk-core/fsm/rustfsm_procmacro/tests/trybuild/struct_event_variant_fail.stderr +5 -0
- data/bridge/sdk-core/fsm/rustfsm_procmacro/tests/trybuild/tuple_more_item_event_variant_fail.rs +11 -0
- data/bridge/sdk-core/fsm/rustfsm_procmacro/tests/trybuild/tuple_more_item_event_variant_fail.stderr +5 -0
- data/bridge/sdk-core/fsm/rustfsm_procmacro/tests/trybuild/tuple_zero_item_event_variant_fail.rs +11 -0
- data/bridge/sdk-core/fsm/rustfsm_procmacro/tests/trybuild/tuple_zero_item_event_variant_fail.stderr +5 -0
- data/bridge/sdk-core/fsm/rustfsm_trait/Cargo.toml +14 -0
- data/bridge/sdk-core/fsm/rustfsm_trait/LICENSE.txt +23 -0
- data/bridge/sdk-core/fsm/rustfsm_trait/src/lib.rs +249 -0
- data/bridge/sdk-core/fsm/src/lib.rs +2 -0
- data/bridge/sdk-core/histories/fail_wf_task.bin +0 -0
- data/bridge/sdk-core/histories/timer_workflow_history.bin +0 -0
- data/bridge/sdk-core/integ-with-otel.sh +7 -0
- data/bridge/sdk-core/protos/api_upstream/README.md +9 -0
- data/bridge/sdk-core/protos/api_upstream/api-linter.yaml +40 -0
- data/bridge/sdk-core/protos/api_upstream/buf.yaml +12 -0
- data/bridge/sdk-core/protos/api_upstream/dependencies/gogoproto/gogo.proto +141 -0
- data/bridge/sdk-core/protos/api_upstream/temporal/api/batch/v1/message.proto +86 -0
- data/bridge/sdk-core/protos/api_upstream/temporal/api/cluster/v1/message.proto +83 -0
- data/bridge/sdk-core/protos/api_upstream/temporal/api/command/v1/message.proto +259 -0
- data/bridge/sdk-core/protos/api_upstream/temporal/api/common/v1/message.proto +112 -0
- data/bridge/sdk-core/protos/api_upstream/temporal/api/enums/v1/batch_operation.proto +46 -0
- data/bridge/sdk-core/protos/api_upstream/temporal/api/enums/v1/cluster.proto +40 -0
- data/bridge/sdk-core/protos/api_upstream/temporal/api/enums/v1/command_type.proto +57 -0
- data/bridge/sdk-core/protos/api_upstream/temporal/api/enums/v1/common.proto +55 -0
- data/bridge/sdk-core/protos/api_upstream/temporal/api/enums/v1/event_type.proto +168 -0
- data/bridge/sdk-core/protos/api_upstream/temporal/api/enums/v1/failed_cause.proto +97 -0
- data/bridge/sdk-core/protos/api_upstream/temporal/api/enums/v1/namespace.proto +51 -0
- data/bridge/sdk-core/protos/api_upstream/temporal/api/enums/v1/query.proto +50 -0
- data/bridge/sdk-core/protos/api_upstream/temporal/api/enums/v1/reset.proto +41 -0
- data/bridge/sdk-core/protos/api_upstream/temporal/api/enums/v1/schedule.proto +60 -0
- data/bridge/sdk-core/protos/api_upstream/temporal/api/enums/v1/task_queue.proto +59 -0
- data/bridge/sdk-core/protos/api_upstream/temporal/api/enums/v1/update.proto +51 -0
- data/bridge/sdk-core/protos/api_upstream/temporal/api/enums/v1/workflow.proto +122 -0
- data/bridge/sdk-core/protos/api_upstream/temporal/api/errordetails/v1/message.proto +108 -0
- data/bridge/sdk-core/protos/api_upstream/temporal/api/failure/v1/message.proto +114 -0
- data/bridge/sdk-core/protos/api_upstream/temporal/api/filter/v1/message.proto +56 -0
- data/bridge/sdk-core/protos/api_upstream/temporal/api/history/v1/message.proto +751 -0
- data/bridge/sdk-core/protos/api_upstream/temporal/api/namespace/v1/message.proto +97 -0
- data/bridge/sdk-core/protos/api_upstream/temporal/api/operatorservice/v1/request_response.proto +161 -0
- data/bridge/sdk-core/protos/api_upstream/temporal/api/operatorservice/v1/service.proto +99 -0
- data/bridge/sdk-core/protos/api_upstream/temporal/api/query/v1/message.proto +61 -0
- data/bridge/sdk-core/protos/api_upstream/temporal/api/replication/v1/message.proto +55 -0
- data/bridge/sdk-core/protos/api_upstream/temporal/api/schedule/v1/message.proto +300 -0
- data/bridge/sdk-core/protos/api_upstream/temporal/api/taskqueue/v1/message.proto +108 -0
- data/bridge/sdk-core/protos/api_upstream/temporal/api/update/v1/message.proto +46 -0
- data/bridge/sdk-core/protos/api_upstream/temporal/api/version/v1/message.proto +59 -0
- data/bridge/sdk-core/protos/api_upstream/temporal/api/workflow/v1/message.proto +145 -0
- data/bridge/sdk-core/protos/api_upstream/temporal/api/workflowservice/v1/request_response.proto +1124 -0
- data/bridge/sdk-core/protos/api_upstream/temporal/api/workflowservice/v1/service.proto +401 -0
- data/bridge/sdk-core/protos/grpc/health/v1/health.proto +63 -0
- data/bridge/sdk-core/protos/local/temporal/sdk/core/activity_result/activity_result.proto +78 -0
- data/bridge/sdk-core/protos/local/temporal/sdk/core/activity_task/activity_task.proto +79 -0
- data/bridge/sdk-core/protos/local/temporal/sdk/core/bridge/bridge.proto +210 -0
- data/bridge/sdk-core/protos/local/temporal/sdk/core/child_workflow/child_workflow.proto +77 -0
- data/bridge/sdk-core/protos/local/temporal/sdk/core/common/common.proto +15 -0
- data/bridge/sdk-core/protos/local/temporal/sdk/core/core_interface.proto +30 -0
- data/bridge/sdk-core/protos/local/temporal/sdk/core/external_data/external_data.proto +30 -0
- data/bridge/sdk-core/protos/local/temporal/sdk/core/workflow_activation/workflow_activation.proto +261 -0
- data/bridge/sdk-core/protos/local/temporal/sdk/core/workflow_commands/workflow_commands.proto +297 -0
- data/bridge/sdk-core/protos/local/temporal/sdk/core/workflow_completion/workflow_completion.proto +29 -0
- data/bridge/sdk-core/protos/testsrv_upstream/api-linter.yaml +38 -0
- data/bridge/sdk-core/protos/testsrv_upstream/buf.yaml +13 -0
- data/bridge/sdk-core/protos/testsrv_upstream/dependencies/gogoproto/gogo.proto +141 -0
- data/bridge/sdk-core/protos/testsrv_upstream/temporal/api/testservice/v1/request_response.proto +63 -0
- data/bridge/sdk-core/protos/testsrv_upstream/temporal/api/testservice/v1/service.proto +90 -0
- data/bridge/sdk-core/rustfmt.toml +1 -0
- data/bridge/sdk-core/sdk/Cargo.toml +47 -0
- data/bridge/sdk-core/sdk/LICENSE.txt +23 -0
- data/bridge/sdk-core/sdk/src/activity_context.rs +230 -0
- data/bridge/sdk-core/sdk/src/app_data.rs +37 -0
- data/bridge/sdk-core/sdk/src/conversions.rs +8 -0
- data/bridge/sdk-core/sdk/src/interceptors.rs +17 -0
- data/bridge/sdk-core/sdk/src/lib.rs +792 -0
- data/bridge/sdk-core/sdk/src/payload_converter.rs +11 -0
- data/bridge/sdk-core/sdk/src/workflow_context/options.rs +295 -0
- data/bridge/sdk-core/sdk/src/workflow_context.rs +683 -0
- data/bridge/sdk-core/sdk/src/workflow_future.rs +503 -0
- data/bridge/sdk-core/sdk-core-protos/Cargo.toml +30 -0
- data/bridge/sdk-core/sdk-core-protos/LICENSE.txt +23 -0
- data/bridge/sdk-core/sdk-core-protos/build.rs +108 -0
- data/bridge/sdk-core/sdk-core-protos/src/constants.rs +7 -0
- data/bridge/sdk-core/sdk-core-protos/src/history_builder.rs +497 -0
- data/bridge/sdk-core/sdk-core-protos/src/history_info.rs +230 -0
- data/bridge/sdk-core/sdk-core-protos/src/lib.rs +1910 -0
- data/bridge/sdk-core/sdk-core-protos/src/task_token.rs +38 -0
- data/bridge/sdk-core/sdk-core-protos/src/utilities.rs +14 -0
- data/bridge/sdk-core/test-utils/Cargo.toml +35 -0
- data/bridge/sdk-core/test-utils/src/canned_histories.rs +1579 -0
- data/bridge/sdk-core/test-utils/src/histfetch.rs +28 -0
- data/bridge/sdk-core/test-utils/src/lib.rs +598 -0
- data/bridge/sdk-core/tests/integ_tests/client_tests.rs +36 -0
- data/bridge/sdk-core/tests/integ_tests/ephemeral_server_tests.rs +128 -0
- data/bridge/sdk-core/tests/integ_tests/heartbeat_tests.rs +218 -0
- data/bridge/sdk-core/tests/integ_tests/polling_tests.rs +146 -0
- data/bridge/sdk-core/tests/integ_tests/queries_tests.rs +437 -0
- data/bridge/sdk-core/tests/integ_tests/visibility_tests.rs +93 -0
- data/bridge/sdk-core/tests/integ_tests/workflow_tests/activities.rs +878 -0
- data/bridge/sdk-core/tests/integ_tests/workflow_tests/appdata_propagation.rs +61 -0
- data/bridge/sdk-core/tests/integ_tests/workflow_tests/cancel_external.rs +59 -0
- data/bridge/sdk-core/tests/integ_tests/workflow_tests/cancel_wf.rs +58 -0
- data/bridge/sdk-core/tests/integ_tests/workflow_tests/child_workflows.rs +50 -0
- data/bridge/sdk-core/tests/integ_tests/workflow_tests/continue_as_new.rs +60 -0
- data/bridge/sdk-core/tests/integ_tests/workflow_tests/determinism.rs +54 -0
- data/bridge/sdk-core/tests/integ_tests/workflow_tests/local_activities.rs +634 -0
- data/bridge/sdk-core/tests/integ_tests/workflow_tests/patches.rs +113 -0
- data/bridge/sdk-core/tests/integ_tests/workflow_tests/replay.rs +137 -0
- data/bridge/sdk-core/tests/integ_tests/workflow_tests/resets.rs +93 -0
- data/bridge/sdk-core/tests/integ_tests/workflow_tests/signals.rs +167 -0
- data/bridge/sdk-core/tests/integ_tests/workflow_tests/stickyness.rs +99 -0
- data/bridge/sdk-core/tests/integ_tests/workflow_tests/timers.rs +131 -0
- data/bridge/sdk-core/tests/integ_tests/workflow_tests/upsert_search_attrs.rs +75 -0
- data/bridge/sdk-core/tests/integ_tests/workflow_tests.rs +587 -0
- data/bridge/sdk-core/tests/load_tests.rs +191 -0
- data/bridge/sdk-core/tests/main.rs +111 -0
- data/bridge/sdk-core/tests/runner.rs +93 -0
- data/bridge/src/connection.rs +167 -0
- data/bridge/src/lib.rs +180 -0
- data/bridge/src/runtime.rs +47 -0
- data/bridge/src/worker.rs +73 -0
- data/ext/Rakefile +9 -0
- data/lib/bridge.so +0 -0
- data/lib/gen/dependencies/gogoproto/gogo_pb.rb +14 -0
- data/lib/gen/temporal/api/batch/v1/message_pb.rb +48 -0
- data/lib/gen/temporal/api/cluster/v1/message_pb.rb +67 -0
- data/lib/gen/temporal/api/command/v1/message_pb.rb +166 -0
- data/lib/gen/temporal/api/common/v1/message_pb.rb +69 -0
- data/lib/gen/temporal/api/enums/v1/batch_operation_pb.rb +32 -0
- data/lib/gen/temporal/api/enums/v1/cluster_pb.rb +26 -0
- data/lib/gen/temporal/api/enums/v1/command_type_pb.rb +37 -0
- data/lib/gen/temporal/api/enums/v1/common_pb.rb +41 -0
- data/lib/gen/temporal/api/enums/v1/event_type_pb.rb +67 -0
- data/lib/gen/temporal/api/enums/v1/failed_cause_pb.rb +71 -0
- data/lib/gen/temporal/api/enums/v1/namespace_pb.rb +37 -0
- data/lib/gen/temporal/api/enums/v1/query_pb.rb +31 -0
- data/lib/gen/temporal/api/enums/v1/reset_pb.rb +24 -0
- data/lib/gen/temporal/api/enums/v1/schedule_pb.rb +28 -0
- data/lib/gen/temporal/api/enums/v1/task_queue_pb.rb +30 -0
- data/lib/gen/temporal/api/enums/v1/update_pb.rb +28 -0
- data/lib/gen/temporal/api/enums/v1/workflow_pb.rb +89 -0
- data/lib/gen/temporal/api/errordetails/v1/message_pb.rb +84 -0
- data/lib/gen/temporal/api/failure/v1/message_pb.rb +83 -0
- data/lib/gen/temporal/api/filter/v1/message_pb.rb +40 -0
- data/lib/gen/temporal/api/history/v1/message_pb.rb +489 -0
- data/lib/gen/temporal/api/namespace/v1/message_pb.rb +63 -0
- data/lib/gen/temporal/api/operatorservice/v1/request_response_pb.rb +125 -0
- data/lib/gen/temporal/api/operatorservice/v1/service_pb.rb +20 -0
- data/lib/gen/temporal/api/query/v1/message_pb.rb +38 -0
- data/lib/gen/temporal/api/replication/v1/message_pb.rb +37 -0
- data/lib/gen/temporal/api/schedule/v1/message_pb.rb +128 -0
- data/lib/gen/temporal/api/taskqueue/v1/message_pb.rb +73 -0
- data/lib/gen/temporal/api/update/v1/message_pb.rb +26 -0
- data/lib/gen/temporal/api/version/v1/message_pb.rb +41 -0
- data/lib/gen/temporal/api/workflow/v1/message_pb.rb +110 -0
- data/lib/gen/temporal/api/workflowservice/v1/request_response_pb.rb +771 -0
- data/lib/gen/temporal/api/workflowservice/v1/service_pb.rb +20 -0
- data/lib/gen/temporal/sdk/core/activity_result/activity_result_pb.rb +58 -0
- data/lib/gen/temporal/sdk/core/activity_task/activity_task_pb.rb +57 -0
- data/lib/gen/temporal/sdk/core/bridge/bridge_pb.rb +222 -0
- data/lib/gen/temporal/sdk/core/child_workflow/child_workflow_pb.rb +57 -0
- data/lib/gen/temporal/sdk/core/common/common_pb.rb +22 -0
- data/lib/gen/temporal/sdk/core/core_interface_pb.rb +34 -0
- data/lib/gen/temporal/sdk/core/external_data/external_data_pb.rb +27 -0
- data/lib/gen/temporal/sdk/core/workflow_activation/workflow_activation_pb.rb +164 -0
- data/lib/gen/temporal/sdk/core/workflow_commands/workflow_commands_pb.rb +192 -0
- data/lib/gen/temporal/sdk/core/workflow_completion/workflow_completion_pb.rb +34 -0
- data/lib/temporal/bridge.rb +14 -0
- data/lib/temporal/client/implementation.rb +339 -0
- data/lib/temporal/client/workflow_handle.rb +243 -0
- data/lib/temporal/client.rb +144 -0
- data/lib/temporal/connection.rb +736 -0
- data/lib/temporal/data_converter.rb +150 -0
- data/lib/temporal/error/failure.rb +194 -0
- data/lib/temporal/error/workflow_failure.rb +17 -0
- data/lib/temporal/errors.rb +22 -0
- data/lib/temporal/failure_converter/base.rb +26 -0
- data/lib/temporal/failure_converter/basic.rb +313 -0
- data/lib/temporal/failure_converter.rb +8 -0
- data/lib/temporal/interceptor/chain.rb +27 -0
- data/lib/temporal/interceptor/client.rb +102 -0
- data/lib/temporal/payload_codec/base.rb +32 -0
- data/lib/temporal/payload_converter/base.rb +24 -0
- data/lib/temporal/payload_converter/bytes.rb +26 -0
- data/lib/temporal/payload_converter/composite.rb +47 -0
- data/lib/temporal/payload_converter/encoding_base.rb +35 -0
- data/lib/temporal/payload_converter/json.rb +25 -0
- data/lib/temporal/payload_converter/nil.rb +25 -0
- data/lib/temporal/payload_converter.rb +14 -0
- data/lib/temporal/retry_policy.rb +82 -0
- data/lib/temporal/retry_state.rb +35 -0
- data/lib/temporal/runtime.rb +22 -0
- data/lib/temporal/timeout_type.rb +29 -0
- data/lib/temporal/version.rb +1 -1
- data/lib/temporal/workflow/execution_info.rb +54 -0
- data/lib/temporal/workflow/execution_status.rb +36 -0
- data/lib/temporal/workflow/id_reuse_policy.rb +36 -0
- data/lib/temporal/workflow/query_reject_condition.rb +33 -0
- data/lib/temporal.rb +4 -0
- data/lib/temporalio.rb +3 -1
- data/lib/thermite_patch.rb +23 -0
- data/temporalio.gemspec +41 -0
- metadata +543 -9
- data/temporal.gemspec +0 -20
@@ -0,0 +1,300 @@
|
|
1
|
+
// The MIT License
|
2
|
+
//
|
3
|
+
// Copyright (c) 2020 Temporal Technologies Inc. All rights reserved.
|
4
|
+
//
|
5
|
+
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
+
// of this software and associated documentation files (the "Software"), to deal
|
7
|
+
// in the Software without restriction, including without limitation the rights
|
8
|
+
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
+
// copies of the Software, and to permit persons to whom the Software is
|
10
|
+
// furnished to do so, subject to the following conditions:
|
11
|
+
//
|
12
|
+
// The above copyright notice and this permission notice shall be included in
|
13
|
+
// all copies or substantial portions of the Software.
|
14
|
+
//
|
15
|
+
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
+
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
+
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
+
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
+
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
+
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
21
|
+
// THE SOFTWARE.
|
22
|
+
|
23
|
+
syntax = "proto3";
|
24
|
+
|
25
|
+
package temporal.api.schedule.v1;
|
26
|
+
|
27
|
+
option go_package = "go.temporal.io/api/schedule/v1;schedule";
|
28
|
+
option java_package = "io.temporal.api.schedule.v1";
|
29
|
+
option java_multiple_files = true;
|
30
|
+
option java_outer_classname = "MessageProto";
|
31
|
+
option ruby_package = "Temporal::Api::Schedule::V1";
|
32
|
+
option csharp_namespace = "Temporal.Api.Schedule.V1";
|
33
|
+
|
34
|
+
import "google/protobuf/duration.proto";
|
35
|
+
import "google/protobuf/timestamp.proto";
|
36
|
+
|
37
|
+
import "dependencies/gogoproto/gogo.proto";
|
38
|
+
|
39
|
+
import "temporal/api/common/v1/message.proto";
|
40
|
+
import "temporal/api/enums/v1/schedule.proto";
|
41
|
+
import "temporal/api/workflow/v1/message.proto";
|
42
|
+
|
43
|
+
// CalendarSpec describes an event specification relative to the calendar,
|
44
|
+
// similar to a traditional cron specification. Each field can be one of:
|
45
|
+
// *: matches always
|
46
|
+
// x: matches when the field equals x
|
47
|
+
// x/y : matches when the field equals x+n*y where n is an integer
|
48
|
+
// x-z: matches when the field is between x and z inclusive
|
49
|
+
// w,x,y,...: matches when the field is one of the listed values
|
50
|
+
// Each x, y, z, ... is either a decimal integer, or a month or day of week name
|
51
|
+
// or abbreviation (in the appropriate fields).
|
52
|
+
// A second in time matches if all fields match.
|
53
|
+
// Note that the special case that some cron implementations have for treating
|
54
|
+
// day_of_month and day_of_week as "or" instead of "and" when both are set is
|
55
|
+
// not implemented.
|
56
|
+
// day_of_week can accept 0 or 7 as Sunday
|
57
|
+
// TODO: add relative-to-end-of-month
|
58
|
+
// TODO: add nth day-of-week in month
|
59
|
+
message CalendarSpec {
|
60
|
+
// Expression to match seconds. Default: 0
|
61
|
+
string second = 1;
|
62
|
+
// Expression to match minutes. Default: 0
|
63
|
+
string minute = 2;
|
64
|
+
// Expression to match hours. Default: 0
|
65
|
+
string hour = 3;
|
66
|
+
// Expression to match days of the month. Default: *
|
67
|
+
// (-- api-linter: core::0140::prepositions=disabled
|
68
|
+
// aip.dev/not-precedent: standard name of field --)
|
69
|
+
string day_of_month = 4;
|
70
|
+
// Expression to match months. Default: *
|
71
|
+
string month = 5;
|
72
|
+
// Expression to match years. Default: *
|
73
|
+
string year = 6;
|
74
|
+
// Expression to match days of the week. Default: *
|
75
|
+
string day_of_week = 7;
|
76
|
+
}
|
77
|
+
|
78
|
+
// IntervalSpec matches times that can be expressed as:
|
79
|
+
// epoch + n * interval + phase
|
80
|
+
// where n is an integer.
|
81
|
+
// phase defaults to zero if missing. interval is required.
|
82
|
+
// Both interval and phase must be non-negative and are truncated to the nearest
|
83
|
+
// second before any calculations.
|
84
|
+
// For example, an interval of 1 hour with phase of zero would match every hour,
|
85
|
+
// on the hour. The same interval but a phase of 19 minutes would match every
|
86
|
+
// xx:19:00. An interval of 28 days with phase zero would match
|
87
|
+
// 2022-02-17T00:00:00Z (among other times). The same interval with a phase of 3
|
88
|
+
// days, 5 hours, and 23 minutes would match 2022-02-20T05:23:00Z instead.
|
89
|
+
message IntervalSpec {
|
90
|
+
google.protobuf.Duration interval = 1 [(gogoproto.stdduration) = true];
|
91
|
+
google.protobuf.Duration phase = 2 [(gogoproto.stdduration) = true];
|
92
|
+
}
|
93
|
+
|
94
|
+
// ScheduleSpec is a complete description of a set of absolute timestamps
|
95
|
+
// (possibly infinite) that an action should occur at. The meaning of a
|
96
|
+
// ScheduleSpec depends only on its contents and never changes, except that the
|
97
|
+
// definition of a time zone can change over time (most commonly, when daylight
|
98
|
+
// saving time policy changes for an area). To create a totally self-contained
|
99
|
+
// ScheduleSpec, use UTC or include timezone_data.
|
100
|
+
message ScheduleSpec {
|
101
|
+
// Calendar-based specifications of times.
|
102
|
+
repeated CalendarSpec calendar = 1;
|
103
|
+
// Interval-based specifications of times.
|
104
|
+
repeated IntervalSpec interval = 2;
|
105
|
+
// Any timestamps matching any of the exclude_calendar specs will be
|
106
|
+
// skipped.
|
107
|
+
repeated CalendarSpec exclude_calendar = 3;
|
108
|
+
// Any timestamps before start_time will be skipped. Together, start_time
|
109
|
+
// and end_time make an inclusive interval.
|
110
|
+
google.protobuf.Timestamp start_time = 4 [(gogoproto.stdtime) = true];
|
111
|
+
// Any timestamps after end_time will be skipped.
|
112
|
+
google.protobuf.Timestamp end_time = 5 [(gogoproto.stdtime) = true];
|
113
|
+
// All timestamps will be incremented by a random value from 0 to this
|
114
|
+
// amount of jitter. Default: 1 second
|
115
|
+
google.protobuf.Duration jitter = 6 [(gogoproto.stdduration) = true];
|
116
|
+
|
117
|
+
// Time zone to interpret all CalendarSpecs in.
|
118
|
+
//
|
119
|
+
// If unset, defaults to UTC. We recommend using UTC for your application if
|
120
|
+
// at all possible, to avoid various surprising properties of time zones.
|
121
|
+
//
|
122
|
+
// Time zones may be provided by name, corresponding to names in the IANA
|
123
|
+
// time zone database (see https://www.iana.org/time-zones). The definition
|
124
|
+
// will be loaded by the Temporal server from the environment it runs in.
|
125
|
+
//
|
126
|
+
// If your application requires more control over the time zone definition
|
127
|
+
// used, it may pass in a complete definition in the form of a TZif file
|
128
|
+
// from the time zone database. If present, this will be used instead of
|
129
|
+
// loading anything from the environment. You are then responsible for
|
130
|
+
// updating timezone_data when the definition changes.
|
131
|
+
//
|
132
|
+
// Calendar spec matching is based on literal matching of the clock time
|
133
|
+
// with no special handling of DST: if you write a calendar spec that fires
|
134
|
+
// at 2:30am and specify a time zone that follows DST, that action will not
|
135
|
+
// be triggered on the day that has no 2:30am. Similarly, an action that
|
136
|
+
// fires at 1:30am will be triggered twice on the day that has two 1:30s.
|
137
|
+
string timezone_name = 10;
|
138
|
+
bytes timezone_data = 11;
|
139
|
+
}
|
140
|
+
|
141
|
+
message SchedulePolicies {
|
142
|
+
// Policy for overlaps.
|
143
|
+
// Note that this can be changed after a schedule has taken some actions, and we can't
|
144
|
+
// provide 100% sensible semantics for all changes. The most confusing case would be
|
145
|
+
// changes to/from ALLOW_ALL: with that policy multiple scheduled workflows can run
|
146
|
+
// concurrently, but for all other policies only one can run at a time. Changing
|
147
|
+
// between these two classes will leave all workflows with the other class alone.
|
148
|
+
// E.g., if changing from ALLOW_ALL to CANCEL_OTHER, and there are workflows running,
|
149
|
+
// those workflows will not be cancelled. If changing from ALLOW_ALL to SKIP with
|
150
|
+
// workflows running, the running workflows will not cause the next action to be
|
151
|
+
// skipped.
|
152
|
+
temporal.api.enums.v1.ScheduleOverlapPolicy overlap_policy = 1;
|
153
|
+
|
154
|
+
// Policy for catchups:
|
155
|
+
// If the Temporal server misses an action due to one or more components
|
156
|
+
// being down, and comes back up, the action will be run if the scheduled
|
157
|
+
// time is within this window from the current time.
|
158
|
+
// This value defaults to 60 seconds, and can't be less than 10 seconds.
|
159
|
+
google.protobuf.Duration catchup_window = 2 [(gogoproto.stdduration) = true];
|
160
|
+
|
161
|
+
// If true, and a workflow run fails or times out, turn on "paused".
|
162
|
+
// This applies after retry policies: the full chain of retries must fail to
|
163
|
+
// trigger a pause here.
|
164
|
+
bool pause_on_failure = 3;
|
165
|
+
}
|
166
|
+
|
167
|
+
message ScheduleAction {
|
168
|
+
oneof action {
|
169
|
+
// All fields of NewWorkflowExecutionInfo are valid except for:
|
170
|
+
// - workflow_id_reuse_policy
|
171
|
+
// - cron_schedule
|
172
|
+
// The workflow id of the started workflow may not match this exactly,
|
173
|
+
// it may have a timestamp appended for uniqueness.
|
174
|
+
temporal.api.workflow.v1.NewWorkflowExecutionInfo start_workflow = 1;
|
175
|
+
}
|
176
|
+
}
|
177
|
+
|
178
|
+
message ScheduleActionResult {
|
179
|
+
// Time that the action was taken (according to the schedule, including jitter).
|
180
|
+
google.protobuf.Timestamp schedule_time = 1 [(gogoproto.stdtime) = true];
|
181
|
+
|
182
|
+
// Time that the action was taken (real time).
|
183
|
+
google.protobuf.Timestamp actual_time = 2 [(gogoproto.stdtime) = true];
|
184
|
+
|
185
|
+
// If action was start_workflow:
|
186
|
+
temporal.api.common.v1.WorkflowExecution start_workflow_result = 11;
|
187
|
+
}
|
188
|
+
|
189
|
+
message ScheduleState {
|
190
|
+
// Informative human-readable message with contextual notes, e.g. the reason
|
191
|
+
// a schedule is paused. The system may overwrite this message on certain
|
192
|
+
// conditions, e.g. when pause-on-failure happens.
|
193
|
+
string notes = 1;
|
194
|
+
|
195
|
+
// If true, do not take any actions based on the schedule spec.
|
196
|
+
bool paused = 2;
|
197
|
+
|
198
|
+
// If limited_actions is true, decrement remaining_actions after each action, and do
|
199
|
+
// not take any more scheduled actions if remaining_actions is zero. Actions may still
|
200
|
+
// be taken by explicit request. Skipped actions (due to overlap policy) do not count
|
201
|
+
// against remaining actions.
|
202
|
+
bool limited_actions = 3;
|
203
|
+
int64 remaining_actions = 4;
|
204
|
+
}
|
205
|
+
|
206
|
+
message TriggerImmediatelyRequest {
|
207
|
+
// Override overlap policy for this one request.
|
208
|
+
temporal.api.enums.v1.ScheduleOverlapPolicy overlap_policy = 1;
|
209
|
+
}
|
210
|
+
|
211
|
+
message BackfillRequest {
|
212
|
+
// Time range to evaluate schedule in.
|
213
|
+
google.protobuf.Timestamp start_time = 1 [(gogoproto.stdtime) = true];
|
214
|
+
google.protobuf.Timestamp end_time = 2 [(gogoproto.stdtime) = true];
|
215
|
+
// Override overlap policy for this request.
|
216
|
+
temporal.api.enums.v1.ScheduleOverlapPolicy overlap_policy = 3;
|
217
|
+
}
|
218
|
+
|
219
|
+
message SchedulePatch {
|
220
|
+
// If set, trigger one action immediately.
|
221
|
+
TriggerImmediatelyRequest trigger_immediately = 1;
|
222
|
+
|
223
|
+
// If set, runs though the specified time period(s) and takes actions as if that time
|
224
|
+
// passed by right now, all at once. The overlap policy can be overridden for the
|
225
|
+
// scope of the backfill.
|
226
|
+
repeated BackfillRequest backfill_request = 2;
|
227
|
+
|
228
|
+
// If set, change the state to paused or unpaused (respectively) and set the
|
229
|
+
// notes field to the value of the string.
|
230
|
+
string pause = 3;
|
231
|
+
string unpause = 4;
|
232
|
+
}
|
233
|
+
|
234
|
+
message ScheduleInfo {
|
235
|
+
// Number of actions taken so far.
|
236
|
+
int64 action_count = 1;
|
237
|
+
|
238
|
+
// Number of times a scheduled action was skipped due to missing the catchup window.
|
239
|
+
int64 missed_catchup_window = 2;
|
240
|
+
|
241
|
+
// Number of skipped actions due to overlap.
|
242
|
+
int64 overlap_skipped = 3;
|
243
|
+
|
244
|
+
// Currently-running workflows started by this schedule. (There might be
|
245
|
+
// more than one if the overlap policy allows overlaps.)
|
246
|
+
// Note that the run_ids in here are the original execution run ids as
|
247
|
+
// started by the schedule. If the workflows retried, did continue-as-new,
|
248
|
+
// or were reset, they might still be running but with a different run_id.
|
249
|
+
repeated temporal.api.common.v1.WorkflowExecution running_workflows = 9;
|
250
|
+
|
251
|
+
// Most recent ten actual action times (including manual triggers).
|
252
|
+
repeated ScheduleActionResult recent_actions = 4;
|
253
|
+
|
254
|
+
// Next ten scheduled action times.
|
255
|
+
repeated google.protobuf.Timestamp future_action_times = 5 [(gogoproto.stdtime) = true];
|
256
|
+
|
257
|
+
// Timestamps of schedule creation and last update.
|
258
|
+
google.protobuf.Timestamp create_time = 6 [(gogoproto.stdtime) = true];
|
259
|
+
google.protobuf.Timestamp update_time = 7 [(gogoproto.stdtime) = true];
|
260
|
+
|
261
|
+
// Error for invalid schedule. If this is set, no actions will be taken.
|
262
|
+
string invalid_schedule_error = 8;
|
263
|
+
}
|
264
|
+
|
265
|
+
message Schedule {
|
266
|
+
ScheduleSpec spec = 1;
|
267
|
+
ScheduleAction action = 2;
|
268
|
+
SchedulePolicies policies = 3;
|
269
|
+
ScheduleState state = 4;
|
270
|
+
}
|
271
|
+
|
272
|
+
// ScheduleListInfo is an abbreviated set of values from Schedule and ScheduleInfo
|
273
|
+
// that's returned in ListSchedules.
|
274
|
+
message ScheduleListInfo {
|
275
|
+
// From spec:
|
276
|
+
// Some fields are too large/unimportant for the purpose of listing, so we'll clear them
|
277
|
+
// from this copy of spec: exclude_calendar, jitter, timezone_data.
|
278
|
+
ScheduleSpec spec = 1;
|
279
|
+
|
280
|
+
// From action:
|
281
|
+
// Action is a oneof field, but we need to encode this in JSON and oneof fields don't work
|
282
|
+
// well with JSON. If action is start_workflow, this is set:
|
283
|
+
temporal.api.common.v1.WorkflowType workflow_type = 2;
|
284
|
+
|
285
|
+
// From state:
|
286
|
+
string notes = 3;
|
287
|
+
bool paused = 4;
|
288
|
+
|
289
|
+
// From info (maybe fewer entries):
|
290
|
+
repeated ScheduleActionResult recent_actions = 5;
|
291
|
+
repeated google.protobuf.Timestamp future_action_times = 6 [(gogoproto.stdtime) = true];
|
292
|
+
}
|
293
|
+
|
294
|
+
// ScheduleListEntry is returned by ListSchedules.
|
295
|
+
message ScheduleListEntry {
|
296
|
+
string schedule_id = 1;
|
297
|
+
temporal.api.common.v1.Memo memo = 2;
|
298
|
+
temporal.api.common.v1.SearchAttributes search_attributes = 3;
|
299
|
+
ScheduleListInfo info = 4;
|
300
|
+
}
|
@@ -0,0 +1,108 @@
|
|
1
|
+
// The MIT License
|
2
|
+
//
|
3
|
+
// Copyright (c) 2020 Temporal Technologies Inc. All rights reserved.
|
4
|
+
//
|
5
|
+
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
+
// of this software and associated documentation files (the "Software"), to deal
|
7
|
+
// in the Software without restriction, including without limitation the rights
|
8
|
+
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
+
// copies of the Software, and to permit persons to whom the Software is
|
10
|
+
// furnished to do so, subject to the following conditions:
|
11
|
+
//
|
12
|
+
// The above copyright notice and this permission notice shall be included in
|
13
|
+
// all copies or substantial portions of the Software.
|
14
|
+
//
|
15
|
+
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
+
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
+
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
+
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
+
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
+
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
21
|
+
// THE SOFTWARE.
|
22
|
+
|
23
|
+
syntax = "proto3";
|
24
|
+
|
25
|
+
package temporal.api.taskqueue.v1;
|
26
|
+
|
27
|
+
option go_package = "go.temporal.io/api/taskqueue/v1;taskqueue";
|
28
|
+
option java_package = "io.temporal.api.taskqueue.v1";
|
29
|
+
option java_multiple_files = true;
|
30
|
+
option java_outer_classname = "MessageProto";
|
31
|
+
option ruby_package = "Temporal::Api::TaskQueue::V1";
|
32
|
+
option csharp_namespace = "Temporal.Api.TaskQueue.V1";
|
33
|
+
|
34
|
+
import "google/protobuf/duration.proto";
|
35
|
+
import "google/protobuf/timestamp.proto";
|
36
|
+
import "google/protobuf/wrappers.proto";
|
37
|
+
|
38
|
+
import "dependencies/gogoproto/gogo.proto";
|
39
|
+
|
40
|
+
import "temporal/api/enums/v1/task_queue.proto";
|
41
|
+
|
42
|
+
// See https://docs.temporal.io/docs/concepts/task-queues/
|
43
|
+
message TaskQueue {
|
44
|
+
string name = 1;
|
45
|
+
// Default: TASK_QUEUE_KIND_NORMAL.
|
46
|
+
temporal.api.enums.v1.TaskQueueKind kind = 2;
|
47
|
+
}
|
48
|
+
|
49
|
+
// Only applies to activity task queues
|
50
|
+
message TaskQueueMetadata {
|
51
|
+
// Allows throttling dispatch of tasks from this queue
|
52
|
+
google.protobuf.DoubleValue max_tasks_per_second = 1;
|
53
|
+
}
|
54
|
+
|
55
|
+
message TaskQueueStatus {
|
56
|
+
int64 backlog_count_hint = 1;
|
57
|
+
int64 read_level = 2;
|
58
|
+
int64 ack_level = 3;
|
59
|
+
double rate_per_second = 4;
|
60
|
+
TaskIdBlock task_id_block = 5;
|
61
|
+
}
|
62
|
+
|
63
|
+
message TaskIdBlock {
|
64
|
+
int64 start_id = 1;
|
65
|
+
int64 end_id = 2;
|
66
|
+
}
|
67
|
+
|
68
|
+
message TaskQueuePartitionMetadata {
|
69
|
+
string key = 1;
|
70
|
+
string owner_host_name = 2;
|
71
|
+
}
|
72
|
+
|
73
|
+
message PollerInfo {
|
74
|
+
// Unix Nano
|
75
|
+
google.protobuf.Timestamp last_access_time = 1 [(gogoproto.stdtime) = true];
|
76
|
+
string identity = 2;
|
77
|
+
double rate_per_second = 3;
|
78
|
+
// If a worker has specified an ID for use with the worker versioning feature while polling,
|
79
|
+
// that id must appear here.
|
80
|
+
string worker_versioning_build_id = 4;
|
81
|
+
}
|
82
|
+
|
83
|
+
message StickyExecutionAttributes {
|
84
|
+
TaskQueue worker_task_queue = 1;
|
85
|
+
// (-- api-linter: core::0140::prepositions=disabled
|
86
|
+
// aip.dev/not-precedent: "to" is used to indicate interval. --)
|
87
|
+
google.protobuf.Duration schedule_to_start_timeout = 2 [(gogoproto.stdduration) = true];
|
88
|
+
}
|
89
|
+
|
90
|
+
// Used by the worker versioning APIs, represents a node in the version graph for a particular
|
91
|
+
// task queue
|
92
|
+
message VersionIdNode {
|
93
|
+
VersionId version = 1;
|
94
|
+
// A pointer to the previous version this version is considered to be compatible with
|
95
|
+
VersionIdNode previous_compatible = 2;
|
96
|
+
// A pointer to the last incompatible version (previous major version)
|
97
|
+
VersionIdNode previous_incompatible = 3;
|
98
|
+
}
|
99
|
+
|
100
|
+
// Used by the worker versioning APIs, represents a specific version of something
|
101
|
+
// Currently, that's just a whole-worker id. In the future, if we support
|
102
|
+
// WASM workflow bundle based versioning, for example, then the inside of this
|
103
|
+
// message may become a oneof of different version types.
|
104
|
+
message VersionId {
|
105
|
+
// An opaque whole-worker identifier
|
106
|
+
string worker_build_id = 1;
|
107
|
+
}
|
108
|
+
|
@@ -0,0 +1,46 @@
|
|
1
|
+
// The MIT License
|
2
|
+
//
|
3
|
+
// Copyright (c) 2020 Temporal Technologies Inc. All rights reserved.
|
4
|
+
//
|
5
|
+
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
+
// of this software and associated documentation files (the "Software"), to deal
|
7
|
+
// in the Software without restriction, including without limitation the rights
|
8
|
+
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
+
// copies of the Software, and to permit persons to whom the Software is
|
10
|
+
// furnished to do so, subject to the following conditions:
|
11
|
+
//
|
12
|
+
// The above copyright notice and this permission notice shall be included in
|
13
|
+
// all copies or substantial portions of the Software.
|
14
|
+
//
|
15
|
+
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
+
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
+
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
+
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
+
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
+
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
21
|
+
// THE SOFTWARE.
|
22
|
+
|
23
|
+
syntax = "proto3";
|
24
|
+
|
25
|
+
package temporal.api.update.v1;
|
26
|
+
|
27
|
+
option go_package = "go.temporal.io/api/update/v1;update";
|
28
|
+
option java_package = "io.temporal.api.update.v1";
|
29
|
+
option java_multiple_files = true;
|
30
|
+
option java_outer_classname = "MessageProto";
|
31
|
+
option ruby_package = "Temporal::Api::Update::V1";
|
32
|
+
option csharp_namespace = "Temporal.Api.Update.V1";
|
33
|
+
|
34
|
+
import "temporal/api/common/v1/message.proto";
|
35
|
+
|
36
|
+
message WorkflowUpdate {
|
37
|
+
// Headers that are passed with the update to the processing workflow.
|
38
|
+
// These can include things like auth or tracing tokens.
|
39
|
+
temporal.api.common.v1.Header header = 1;
|
40
|
+
|
41
|
+
// The name of the update function to invoke on the target workflow.
|
42
|
+
string name = 2;
|
43
|
+
|
44
|
+
// The arguments to pass to the named update function.
|
45
|
+
temporal.api.common.v1.Payloads args = 3;
|
46
|
+
}
|
@@ -0,0 +1,59 @@
|
|
1
|
+
// The MIT License
|
2
|
+
//
|
3
|
+
// Copyright (c) 2020 Temporal Technologies Inc. All rights reserved.
|
4
|
+
//
|
5
|
+
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
+
// of this software and associated documentation files (the "Software"), to deal
|
7
|
+
// in the Software without restriction, including without limitation the rights
|
8
|
+
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
+
// copies of the Software, and to permit persons to whom the Software is
|
10
|
+
// furnished to do so, subject to the following conditions:
|
11
|
+
//
|
12
|
+
// The above copyright notice and this permission notice shall be included in
|
13
|
+
// all copies or substantial portions of the Software.
|
14
|
+
//
|
15
|
+
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
+
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
+
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
+
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
+
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
+
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
21
|
+
// THE SOFTWARE.
|
22
|
+
|
23
|
+
syntax = "proto3";
|
24
|
+
|
25
|
+
package temporal.api.version.v1;
|
26
|
+
|
27
|
+
option go_package = "go.temporal.io/api/version/v1;version";
|
28
|
+
option java_package = "io.temporal.api.version.v1";
|
29
|
+
option java_multiple_files = true;
|
30
|
+
option java_outer_classname = "MessageProto";
|
31
|
+
option ruby_package = "Temporal::Api::Version::V1";
|
32
|
+
option csharp_namespace = "Temporal.Api.Version.V1";
|
33
|
+
|
34
|
+
import "google/protobuf/timestamp.proto";
|
35
|
+
import "dependencies/gogoproto/gogo.proto";
|
36
|
+
import "temporal/api/enums/v1/common.proto";
|
37
|
+
|
38
|
+
// ReleaseInfo contains information about specific version of temporal.
|
39
|
+
message ReleaseInfo {
|
40
|
+
string version = 1;
|
41
|
+
google.protobuf.Timestamp release_time = 2 [(gogoproto.stdtime) = true];
|
42
|
+
string notes = 3;
|
43
|
+
}
|
44
|
+
|
45
|
+
// Alert contains notification and severity.
|
46
|
+
message Alert {
|
47
|
+
string message = 1;
|
48
|
+
temporal.api.enums.v1.Severity severity = 2;
|
49
|
+
}
|
50
|
+
|
51
|
+
// VersionInfo contains details about current and recommended release versions as well as alerts and upgrade instructions.
|
52
|
+
message VersionInfo {
|
53
|
+
ReleaseInfo current = 1;
|
54
|
+
ReleaseInfo recommended = 2;
|
55
|
+
string instructions = 3;
|
56
|
+
repeated Alert alerts = 4;
|
57
|
+
google.protobuf.Timestamp last_update_time = 5 [(gogoproto.stdtime) = true];
|
58
|
+
}
|
59
|
+
|
@@ -0,0 +1,145 @@
|
|
1
|
+
// The MIT License
|
2
|
+
//
|
3
|
+
// Copyright (c) 2020 Temporal Technologies Inc. All rights reserved.
|
4
|
+
//
|
5
|
+
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
+
// of this software and associated documentation files (the "Software"), to deal
|
7
|
+
// in the Software without restriction, including without limitation the rights
|
8
|
+
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
+
// copies of the Software, and to permit persons to whom the Software is
|
10
|
+
// furnished to do so, subject to the following conditions:
|
11
|
+
//
|
12
|
+
// The above copyright notice and this permission notice shall be included in
|
13
|
+
// all copies or substantial portions of the Software.
|
14
|
+
//
|
15
|
+
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
+
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
+
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
+
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
+
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
+
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
21
|
+
// THE SOFTWARE.
|
22
|
+
|
23
|
+
syntax = "proto3";
|
24
|
+
|
25
|
+
package temporal.api.workflow.v1;
|
26
|
+
|
27
|
+
option go_package = "go.temporal.io/api/workflow/v1;workflow";
|
28
|
+
option java_package = "io.temporal.api.workflow.v1";
|
29
|
+
option java_multiple_files = true;
|
30
|
+
option java_outer_classname = "MessageProto";
|
31
|
+
option ruby_package = "Temporal::Api::Workflow::V1";
|
32
|
+
option csharp_namespace = "Temporal.Api.Workflow.V1";
|
33
|
+
|
34
|
+
import "google/protobuf/duration.proto";
|
35
|
+
import "google/protobuf/timestamp.proto";
|
36
|
+
|
37
|
+
import "dependencies/gogoproto/gogo.proto";
|
38
|
+
|
39
|
+
import "temporal/api/enums/v1/workflow.proto";
|
40
|
+
import "temporal/api/common/v1/message.proto";
|
41
|
+
import "temporal/api/failure/v1/message.proto";
|
42
|
+
import "temporal/api/taskqueue/v1/message.proto";
|
43
|
+
|
44
|
+
message WorkflowExecutionInfo {
|
45
|
+
temporal.api.common.v1.WorkflowExecution execution = 1;
|
46
|
+
temporal.api.common.v1.WorkflowType type = 2;
|
47
|
+
google.protobuf.Timestamp start_time = 3 [(gogoproto.stdtime) = true];
|
48
|
+
google.protobuf.Timestamp close_time = 4 [(gogoproto.stdtime) = true];
|
49
|
+
temporal.api.enums.v1.WorkflowExecutionStatus status = 5;
|
50
|
+
int64 history_length = 6;
|
51
|
+
string parent_namespace_id = 7;
|
52
|
+
temporal.api.common.v1.WorkflowExecution parent_execution = 8;
|
53
|
+
google.protobuf.Timestamp execution_time = 9 [(gogoproto.stdtime) = true];
|
54
|
+
temporal.api.common.v1.Memo memo = 10;
|
55
|
+
temporal.api.common.v1.SearchAttributes search_attributes = 11;
|
56
|
+
ResetPoints auto_reset_points = 12;
|
57
|
+
string task_queue = 13;
|
58
|
+
int64 state_transition_count = 14;
|
59
|
+
}
|
60
|
+
|
61
|
+
message WorkflowExecutionConfig {
|
62
|
+
temporal.api.taskqueue.v1.TaskQueue task_queue = 1;
|
63
|
+
google.protobuf.Duration workflow_execution_timeout = 2 [(gogoproto.stdduration) = true];
|
64
|
+
google.protobuf.Duration workflow_run_timeout = 3 [(gogoproto.stdduration) = true];
|
65
|
+
google.protobuf.Duration default_workflow_task_timeout = 4 [(gogoproto.stdduration) = true];
|
66
|
+
}
|
67
|
+
|
68
|
+
message PendingActivityInfo {
|
69
|
+
string activity_id = 1;
|
70
|
+
temporal.api.common.v1.ActivityType activity_type = 2;
|
71
|
+
temporal.api.enums.v1.PendingActivityState state = 3;
|
72
|
+
temporal.api.common.v1.Payloads heartbeat_details = 4;
|
73
|
+
google.protobuf.Timestamp last_heartbeat_time = 5 [(gogoproto.stdtime) = true];
|
74
|
+
google.protobuf.Timestamp last_started_time = 6 [(gogoproto.stdtime) = true];
|
75
|
+
int32 attempt = 7;
|
76
|
+
int32 maximum_attempts = 8;
|
77
|
+
google.protobuf.Timestamp scheduled_time = 9 [(gogoproto.stdtime) = true];
|
78
|
+
google.protobuf.Timestamp expiration_time = 10 [(gogoproto.stdtime) = true];
|
79
|
+
temporal.api.failure.v1.Failure last_failure = 11;
|
80
|
+
string last_worker_identity = 12;
|
81
|
+
}
|
82
|
+
|
83
|
+
message PendingChildExecutionInfo {
|
84
|
+
string workflow_id = 1;
|
85
|
+
string run_id = 2;
|
86
|
+
string workflow_type_name = 3;
|
87
|
+
int64 initiated_id = 4;
|
88
|
+
// Default: PARENT_CLOSE_POLICY_TERMINATE.
|
89
|
+
temporal.api.enums.v1.ParentClosePolicy parent_close_policy = 5;
|
90
|
+
}
|
91
|
+
|
92
|
+
message PendingWorkflowTaskInfo {
|
93
|
+
temporal.api.enums.v1.PendingWorkflowTaskState state = 1;
|
94
|
+
google.protobuf.Timestamp scheduled_time = 2 [(gogoproto.stdtime) = true];
|
95
|
+
// original_scheduled_time is the scheduled time of the first workflow task during workflow task heartbeat.
|
96
|
+
// Heartbeat workflow task is done by RespondWorkflowTaskComplete with ForceCreateNewWorkflowTask == true and no command
|
97
|
+
// In this case, OriginalScheduledTime won't change. Then when current time - original_scheduled_time exceeds
|
98
|
+
// some threshold, the workflow task will be forced timeout.
|
99
|
+
google.protobuf.Timestamp original_scheduled_time = 3 [(gogoproto.stdtime) = true];
|
100
|
+
google.protobuf.Timestamp started_time = 4 [(gogoproto.stdtime) = true];
|
101
|
+
int32 attempt = 5;
|
102
|
+
}
|
103
|
+
|
104
|
+
message ResetPoints {
|
105
|
+
repeated ResetPointInfo points = 1;
|
106
|
+
}
|
107
|
+
|
108
|
+
message ResetPointInfo {
|
109
|
+
string binary_checksum = 1;
|
110
|
+
string run_id = 2;
|
111
|
+
int64 first_workflow_task_completed_id = 3;
|
112
|
+
google.protobuf.Timestamp create_time = 4 [(gogoproto.stdtime) = true];
|
113
|
+
// (-- api-linter: core::0214::resource-expiry=disabled
|
114
|
+
// aip.dev/not-precedent: TTL is not defined for ResetPointInfo. --)
|
115
|
+
// The time that the run is deleted due to retention.
|
116
|
+
google.protobuf.Timestamp expire_time = 5 [(gogoproto.stdtime) = true];
|
117
|
+
// false if the reset point has pending childWFs/reqCancels/signalExternals.
|
118
|
+
bool resettable = 6;
|
119
|
+
}
|
120
|
+
|
121
|
+
// NewWorkflowExecutionInfo is a shared message that encapsulates all the
|
122
|
+
// required arguments to starting a workflow in different contexts.
|
123
|
+
message NewWorkflowExecutionInfo {
|
124
|
+
string workflow_id = 1;
|
125
|
+
temporal.api.common.v1.WorkflowType workflow_type = 2;
|
126
|
+
temporal.api.taskqueue.v1.TaskQueue task_queue = 3;
|
127
|
+
// Serialized arguments to the workflow.
|
128
|
+
temporal.api.common.v1.Payloads input = 4;
|
129
|
+
// Total workflow execution timeout including retries and continue as new.
|
130
|
+
google.protobuf.Duration workflow_execution_timeout = 5 [(gogoproto.stdduration) = true];
|
131
|
+
// Timeout of a single workflow run.
|
132
|
+
google.protobuf.Duration workflow_run_timeout = 6 [(gogoproto.stdduration) = true];
|
133
|
+
// Timeout of a single workflow task.
|
134
|
+
google.protobuf.Duration workflow_task_timeout = 7 [(gogoproto.stdduration) = true];
|
135
|
+
// Default: WORKFLOW_ID_REUSE_POLICY_ALLOW_DUPLICATE.
|
136
|
+
temporal.api.enums.v1.WorkflowIdReusePolicy workflow_id_reuse_policy = 8;
|
137
|
+
// The retry policy for the workflow. Will never exceed `workflow_execution_timeout`.
|
138
|
+
temporal.api.common.v1.RetryPolicy retry_policy = 9;
|
139
|
+
// See https://docs.temporal.io/docs/content/what-is-a-temporal-cron-job/
|
140
|
+
string cron_schedule = 10;
|
141
|
+
temporal.api.common.v1.Memo memo = 11;
|
142
|
+
temporal.api.common.v1.SearchAttributes search_attributes = 12;
|
143
|
+
temporal.api.common.v1.Header header = 13;
|
144
|
+
}
|
145
|
+
|