temporalio 0.0.1
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/Gemfile +3 -0
- data/LICENSE +20 -0
- 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 +3 -0
- 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 +8 -0
- data/lib/temporalio.rb +3 -0
- data/lib/thermite_patch.rb +23 -0
- data/temporalio.gemspec +41 -0
- metadata +583 -0
data/bridge/src/lib.rs
ADDED
@@ -0,0 +1,180 @@
|
|
1
|
+
#[macro_use]
|
2
|
+
extern crate rutie;
|
3
|
+
extern crate lazy_static;
|
4
|
+
|
5
|
+
mod connection;
|
6
|
+
mod runtime;
|
7
|
+
mod worker;
|
8
|
+
|
9
|
+
use connection::{Connection, RpcParams};
|
10
|
+
use runtime::Runtime;
|
11
|
+
use rutie::{
|
12
|
+
Module, Object, Symbol, RString, Encoding, AnyObject, AnyException, Exception, VM, Thread,
|
13
|
+
NilClass, Hash, Integer,
|
14
|
+
};
|
15
|
+
use std::collections::HashMap;
|
16
|
+
use temporal_sdk_core::{Logger, TelemetryOptionsBuilder};
|
17
|
+
use worker::{Worker, WorkerResult};
|
18
|
+
|
19
|
+
const RUNTIME_THREAD_COUNT: u8 = 2;
|
20
|
+
|
21
|
+
fn raise_bridge_exception(message: &str) {
|
22
|
+
VM::raise_ex(AnyException::new("Temporal::Bridge::Error", Some(message)));
|
23
|
+
}
|
24
|
+
|
25
|
+
fn wrap_bytes(bytes: &[u8]) -> AnyObject {
|
26
|
+
let enc = Encoding::find("ASCII-8BIT").unwrap();
|
27
|
+
RString::from_bytes(bytes, &enc).to_any_object()
|
28
|
+
}
|
29
|
+
|
30
|
+
fn to_hash_map(hash: Hash) -> HashMap<String, String> {
|
31
|
+
let mut result = HashMap::new();
|
32
|
+
|
33
|
+
hash.each(|k, v| {
|
34
|
+
result.insert(
|
35
|
+
k.try_convert_to::<RString>().map_err(VM::raise_ex).unwrap().to_string(),
|
36
|
+
v.try_convert_to::<RString>().map_err(VM::raise_ex).unwrap().to_string()
|
37
|
+
);
|
38
|
+
});
|
39
|
+
|
40
|
+
result
|
41
|
+
}
|
42
|
+
|
43
|
+
wrappable_struct!(Connection, ConnectionWrapper, CONNECTION_WRAPPER);
|
44
|
+
wrappable_struct!(Runtime, RuntimeWrapper, RUNTIME_WRAPPER);
|
45
|
+
wrappable_struct!(Worker, WorkerWrapper, WORKER_WRAPPER);
|
46
|
+
|
47
|
+
class!(TemporalBridge);
|
48
|
+
|
49
|
+
methods!(
|
50
|
+
TemporalBridge,
|
51
|
+
_rtself, // somehow compiler is sure this is unused and insists on the "_"
|
52
|
+
|
53
|
+
fn create_connection(runtime: AnyObject, host: RString) -> AnyObject {
|
54
|
+
let host = host.map_err(VM::raise_ex).unwrap().to_string();
|
55
|
+
let runtime = runtime.unwrap();
|
56
|
+
let runtime = runtime.get_data(&*RUNTIME_WRAPPER);
|
57
|
+
|
58
|
+
let result = Thread::call_without_gvl(move || {
|
59
|
+
Connection::connect(runtime.tokio_runtime.clone(), host.clone())
|
60
|
+
}, Some(|| {}));
|
61
|
+
|
62
|
+
let connection = result.map_err(|e| raise_bridge_exception(&e.to_string())).unwrap();
|
63
|
+
|
64
|
+
Module::from_existing("Temporal")
|
65
|
+
.get_nested_module("Bridge")
|
66
|
+
.get_nested_class("Connection")
|
67
|
+
.wrap_data(connection, &*CONNECTION_WRAPPER)
|
68
|
+
}
|
69
|
+
|
70
|
+
fn call_rpc(rpc: Symbol, request: RString, metadata: Hash, timeout: Integer) -> RString {
|
71
|
+
let rpc = rpc.map_err(VM::raise_ex).unwrap().to_string();
|
72
|
+
let request = request.map_err(VM::raise_ex).unwrap().to_string().as_bytes().to_vec();
|
73
|
+
let metadata = to_hash_map(metadata.map_err(VM::raise_ex).unwrap());
|
74
|
+
let timeout = timeout.map_or(None, |v| Some(v.to_u64()));
|
75
|
+
|
76
|
+
let result = Thread::call_without_gvl(move || {
|
77
|
+
let connection = _rtself.get_data_mut(&*CONNECTION_WRAPPER);
|
78
|
+
let params = RpcParams {
|
79
|
+
rpc: rpc.clone(),
|
80
|
+
request: request.clone(),
|
81
|
+
metadata: metadata.clone(),
|
82
|
+
timeout_millis: timeout
|
83
|
+
};
|
84
|
+
connection.call(params)
|
85
|
+
}, Some(|| {}));
|
86
|
+
|
87
|
+
let response = result.map_err(|e| raise_bridge_exception(&e.to_string())).unwrap();
|
88
|
+
|
89
|
+
let enc = Encoding::find("ASCII-8BIT").unwrap();
|
90
|
+
RString::from_bytes(&response, &enc)
|
91
|
+
}
|
92
|
+
|
93
|
+
// TODO: Add telemetry configuration to this interface
|
94
|
+
fn init_telemetry() -> NilClass {
|
95
|
+
let telemetry_config = TelemetryOptionsBuilder::default()
|
96
|
+
.tracing_filter("temporal_sdk_core=DEBUG".to_string())
|
97
|
+
.logging(Logger::Console)
|
98
|
+
.build()
|
99
|
+
.map_err(|e| raise_bridge_exception(&e.to_string()))
|
100
|
+
.unwrap();
|
101
|
+
|
102
|
+
temporal_sdk_core::telemetry_init(&telemetry_config)
|
103
|
+
.expect("Unable to initialize telemetry");
|
104
|
+
|
105
|
+
NilClass::new()
|
106
|
+
}
|
107
|
+
|
108
|
+
fn init_runtime() -> AnyObject {
|
109
|
+
let runtime = Runtime::new(RUNTIME_THREAD_COUNT);
|
110
|
+
|
111
|
+
Module::from_existing("Temporal")
|
112
|
+
.get_nested_module("Bridge")
|
113
|
+
.get_nested_class("Runtime")
|
114
|
+
.wrap_data(runtime, &*RUNTIME_WRAPPER)
|
115
|
+
}
|
116
|
+
|
117
|
+
fn run_callback_loop() -> NilClass {
|
118
|
+
let runtime = _rtself.get_data_mut(&*RUNTIME_WRAPPER);
|
119
|
+
runtime.run_callback_loop();
|
120
|
+
|
121
|
+
NilClass::new()
|
122
|
+
}
|
123
|
+
|
124
|
+
fn create_worker(runtime: AnyObject, connection: AnyObject, namespace: RString, task_queue: RString) -> AnyObject {
|
125
|
+
let namespace = namespace.map_err(VM::raise_ex).unwrap().to_string();
|
126
|
+
let task_queue = task_queue.map_err(VM::raise_ex).unwrap().to_string();
|
127
|
+
let runtime = runtime.unwrap();
|
128
|
+
let runtime = runtime.get_data(&*RUNTIME_WRAPPER);
|
129
|
+
let connection = connection.unwrap();
|
130
|
+
let connection = connection.get_data(&*CONNECTION_WRAPPER);
|
131
|
+
let worker = Worker::new(runtime, &connection.client, &namespace, &task_queue);
|
132
|
+
|
133
|
+
Module::from_existing("Temporal")
|
134
|
+
.get_nested_module("Bridge")
|
135
|
+
.get_nested_class("Worker")
|
136
|
+
.wrap_data(worker.unwrap(), &*WORKER_WRAPPER)
|
137
|
+
}
|
138
|
+
|
139
|
+
fn worker_poll_activity_task() -> NilClass {
|
140
|
+
if !VM::is_block_given() {
|
141
|
+
panic!("Called #poll_activity_task without a block");
|
142
|
+
}
|
143
|
+
|
144
|
+
let ruby_callback = VM::block_proc();
|
145
|
+
|
146
|
+
let callback = move |result: WorkerResult| {
|
147
|
+
let bytes = result.map_err(|e| raise_bridge_exception(&e.to_string())).unwrap();
|
148
|
+
ruby_callback.call(&[wrap_bytes(&bytes)]);
|
149
|
+
};
|
150
|
+
|
151
|
+
let worker = _rtself.get_data_mut(&*WORKER_WRAPPER);
|
152
|
+
let result = worker.poll_activity_task(callback);
|
153
|
+
|
154
|
+
result.map_err(|e| raise_bridge_exception(&e.to_string())).unwrap();
|
155
|
+
|
156
|
+
NilClass::new()
|
157
|
+
}
|
158
|
+
);
|
159
|
+
|
160
|
+
#[no_mangle]
|
161
|
+
pub extern "C" fn init_bridge() {
|
162
|
+
Module::from_existing("Temporal").get_nested_module("Bridge").define(|module| {
|
163
|
+
module.def_self("init_telemetry", init_telemetry);
|
164
|
+
|
165
|
+
module.define_nested_class("Runtime", None).define(|klass| {
|
166
|
+
klass.def_self("init", init_runtime);
|
167
|
+
klass.def("run_callback_loop", run_callback_loop);
|
168
|
+
});
|
169
|
+
|
170
|
+
module.define_nested_class("Connection", None).define(|klass| {
|
171
|
+
klass.def_self("connect", create_connection);
|
172
|
+
klass.def("call", call_rpc);
|
173
|
+
});
|
174
|
+
|
175
|
+
module.define_nested_class("Worker", None).define(|klass| {
|
176
|
+
klass.def_self("create", create_worker);
|
177
|
+
klass.def("poll_activity_task", worker_poll_activity_task);
|
178
|
+
});
|
179
|
+
});
|
180
|
+
}
|
@@ -0,0 +1,47 @@
|
|
1
|
+
use rutie::Thread;
|
2
|
+
use std::sync::Arc;
|
3
|
+
use std::sync::mpsc::{channel, Sender, Receiver};
|
4
|
+
use tokio::runtime::{Builder, Runtime as TokioRuntime};
|
5
|
+
|
6
|
+
pub type Callback = Box<dyn FnOnce() + Send + 'static>;
|
7
|
+
|
8
|
+
pub enum Command {
|
9
|
+
RunCallback(Callback),
|
10
|
+
Shutdown,
|
11
|
+
}
|
12
|
+
|
13
|
+
pub struct Runtime {
|
14
|
+
pub tokio_runtime: Arc<TokioRuntime>,
|
15
|
+
pub callback_tx: Sender<Command>,
|
16
|
+
callback_rx: Receiver<Command>,
|
17
|
+
}
|
18
|
+
|
19
|
+
impl Runtime {
|
20
|
+
pub fn new(thread_count: u8) -> Self {
|
21
|
+
let (tx, rx): (Sender<Command>, Receiver<Command>) = channel();
|
22
|
+
let tokio_runtime = Arc::new(
|
23
|
+
Builder::new_multi_thread()
|
24
|
+
.worker_threads(thread_count.into())
|
25
|
+
.enable_all()
|
26
|
+
.thread_name("core")
|
27
|
+
.build()
|
28
|
+
.expect("Unable to start a runtime")
|
29
|
+
);
|
30
|
+
|
31
|
+
Runtime { tokio_runtime, callback_tx: tx, callback_rx: rx }
|
32
|
+
}
|
33
|
+
|
34
|
+
// This function is expected to be called from a Ruby thread
|
35
|
+
pub fn run_callback_loop(&self) {
|
36
|
+
let unblock = || {
|
37
|
+
self.callback_tx.send(Command::Shutdown {}).expect("Unable to close callback loop");
|
38
|
+
};
|
39
|
+
|
40
|
+
while let Ok(msg) = Thread::call_without_gvl(|| self.callback_rx.recv(), Some(unblock)) {
|
41
|
+
match msg {
|
42
|
+
Command::RunCallback(callback) => callback(),
|
43
|
+
Command::Shutdown => break,
|
44
|
+
}
|
45
|
+
};
|
46
|
+
}
|
47
|
+
}
|
@@ -0,0 +1,73 @@
|
|
1
|
+
use crate::connection::Client;
|
2
|
+
use crate::runtime::{Callback, Command, Runtime};
|
3
|
+
use prost::Message;
|
4
|
+
use std::sync::Arc;
|
5
|
+
use std::sync::mpsc::Sender;
|
6
|
+
use temporal_sdk_core::api::{Worker as WorkerTrait};
|
7
|
+
use temporal_sdk_core_api::worker::{WorkerConfigBuilder, WorkerConfigBuilderError};
|
8
|
+
use thiserror::Error;
|
9
|
+
use tokio::runtime::{Runtime as TokioRuntime};
|
10
|
+
|
11
|
+
#[derive(Error, Debug)]
|
12
|
+
pub enum WorkerError {
|
13
|
+
#[error(transparent)]
|
14
|
+
EncodeError(#[from] prost::EncodeError),
|
15
|
+
|
16
|
+
#[error(transparent)]
|
17
|
+
InvalidWorkerOptions(#[from] WorkerConfigBuilderError),
|
18
|
+
|
19
|
+
#[error(transparent)]
|
20
|
+
UnableToPollActivityTask(#[from] temporal_sdk_core::api::errors::PollActivityError),
|
21
|
+
|
22
|
+
#[error("Unable to send a request. Channel is closed")]
|
23
|
+
ChannelClosed(),
|
24
|
+
}
|
25
|
+
|
26
|
+
pub type WorkerResult = Result<Vec<u8>, WorkerError>;
|
27
|
+
|
28
|
+
pub struct Worker {
|
29
|
+
core_worker: Arc<temporal_sdk_core::Worker>,
|
30
|
+
tokio_runtime: Arc<TokioRuntime>,
|
31
|
+
callback_tx: Sender<Command>,
|
32
|
+
}
|
33
|
+
|
34
|
+
impl Worker {
|
35
|
+
// TODO: Extend this to include full worker config
|
36
|
+
pub fn new(runtime: &Runtime, client: &Client, namespace: &str, task_queue: &str) -> Result<Worker, WorkerError> {
|
37
|
+
let config = WorkerConfigBuilder::default()
|
38
|
+
.namespace(namespace)
|
39
|
+
.task_queue(task_queue)
|
40
|
+
.build()?;
|
41
|
+
|
42
|
+
let core_worker = runtime.tokio_runtime.block_on(async move {
|
43
|
+
temporal_sdk_core::init_worker(config, client.clone())
|
44
|
+
});
|
45
|
+
|
46
|
+
Ok(Worker {
|
47
|
+
core_worker: Arc::new(core_worker),
|
48
|
+
tokio_runtime: runtime.tokio_runtime.clone(),
|
49
|
+
callback_tx: runtime.callback_tx.clone(),
|
50
|
+
})
|
51
|
+
}
|
52
|
+
|
53
|
+
pub fn poll_activity_task<F>(&self, callback: F) -> Result<(), WorkerError> where F: FnOnce(WorkerResult) + Send + 'static {
|
54
|
+
let core_worker = self.core_worker.clone();
|
55
|
+
let callback_tx = self.callback_tx.clone();
|
56
|
+
|
57
|
+
self.tokio_runtime.spawn(async move {
|
58
|
+
let result = core_worker.poll_activity_task().await;
|
59
|
+
|
60
|
+
let callback: Callback = match result {
|
61
|
+
Ok(task) => {
|
62
|
+
let bytes = task.encode_to_vec();
|
63
|
+
Box::new(move || callback(Ok(bytes)))
|
64
|
+
},
|
65
|
+
Err(e) => Box::new(move || callback(Err(WorkerError::UnableToPollActivityTask(e))))
|
66
|
+
};
|
67
|
+
|
68
|
+
callback_tx.send(Command::RunCallback(callback)).expect("Unable to send a callback");
|
69
|
+
});
|
70
|
+
|
71
|
+
Ok(())
|
72
|
+
}
|
73
|
+
}
|
data/ext/Rakefile
ADDED
data/lib/bridge.so
ADDED
Binary file
|
@@ -0,0 +1,14 @@
|
|
1
|
+
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
2
|
+
# source: dependencies/gogoproto/gogo.proto
|
3
|
+
|
4
|
+
require 'google/protobuf'
|
5
|
+
|
6
|
+
require 'google/protobuf/descriptor_pb'
|
7
|
+
|
8
|
+
Google::Protobuf::DescriptorPool.generated_pool.build do
|
9
|
+
add_file("dependencies/gogoproto/gogo.proto", :syntax => :proto2) do
|
10
|
+
end
|
11
|
+
end
|
12
|
+
|
13
|
+
module Gogoproto
|
14
|
+
end
|
@@ -0,0 +1,48 @@
|
|
1
|
+
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
2
|
+
# source: temporal/api/batch/v1/message.proto
|
3
|
+
|
4
|
+
require 'google/protobuf'
|
5
|
+
|
6
|
+
require 'dependencies/gogoproto/gogo_pb'
|
7
|
+
require 'google/protobuf/timestamp_pb'
|
8
|
+
require 'temporal/api/common/v1/message_pb'
|
9
|
+
require 'temporal/api/enums/v1/batch_operation_pb'
|
10
|
+
|
11
|
+
Google::Protobuf::DescriptorPool.generated_pool.build do
|
12
|
+
add_file("temporal/api/batch/v1/message.proto", :syntax => :proto3) do
|
13
|
+
add_message "temporal.api.batch.v1.BatchOperationInfo" do
|
14
|
+
optional :job_id, :string, 1
|
15
|
+
optional :state, :enum, 2, "temporal.api.enums.v1.BatchOperationState"
|
16
|
+
optional :start_time, :message, 3, "google.protobuf.Timestamp"
|
17
|
+
optional :close_time, :message, 4, "google.protobuf.Timestamp"
|
18
|
+
end
|
19
|
+
add_message "temporal.api.batch.v1.BatchOperationTermination" do
|
20
|
+
optional :reason, :string, 1
|
21
|
+
optional :details, :message, 2, "temporal.api.common.v1.Payloads"
|
22
|
+
optional :identity, :string, 3
|
23
|
+
end
|
24
|
+
add_message "temporal.api.batch.v1.BatchOperationSignal" do
|
25
|
+
optional :signal, :string, 1
|
26
|
+
optional :input, :message, 2, "temporal.api.common.v1.Payloads"
|
27
|
+
optional :header, :message, 3, "temporal.api.common.v1.Header"
|
28
|
+
optional :identity, :string, 4
|
29
|
+
end
|
30
|
+
add_message "temporal.api.batch.v1.BatchOperationCancellation" do
|
31
|
+
optional :reason, :string, 1
|
32
|
+
optional :identity, :string, 2
|
33
|
+
end
|
34
|
+
end
|
35
|
+
end
|
36
|
+
|
37
|
+
module Temporal
|
38
|
+
module Api
|
39
|
+
module Batch
|
40
|
+
module V1
|
41
|
+
BatchOperationInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("temporal.api.batch.v1.BatchOperationInfo").msgclass
|
42
|
+
BatchOperationTermination = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("temporal.api.batch.v1.BatchOperationTermination").msgclass
|
43
|
+
BatchOperationSignal = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("temporal.api.batch.v1.BatchOperationSignal").msgclass
|
44
|
+
BatchOperationCancellation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("temporal.api.batch.v1.BatchOperationCancellation").msgclass
|
45
|
+
end
|
46
|
+
end
|
47
|
+
end
|
48
|
+
end
|
@@ -0,0 +1,67 @@
|
|
1
|
+
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
2
|
+
# source: temporal/api/cluster/v1/message.proto
|
3
|
+
|
4
|
+
require 'google/protobuf'
|
5
|
+
|
6
|
+
require 'dependencies/gogoproto/gogo_pb'
|
7
|
+
require 'google/protobuf/timestamp_pb'
|
8
|
+
require 'temporal/api/enums/v1/cluster_pb'
|
9
|
+
require 'temporal/api/enums/v1/common_pb'
|
10
|
+
require 'temporal/api/version/v1/message_pb'
|
11
|
+
|
12
|
+
Google::Protobuf::DescriptorPool.generated_pool.build do
|
13
|
+
add_file("temporal/api/cluster/v1/message.proto", :syntax => :proto3) do
|
14
|
+
add_message "temporal.api.cluster.v1.ClusterMetadata" do
|
15
|
+
optional :cluster, :string, 1
|
16
|
+
optional :history_shard_count, :int32, 2
|
17
|
+
optional :cluster_id, :string, 3
|
18
|
+
optional :version_info, :message, 4, "temporal.api.version.v1.VersionInfo"
|
19
|
+
map :index_search_attributes, :string, :message, 5, "temporal.api.cluster.v1.IndexSearchAttributes"
|
20
|
+
optional :cluster_address, :string, 6
|
21
|
+
optional :failover_version_increment, :int64, 7
|
22
|
+
optional :initial_failover_version, :int64, 8
|
23
|
+
optional :is_global_namespace_enabled, :bool, 9
|
24
|
+
optional :is_connection_enabled, :bool, 10
|
25
|
+
end
|
26
|
+
add_message "temporal.api.cluster.v1.IndexSearchAttributes" do
|
27
|
+
map :custom_search_attributes, :string, :enum, 1, "temporal.api.enums.v1.IndexedValueType"
|
28
|
+
end
|
29
|
+
add_message "temporal.api.cluster.v1.HostInfo" do
|
30
|
+
optional :identity, :string, 1
|
31
|
+
end
|
32
|
+
add_message "temporal.api.cluster.v1.RingInfo" do
|
33
|
+
optional :role, :string, 1
|
34
|
+
optional :member_count, :int32, 2
|
35
|
+
repeated :members, :message, 3, "temporal.api.cluster.v1.HostInfo"
|
36
|
+
end
|
37
|
+
add_message "temporal.api.cluster.v1.MembershipInfo" do
|
38
|
+
optional :current_host, :message, 1, "temporal.api.cluster.v1.HostInfo"
|
39
|
+
repeated :reachable_members, :string, 2
|
40
|
+
repeated :rings, :message, 3, "temporal.api.cluster.v1.RingInfo"
|
41
|
+
end
|
42
|
+
add_message "temporal.api.cluster.v1.ClusterMember" do
|
43
|
+
optional :role, :enum, 1, "temporal.api.enums.v1.ClusterMemberRole"
|
44
|
+
optional :host_id, :string, 2
|
45
|
+
optional :rpc_address, :string, 3
|
46
|
+
optional :rpc_port, :int32, 4
|
47
|
+
optional :session_start_time, :message, 5, "google.protobuf.Timestamp"
|
48
|
+
optional :last_heartbit_time, :message, 6, "google.protobuf.Timestamp"
|
49
|
+
optional :record_expiry_time, :message, 7, "google.protobuf.Timestamp"
|
50
|
+
end
|
51
|
+
end
|
52
|
+
end
|
53
|
+
|
54
|
+
module Temporal
|
55
|
+
module Api
|
56
|
+
module Cluster
|
57
|
+
module V1
|
58
|
+
ClusterMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("temporal.api.cluster.v1.ClusterMetadata").msgclass
|
59
|
+
IndexSearchAttributes = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("temporal.api.cluster.v1.IndexSearchAttributes").msgclass
|
60
|
+
HostInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("temporal.api.cluster.v1.HostInfo").msgclass
|
61
|
+
RingInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("temporal.api.cluster.v1.RingInfo").msgclass
|
62
|
+
MembershipInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("temporal.api.cluster.v1.MembershipInfo").msgclass
|
63
|
+
ClusterMember = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("temporal.api.cluster.v1.ClusterMember").msgclass
|
64
|
+
end
|
65
|
+
end
|
66
|
+
end
|
67
|
+
end
|
@@ -0,0 +1,166 @@
|
|
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 'dependencies/gogoproto/gogo_pb'
|
8
|
+
require 'temporal/api/enums/v1/workflow_pb'
|
9
|
+
require 'temporal/api/enums/v1/command_type_pb'
|
10
|
+
require 'temporal/api/enums/v1/update_pb'
|
11
|
+
require 'temporal/api/common/v1/message_pb'
|
12
|
+
require 'temporal/api/failure/v1/message_pb'
|
13
|
+
require 'temporal/api/taskqueue/v1/message_pb'
|
14
|
+
|
15
|
+
Google::Protobuf::DescriptorPool.generated_pool.build do
|
16
|
+
add_file("temporal/api/command/v1/message.proto", :syntax => :proto3) do
|
17
|
+
add_message "temporal.api.command.v1.ScheduleActivityTaskCommandAttributes" do
|
18
|
+
optional :activity_id, :string, 1
|
19
|
+
optional :activity_type, :message, 2, "temporal.api.common.v1.ActivityType"
|
20
|
+
optional :task_queue, :message, 4, "temporal.api.taskqueue.v1.TaskQueue"
|
21
|
+
optional :header, :message, 5, "temporal.api.common.v1.Header"
|
22
|
+
optional :input, :message, 6, "temporal.api.common.v1.Payloads"
|
23
|
+
optional :schedule_to_close_timeout, :message, 7, "google.protobuf.Duration"
|
24
|
+
optional :schedule_to_start_timeout, :message, 8, "google.protobuf.Duration"
|
25
|
+
optional :start_to_close_timeout, :message, 9, "google.protobuf.Duration"
|
26
|
+
optional :heartbeat_timeout, :message, 10, "google.protobuf.Duration"
|
27
|
+
optional :retry_policy, :message, 11, "temporal.api.common.v1.RetryPolicy"
|
28
|
+
optional :request_eager_execution, :bool, 12
|
29
|
+
end
|
30
|
+
add_message "temporal.api.command.v1.RequestCancelActivityTaskCommandAttributes" do
|
31
|
+
optional :scheduled_event_id, :int64, 1
|
32
|
+
end
|
33
|
+
add_message "temporal.api.command.v1.StartTimerCommandAttributes" do
|
34
|
+
optional :timer_id, :string, 1
|
35
|
+
optional :start_to_fire_timeout, :message, 2, "google.protobuf.Duration"
|
36
|
+
end
|
37
|
+
add_message "temporal.api.command.v1.CompleteWorkflowExecutionCommandAttributes" do
|
38
|
+
optional :result, :message, 1, "temporal.api.common.v1.Payloads"
|
39
|
+
end
|
40
|
+
add_message "temporal.api.command.v1.FailWorkflowExecutionCommandAttributes" do
|
41
|
+
optional :failure, :message, 1, "temporal.api.failure.v1.Failure"
|
42
|
+
end
|
43
|
+
add_message "temporal.api.command.v1.CancelTimerCommandAttributes" do
|
44
|
+
optional :timer_id, :string, 1
|
45
|
+
end
|
46
|
+
add_message "temporal.api.command.v1.CancelWorkflowExecutionCommandAttributes" do
|
47
|
+
optional :details, :message, 1, "temporal.api.common.v1.Payloads"
|
48
|
+
end
|
49
|
+
add_message "temporal.api.command.v1.RequestCancelExternalWorkflowExecutionCommandAttributes" do
|
50
|
+
optional :namespace, :string, 1
|
51
|
+
optional :workflow_id, :string, 2
|
52
|
+
optional :run_id, :string, 3
|
53
|
+
optional :control, :string, 4
|
54
|
+
optional :child_workflow_only, :bool, 5
|
55
|
+
optional :reason, :string, 6
|
56
|
+
end
|
57
|
+
add_message "temporal.api.command.v1.SignalExternalWorkflowExecutionCommandAttributes" do
|
58
|
+
optional :namespace, :string, 1
|
59
|
+
optional :execution, :message, 2, "temporal.api.common.v1.WorkflowExecution"
|
60
|
+
optional :signal_name, :string, 3
|
61
|
+
optional :input, :message, 4, "temporal.api.common.v1.Payloads"
|
62
|
+
optional :control, :string, 5
|
63
|
+
optional :child_workflow_only, :bool, 6
|
64
|
+
optional :header, :message, 7, "temporal.api.common.v1.Header"
|
65
|
+
end
|
66
|
+
add_message "temporal.api.command.v1.UpsertWorkflowSearchAttributesCommandAttributes" do
|
67
|
+
optional :search_attributes, :message, 1, "temporal.api.common.v1.SearchAttributes"
|
68
|
+
end
|
69
|
+
add_message "temporal.api.command.v1.RecordMarkerCommandAttributes" do
|
70
|
+
optional :marker_name, :string, 1
|
71
|
+
map :details, :string, :message, 2, "temporal.api.common.v1.Payloads"
|
72
|
+
optional :header, :message, 3, "temporal.api.common.v1.Header"
|
73
|
+
optional :failure, :message, 4, "temporal.api.failure.v1.Failure"
|
74
|
+
end
|
75
|
+
add_message "temporal.api.command.v1.ContinueAsNewWorkflowExecutionCommandAttributes" do
|
76
|
+
optional :workflow_type, :message, 1, "temporal.api.common.v1.WorkflowType"
|
77
|
+
optional :task_queue, :message, 2, "temporal.api.taskqueue.v1.TaskQueue"
|
78
|
+
optional :input, :message, 3, "temporal.api.common.v1.Payloads"
|
79
|
+
optional :workflow_run_timeout, :message, 4, "google.protobuf.Duration"
|
80
|
+
optional :workflow_task_timeout, :message, 5, "google.protobuf.Duration"
|
81
|
+
optional :backoff_start_interval, :message, 6, "google.protobuf.Duration"
|
82
|
+
optional :retry_policy, :message, 7, "temporal.api.common.v1.RetryPolicy"
|
83
|
+
optional :initiator, :enum, 8, "temporal.api.enums.v1.ContinueAsNewInitiator"
|
84
|
+
optional :failure, :message, 9, "temporal.api.failure.v1.Failure"
|
85
|
+
optional :last_completion_result, :message, 10, "temporal.api.common.v1.Payloads"
|
86
|
+
optional :cron_schedule, :string, 11
|
87
|
+
optional :header, :message, 12, "temporal.api.common.v1.Header"
|
88
|
+
optional :memo, :message, 13, "temporal.api.common.v1.Memo"
|
89
|
+
optional :search_attributes, :message, 14, "temporal.api.common.v1.SearchAttributes"
|
90
|
+
end
|
91
|
+
add_message "temporal.api.command.v1.StartChildWorkflowExecutionCommandAttributes" do
|
92
|
+
optional :namespace, :string, 1
|
93
|
+
optional :workflow_id, :string, 2
|
94
|
+
optional :workflow_type, :message, 3, "temporal.api.common.v1.WorkflowType"
|
95
|
+
optional :task_queue, :message, 4, "temporal.api.taskqueue.v1.TaskQueue"
|
96
|
+
optional :input, :message, 5, "temporal.api.common.v1.Payloads"
|
97
|
+
optional :workflow_execution_timeout, :message, 6, "google.protobuf.Duration"
|
98
|
+
optional :workflow_run_timeout, :message, 7, "google.protobuf.Duration"
|
99
|
+
optional :workflow_task_timeout, :message, 8, "google.protobuf.Duration"
|
100
|
+
optional :parent_close_policy, :enum, 9, "temporal.api.enums.v1.ParentClosePolicy"
|
101
|
+
optional :control, :string, 10
|
102
|
+
optional :workflow_id_reuse_policy, :enum, 11, "temporal.api.enums.v1.WorkflowIdReusePolicy"
|
103
|
+
optional :retry_policy, :message, 12, "temporal.api.common.v1.RetryPolicy"
|
104
|
+
optional :cron_schedule, :string, 13
|
105
|
+
optional :header, :message, 14, "temporal.api.common.v1.Header"
|
106
|
+
optional :memo, :message, 15, "temporal.api.common.v1.Memo"
|
107
|
+
optional :search_attributes, :message, 16, "temporal.api.common.v1.SearchAttributes"
|
108
|
+
end
|
109
|
+
add_message "temporal.api.command.v1.AcceptWorkflowUpdateCommandAttributes" do
|
110
|
+
optional :update_id, :string, 1
|
111
|
+
end
|
112
|
+
add_message "temporal.api.command.v1.CompleteWorkflowUpdateCommandAttributes" do
|
113
|
+
optional :update_id, :string, 1
|
114
|
+
optional :durability_preference, :enum, 2, "temporal.api.enums.v1.WorkflowUpdateDurabilityPreference"
|
115
|
+
oneof :result do
|
116
|
+
optional :success, :message, 3, "temporal.api.common.v1.Payloads"
|
117
|
+
optional :failure, :message, 4, "temporal.api.failure.v1.Failure"
|
118
|
+
end
|
119
|
+
end
|
120
|
+
add_message "temporal.api.command.v1.Command" do
|
121
|
+
optional :command_type, :enum, 1, "temporal.api.enums.v1.CommandType"
|
122
|
+
oneof :attributes do
|
123
|
+
optional :schedule_activity_task_command_attributes, :message, 2, "temporal.api.command.v1.ScheduleActivityTaskCommandAttributes"
|
124
|
+
optional :start_timer_command_attributes, :message, 3, "temporal.api.command.v1.StartTimerCommandAttributes"
|
125
|
+
optional :complete_workflow_execution_command_attributes, :message, 4, "temporal.api.command.v1.CompleteWorkflowExecutionCommandAttributes"
|
126
|
+
optional :fail_workflow_execution_command_attributes, :message, 5, "temporal.api.command.v1.FailWorkflowExecutionCommandAttributes"
|
127
|
+
optional :request_cancel_activity_task_command_attributes, :message, 6, "temporal.api.command.v1.RequestCancelActivityTaskCommandAttributes"
|
128
|
+
optional :cancel_timer_command_attributes, :message, 7, "temporal.api.command.v1.CancelTimerCommandAttributes"
|
129
|
+
optional :cancel_workflow_execution_command_attributes, :message, 8, "temporal.api.command.v1.CancelWorkflowExecutionCommandAttributes"
|
130
|
+
optional :request_cancel_external_workflow_execution_command_attributes, :message, 9, "temporal.api.command.v1.RequestCancelExternalWorkflowExecutionCommandAttributes"
|
131
|
+
optional :record_marker_command_attributes, :message, 10, "temporal.api.command.v1.RecordMarkerCommandAttributes"
|
132
|
+
optional :continue_as_new_workflow_execution_command_attributes, :message, 11, "temporal.api.command.v1.ContinueAsNewWorkflowExecutionCommandAttributes"
|
133
|
+
optional :start_child_workflow_execution_command_attributes, :message, 12, "temporal.api.command.v1.StartChildWorkflowExecutionCommandAttributes"
|
134
|
+
optional :signal_external_workflow_execution_command_attributes, :message, 13, "temporal.api.command.v1.SignalExternalWorkflowExecutionCommandAttributes"
|
135
|
+
optional :upsert_workflow_search_attributes_command_attributes, :message, 14, "temporal.api.command.v1.UpsertWorkflowSearchAttributesCommandAttributes"
|
136
|
+
optional :accept_workflow_update_command_attributes, :message, 15, "temporal.api.command.v1.AcceptWorkflowUpdateCommandAttributes"
|
137
|
+
optional :complete_workflow_update_command_attributes, :message, 16, "temporal.api.command.v1.CompleteWorkflowUpdateCommandAttributes"
|
138
|
+
end
|
139
|
+
end
|
140
|
+
end
|
141
|
+
end
|
142
|
+
|
143
|
+
module Temporal
|
144
|
+
module Api
|
145
|
+
module Command
|
146
|
+
module V1
|
147
|
+
ScheduleActivityTaskCommandAttributes = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("temporal.api.command.v1.ScheduleActivityTaskCommandAttributes").msgclass
|
148
|
+
RequestCancelActivityTaskCommandAttributes = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("temporal.api.command.v1.RequestCancelActivityTaskCommandAttributes").msgclass
|
149
|
+
StartTimerCommandAttributes = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("temporal.api.command.v1.StartTimerCommandAttributes").msgclass
|
150
|
+
CompleteWorkflowExecutionCommandAttributes = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("temporal.api.command.v1.CompleteWorkflowExecutionCommandAttributes").msgclass
|
151
|
+
FailWorkflowExecutionCommandAttributes = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("temporal.api.command.v1.FailWorkflowExecutionCommandAttributes").msgclass
|
152
|
+
CancelTimerCommandAttributes = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("temporal.api.command.v1.CancelTimerCommandAttributes").msgclass
|
153
|
+
CancelWorkflowExecutionCommandAttributes = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("temporal.api.command.v1.CancelWorkflowExecutionCommandAttributes").msgclass
|
154
|
+
RequestCancelExternalWorkflowExecutionCommandAttributes = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("temporal.api.command.v1.RequestCancelExternalWorkflowExecutionCommandAttributes").msgclass
|
155
|
+
SignalExternalWorkflowExecutionCommandAttributes = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("temporal.api.command.v1.SignalExternalWorkflowExecutionCommandAttributes").msgclass
|
156
|
+
UpsertWorkflowSearchAttributesCommandAttributes = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("temporal.api.command.v1.UpsertWorkflowSearchAttributesCommandAttributes").msgclass
|
157
|
+
RecordMarkerCommandAttributes = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("temporal.api.command.v1.RecordMarkerCommandAttributes").msgclass
|
158
|
+
ContinueAsNewWorkflowExecutionCommandAttributes = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("temporal.api.command.v1.ContinueAsNewWorkflowExecutionCommandAttributes").msgclass
|
159
|
+
StartChildWorkflowExecutionCommandAttributes = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("temporal.api.command.v1.StartChildWorkflowExecutionCommandAttributes").msgclass
|
160
|
+
AcceptWorkflowUpdateCommandAttributes = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("temporal.api.command.v1.AcceptWorkflowUpdateCommandAttributes").msgclass
|
161
|
+
CompleteWorkflowUpdateCommandAttributes = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("temporal.api.command.v1.CompleteWorkflowUpdateCommandAttributes").msgclass
|
162
|
+
Command = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("temporal.api.command.v1.Command").msgclass
|
163
|
+
end
|
164
|
+
end
|
165
|
+
end
|
166
|
+
end
|