From 87dbfa34134a18cf4a4673626872f708da20bab9 Mon Sep 17 00:00:00 2001 From: Chad Retz Date: Fri, 12 Jul 2024 17:23:03 -0500 Subject: [PATCH] Initial client work --- .github/workflows/ci.yml | 73 + .gitignore | 37 +- README.md | 56 +- temporalio/.rubocop.yml | 66 + temporalio/Cargo.lock | 4120 +++++++++++++++++ temporalio/Cargo.toml | 20 + temporalio/Gemfile | 5 + temporalio/Rakefile | 107 + temporalio/Steepfile | 18 + temporalio/ext/Cargo.toml | 23 + temporalio/ext/extconf.rb | 6 + temporalio/ext/src/client.rs | 314 ++ temporalio/ext/src/lib.rs | 46 + temporalio/ext/src/runtime.rs | 204 + temporalio/ext/src/testing.rs | 138 + temporalio/ext/src/util.rs | 93 + temporalio/lib/temporalio.rb | 7 + temporalio/lib/temporalio/api.rb | 10 + .../lib/temporalio/api/batch/v1/message.rb | 31 + .../lib/temporalio/api/command/v1/message.rb | 43 + .../lib/temporalio/api/common/v1/message.rb | 39 + .../api/enums/v1/batch_operation.rb | 22 + .../temporalio/api/enums/v1/command_type.rb | 21 + .../lib/temporalio/api/enums/v1/common.rb | 23 + .../lib/temporalio/api/enums/v1/event_type.rb | 21 + .../temporalio/api/enums/v1/failed_cause.rb | 25 + .../lib/temporalio/api/enums/v1/namespace.rb | 23 + .../lib/temporalio/api/enums/v1/query.rb | 22 + .../lib/temporalio/api/enums/v1/reset.rb | 23 + .../lib/temporalio/api/enums/v1/schedule.rb | 21 + .../lib/temporalio/api/enums/v1/task_queue.rb | 23 + .../lib/temporalio/api/enums/v1/update.rb | 22 + .../lib/temporalio/api/enums/v1/workflow.rb | 29 + .../temporalio/api/errordetails/v1/message.rb | 39 + .../lib/temporalio/api/export/v1/message.rb | 24 + .../lib/temporalio/api/failure/v1/message.rb | 32 + .../lib/temporalio/api/filter/v1/message.rb | 27 + .../lib/temporalio/api/history/v1/message.rb | 82 + .../temporalio/api/namespace/v1/message.rb | 30 + .../lib/temporalio/api/operatorservice.rb | 3 + .../operatorservice/v1/request_response.rb | 37 + .../api/operatorservice/v1/service.rb | 23 + .../lib/temporalio/api/protocol/v1/message.rb | 23 + .../lib/temporalio/api/query/v1/message.rb | 27 + .../temporalio/api/replication/v1/message.rb | 26 + .../lib/temporalio/api/schedule/v1/message.rb | 42 + .../api/sdk/v1/task_complete_metadata.rb | 21 + .../api/sdk/v1/workflow_metadata.rb | 23 + .../temporalio/api/taskqueue/v1/message.rb | 36 + .../lib/temporalio/api/update/v1/message.rb | 33 + .../lib/temporalio/api/version/v1/message.rb | 26 + .../lib/temporalio/api/workflow/v1/message.rb | 35 + .../lib/temporalio/api/workflowservice.rb | 3 + .../workflowservice/v1/request_response.rb | 166 + .../api/workflowservice/v1/service.rb | 23 + temporalio/lib/temporalio/client.rb | 282 ++ .../lib/temporalio/client/connection.rb | 247 + .../temporalio/client/connection/service.rb | 46 + .../client/connection/workflow_service.rb | 20 + .../lib/temporalio/client/interceptor.rb | 78 + .../lib/temporalio/client/workflow_handle.rb | 194 + temporalio/lib/temporalio/converters.rb | 9 + .../temporalio/converters/data_converter.rb | 105 + .../converters/failure_converter.rb | 39 + .../converters/payload_converter.rb | 52 + .../payload_converter/binary_null.rb | 34 + .../payload_converter/binary_plain.rb | 35 + .../payload_converter/binary_protobuf.rb | 40 + .../converters/payload_converter/composite.rb | 62 + .../converters/payload_converter/encoding.rb | 35 + .../payload_converter/json_plain.rb | 43 + .../payload_converter/json_protobuf.rb | 40 + temporalio/lib/temporalio/error.rb | 37 + temporalio/lib/temporalio/error/failure.rb | 30 + temporalio/lib/temporalio/internal.rb | 7 + temporalio/lib/temporalio/internal/bridge.rb | 18 + .../lib/temporalio/internal/bridge/client.rb | 96 + .../lib/temporalio/internal/bridge/runtime.rb | 60 + .../lib/temporalio/internal/bridge/testing.rb | 51 + temporalio/lib/temporalio/runtime.rb | 259 ++ temporalio/lib/temporalio/testing.rb | 9 + .../testing/workflow_environment.rb | 132 + temporalio/lib/temporalio/version.rb | 5 + temporalio/rbs_collection.lock.yaml | 144 + temporalio/rbs_collection.yaml | 33 + temporalio/sig/temporalio.rbs | 3 + .../sig/temporalio/internal/bridge/client.rbs | 10 + temporalio/temporalio.gemspec | 42 + temporalio/test/client_test.rb | 47 + temporalio/test/golangworker/go.mod | 31 + temporalio/test/golangworker/go.sum | 175 + temporalio/test/golangworker/main.go | 232 + temporalio/test/sig/test_helper.rbs | 0 temporalio/test/test_helper.rb | 66 + 94 files changed, 9330 insertions(+), 30 deletions(-) create mode 100644 .github/workflows/ci.yml create mode 100644 temporalio/.rubocop.yml create mode 100644 temporalio/Cargo.lock create mode 100644 temporalio/Cargo.toml create mode 100644 temporalio/Gemfile create mode 100644 temporalio/Rakefile create mode 100644 temporalio/Steepfile create mode 100644 temporalio/ext/Cargo.toml create mode 100644 temporalio/ext/extconf.rb create mode 100644 temporalio/ext/src/client.rs create mode 100644 temporalio/ext/src/lib.rs create mode 100644 temporalio/ext/src/runtime.rs create mode 100644 temporalio/ext/src/testing.rs create mode 100644 temporalio/ext/src/util.rs create mode 100644 temporalio/lib/temporalio.rb create mode 100644 temporalio/lib/temporalio/api.rb create mode 100644 temporalio/lib/temporalio/api/batch/v1/message.rb create mode 100644 temporalio/lib/temporalio/api/command/v1/message.rb create mode 100644 temporalio/lib/temporalio/api/common/v1/message.rb create mode 100644 temporalio/lib/temporalio/api/enums/v1/batch_operation.rb create mode 100644 temporalio/lib/temporalio/api/enums/v1/command_type.rb create mode 100644 temporalio/lib/temporalio/api/enums/v1/common.rb create mode 100644 temporalio/lib/temporalio/api/enums/v1/event_type.rb create mode 100644 temporalio/lib/temporalio/api/enums/v1/failed_cause.rb create mode 100644 temporalio/lib/temporalio/api/enums/v1/namespace.rb create mode 100644 temporalio/lib/temporalio/api/enums/v1/query.rb create mode 100644 temporalio/lib/temporalio/api/enums/v1/reset.rb create mode 100644 temporalio/lib/temporalio/api/enums/v1/schedule.rb create mode 100644 temporalio/lib/temporalio/api/enums/v1/task_queue.rb create mode 100644 temporalio/lib/temporalio/api/enums/v1/update.rb create mode 100644 temporalio/lib/temporalio/api/enums/v1/workflow.rb create mode 100644 temporalio/lib/temporalio/api/errordetails/v1/message.rb create mode 100644 temporalio/lib/temporalio/api/export/v1/message.rb create mode 100644 temporalio/lib/temporalio/api/failure/v1/message.rb create mode 100644 temporalio/lib/temporalio/api/filter/v1/message.rb create mode 100644 temporalio/lib/temporalio/api/history/v1/message.rb create mode 100644 temporalio/lib/temporalio/api/namespace/v1/message.rb create mode 100644 temporalio/lib/temporalio/api/operatorservice.rb create mode 100644 temporalio/lib/temporalio/api/operatorservice/v1/request_response.rb create mode 100644 temporalio/lib/temporalio/api/operatorservice/v1/service.rb create mode 100644 temporalio/lib/temporalio/api/protocol/v1/message.rb create mode 100644 temporalio/lib/temporalio/api/query/v1/message.rb create mode 100644 temporalio/lib/temporalio/api/replication/v1/message.rb create mode 100644 temporalio/lib/temporalio/api/schedule/v1/message.rb create mode 100644 temporalio/lib/temporalio/api/sdk/v1/task_complete_metadata.rb create mode 100644 temporalio/lib/temporalio/api/sdk/v1/workflow_metadata.rb create mode 100644 temporalio/lib/temporalio/api/taskqueue/v1/message.rb create mode 100644 temporalio/lib/temporalio/api/update/v1/message.rb create mode 100644 temporalio/lib/temporalio/api/version/v1/message.rb create mode 100644 temporalio/lib/temporalio/api/workflow/v1/message.rb create mode 100644 temporalio/lib/temporalio/api/workflowservice.rb create mode 100644 temporalio/lib/temporalio/api/workflowservice/v1/request_response.rb create mode 100644 temporalio/lib/temporalio/api/workflowservice/v1/service.rb create mode 100644 temporalio/lib/temporalio/client.rb create mode 100644 temporalio/lib/temporalio/client/connection.rb create mode 100644 temporalio/lib/temporalio/client/connection/service.rb create mode 100644 temporalio/lib/temporalio/client/connection/workflow_service.rb create mode 100644 temporalio/lib/temporalio/client/interceptor.rb create mode 100644 temporalio/lib/temporalio/client/workflow_handle.rb create mode 100644 temporalio/lib/temporalio/converters.rb create mode 100644 temporalio/lib/temporalio/converters/data_converter.rb create mode 100644 temporalio/lib/temporalio/converters/failure_converter.rb create mode 100644 temporalio/lib/temporalio/converters/payload_converter.rb create mode 100644 temporalio/lib/temporalio/converters/payload_converter/binary_null.rb create mode 100644 temporalio/lib/temporalio/converters/payload_converter/binary_plain.rb create mode 100644 temporalio/lib/temporalio/converters/payload_converter/binary_protobuf.rb create mode 100644 temporalio/lib/temporalio/converters/payload_converter/composite.rb create mode 100644 temporalio/lib/temporalio/converters/payload_converter/encoding.rb create mode 100644 temporalio/lib/temporalio/converters/payload_converter/json_plain.rb create mode 100644 temporalio/lib/temporalio/converters/payload_converter/json_protobuf.rb create mode 100644 temporalio/lib/temporalio/error.rb create mode 100644 temporalio/lib/temporalio/error/failure.rb create mode 100644 temporalio/lib/temporalio/internal.rb create mode 100644 temporalio/lib/temporalio/internal/bridge.rb create mode 100644 temporalio/lib/temporalio/internal/bridge/client.rb create mode 100644 temporalio/lib/temporalio/internal/bridge/runtime.rb create mode 100644 temporalio/lib/temporalio/internal/bridge/testing.rb create mode 100644 temporalio/lib/temporalio/runtime.rb create mode 100644 temporalio/lib/temporalio/testing.rb create mode 100644 temporalio/lib/temporalio/testing/workflow_environment.rb create mode 100644 temporalio/lib/temporalio/version.rb create mode 100644 temporalio/rbs_collection.lock.yaml create mode 100644 temporalio/rbs_collection.yaml create mode 100644 temporalio/sig/temporalio.rbs create mode 100644 temporalio/sig/temporalio/internal/bridge/client.rbs create mode 100644 temporalio/temporalio.gemspec create mode 100644 temporalio/test/client_test.rb create mode 100644 temporalio/test/golangworker/go.mod create mode 100644 temporalio/test/golangworker/go.sum create mode 100644 temporalio/test/golangworker/main.go create mode 100644 temporalio/test/sig/test_helper.rbs create mode 100644 temporalio/test/test_helper.rb diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 00000000..af0590f7 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,73 @@ +name: Continuous Integration +on: + pull_request: + push: + branches: + - main + - "releases/*" + +jobs: + build-lint-test: + strategy: + fail-fast: true + matrix: + # TODO(cretz): Enable Windows (it's slow) + # os: [ubuntu-latest, ubuntu-arm, macos-intel, macos-arm, windows-latest] + os: [ubuntu-latest, ubuntu-arm, macos-intel, macos-arm] + # Earliest and latest supported + rubyVersion: ["3.1", "3.3"] + + include: + - os: ubuntu-latest + rubyVersion: "3.3" + checkTarget: true + - os: ubuntu-arm + runsOn: ubuntu-24.04-arm64-2-core + - os: macos-intel + runsOn: macos-12 + - os: macos-arm + runsOn: macos-14 + runs-on: ${{ matrix.os }} + steps: + - name: Checkout repository + uses: actions/checkout@v2 + with: + submodules: recursive + + - name: Setup Ruby and Rust + uses: oxidize-rb/actions/setup-ruby-and-rust@v1 + with: + ruby-version: ${{ matrix.rubyVersion }} + bundler-cache: true + cargo-cache: true + + - name: Setup Rust cache + uses: Swatinem/rust-cache@v2 + with: + workspaces: temporalio/ext -> temporalio/target + + # Needed for tests currently + - name: Install Go + uses: actions/setup-go@v5 + with: + go-version: stable + + - name: Install protoc + uses: arduino/setup-protoc@v3 + with: + # TODO(cretz): Can upgrade proto when https://github.com/arduino/setup-protoc/issues/99 fixed + version: "23.x" + repo-token: ${{ secrets.GITHUB_TOKEN }} + + - name: Lint Rust + if: ${{ matrix.checkTarget }} + working-directory: ./temporalio + run: cargo clippy && cargo fmt --check + + # TODO(cretz): For checkTarget, regen protos and ensure no diff + + - name: Lint, compile, test Ruby + working-directory: ./temporalio + run: bundle install && bundle exec rake TESTOPTS="--verbose" + + # TODO(cretz): Build gem and smoke test against separate dir diff --git a/.gitignore b/.gitignore index 7a934f4d..8c050aad 100644 --- a/.gitignore +++ b/.gitignore @@ -1,28 +1,9 @@ -.bundle/ -.yardoc -_yardoc/ - -/coverage/ -/doc/ -/examples/vendor/ -/pkg/ -/spec/reports/ -/tmp/ - -*.gem - -# Thermite artefacts -mkmf.log -lib/temporal_sdk_ruby_bridge.* - -# rspec failure tracking -.rspec_status - -.idea/* - -# Rust builds -bridge/target - -# Go binaries -spec/support/go_server/main -spec/support/go_worker/main +tmp/ +target/ +Gemfile.lock +.gem_rbs_collection +*.so +temporalio/test/golangworker/golangworker +temporalio/.yardoc +temporalio/doc +temporalio/pkg \ No newline at end of file diff --git a/README.md b/README.md index e089c4d7..74eb5d61 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,58 @@ # Temporal Ruby SDK -The Ruby SDK is under active development/refresh. +⚠️ UNDER ACTIVE DEVELOPMENT The last tag before this refresh is [v0.1.1](https://github.com/temporalio/sdk-ruby/tree/v0.1.1). Please reference that -tag for the previous code. \ No newline at end of file +tag for the previous code. + +**TODO: Usage documentation** + +## Development + +### Build + +Prerequisites: + +* [Ruby](https://www.ruby-lang.org/) >= 3.1 (i.e. `ruby` and `bundle` on the `PATH`) +* [Rust](https://www.rust-lang.org/) latest stable (i.e. `cargo` on the `PATH`) +* [Protobuf Compiler](https://protobuf.dev/) (i.e. `protoc` on the `PATH`) +* This repository, cloned recursively +* Change to the `temporalio/` directory + +To build shared library for development use: + + bundle exec rake compile:dev + +To build and test release: + + bundle exec rake + +### Testing + +This project uses `minitest`. To test: + + bundle exec rake test + +Can add options via `TESTOPTS`. E.g. single test: + + bundle exec rake test TESTOPTS="--name=test_start_workflows_async" + +### Code Formatting and Type Checking + +This project uses `rubocop`: + + bundle exec rake rubocop:autocorrect + +This project uses `steep`. First may need the RBS collection: + + bundle exec rake rbs:install_collection + +Now can run `steep`: + + bundle exec rake steep + +### Proto Generation + +Run: + + bundle exec rake proto:generate diff --git a/temporalio/.rubocop.yml b/temporalio/.rubocop.yml new file mode 100644 index 00000000..62cda39d --- /dev/null +++ b/temporalio/.rubocop.yml @@ -0,0 +1,66 @@ +inherit_mode: + merge: + - Exclude + +AllCops: + NewCops: enable + TargetRubyVersion: 3.1 + SuggestExtensions: false + Exclude: + - ext/**/* + - lib/temporalio/api/**/* + - target/**/* + - tmp/**/* + - vendor/**/* + +# Keep cop rule settings in alphabetical order. For each rule setting, provide +# justification for the change from default. + +# We want development dependencies in the gemspec +Gemspec/DevelopmentDependencies: + EnforcedStyle: gemspec + +# We want our classes in a certain order +Layout/ClassStructure: + Enabled: true + +# The default is too small and triggers simply setting lots of values on a proto +Metrics/AbcSize: + Max: 75 + +# The default is too small +Metrics/BlockLength: + Max: 100 + +# The default is too small +Metrics/ClassLength: + Max: 400 + +# The default is too small +Metrics/CyclomaticComplexity: + Max: 25 + +# The default is too small +Metrics/MethodLength: + Max: 100 + +# The default is too small +Metrics/PerceivedComplexity: + Max: 25 + +# We want methods to be documented +Style/DocumentationMethod: + Enabled: true + +# Ok to have global vars in tests +Style/GlobalVars: + Exclude: + - test/**/* + +# We want our require lists to be in order +Style/RequireOrder: + Enabled: true + +# We are ok with large amount of keyword args +Metrics/ParameterLists: + CountKeywordArgs: false \ No newline at end of file diff --git a/temporalio/Cargo.lock b/temporalio/Cargo.lock new file mode 100644 index 00000000..365f867a --- /dev/null +++ b/temporalio/Cargo.lock @@ -0,0 +1,4120 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 3 + +[[package]] +name = "addr2line" +version = "0.22.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6e4503c46a5c0c7844e948c9a4d6acd9f50cccb4de1c48eb9e291ea17470c678" +dependencies = [ + "gimli", +] + +[[package]] +name = "adler" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" + +[[package]] +name = "aes" +version = "0.8.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b169f7a6d4742236a0a00c541b845991d0ac43e546831af1249753ab4c3aa3a0" +dependencies = [ + "cfg-if", + "cipher", + "cpufeatures", +] + +[[package]] +name = "ahash" +version = "0.8.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e89da841a80418a9b391ebaea17f5c112ffaaa96f621d2c285b5174da76b9011" +dependencies = [ + "cfg-if", + "once_cell", + "version_check", + "zerocopy", +] + +[[package]] +name = "aho-corasick" +version = "1.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e60d3430d3a69478ad0993f19238d2df97c507009a52b3c10addcd7f6bcb916" +dependencies = [ + "memchr", +] + +[[package]] +name = "allocator-api2" +version = "0.2.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c6cb57a04249c6480766f7f7cef5467412af1490f8d1e243141daddada3264f" + +[[package]] +name = "anes" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4b46cbb362ab8752921c97e041f5e366ee6297bd428a31275b9fcf1e380f7299" + +[[package]] +name = "anstream" +version = "0.6.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "418c75fa768af9c03be99d17643f93f79bbba589895012a80e3452a19ddda15b" +dependencies = [ + "anstyle", + "anstyle-parse", + "anstyle-query", + "anstyle-wincon", + "colorchoice", + "is_terminal_polyfill", + "utf8parse", +] + +[[package]] +name = "anstyle" +version = "1.0.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "038dfcf04a5feb68e9c60b21c9625a54c2c0616e79b72b0fd87075a056ae1d1b" + +[[package]] +name = "anstyle-parse" +version = "0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c03a11a9034d92058ceb6ee011ce58af4a9bf61491aa7e1e59ecd24bd40d22d4" +dependencies = [ + "utf8parse", +] + +[[package]] +name = "anstyle-query" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ad186efb764318d35165f1758e7dcef3b10628e26d41a44bc5550652e6804391" +dependencies = [ + "windows-sys 0.52.0", +] + +[[package]] +name = "anstyle-wincon" +version = "3.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "61a38449feb7068f52bb06c12759005cf459ee52bb4adc1d5a7c4322d716fb19" +dependencies = [ + "anstyle", + "windows-sys 0.52.0", +] + +[[package]] +name = "anyhow" +version = "1.0.86" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b3d1d046238990b9cf5bcde22a3fb3584ee5cf65fb2765f454ed428c7a0063da" + +[[package]] +name = "arbitrary" +version = "1.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7d5a26814d8dcb93b0e5a0ff3c6d80a8843bafb21b39e8e18a6f05471870e110" +dependencies = [ + "derive_arbitrary", +] + +[[package]] +name = "assert_matches" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9b34d609dfbaf33d6889b2b7106d3ca345eacad44200913df5ba02bfd31d2ba9" + +[[package]] +name = "async-stream" +version = "0.3.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cd56dd203fef61ac097dd65721a419ddccb106b2d2b70ba60a6b529f03961a51" +dependencies = [ + "async-stream-impl", + "futures-core", + "pin-project-lite", +] + +[[package]] +name = "async-stream-impl" +version = "0.3.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "16e62a023e7c117e27523144c5d2459f4397fcc3cab0085af8e2224f643a0193" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "async-trait" +version = "0.1.81" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6e0c28dcc82d7c8ead5cb13beb15405b57b8546e93215673ff8ca0349a028107" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "atomic-waker" +version = "1.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1505bd5d3d116872e7271a6d4e16d81d0c8570876c8de68093a09ac269d8aac0" + +[[package]] +name = "autocfg" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0c4b4d0bd25bd0b74681c0ad21497610ce1b7c91b1022cd21c80c6fbdd9476b0" + +[[package]] +name = "axum" +version = "0.6.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3b829e4e32b91e643de6eafe82b1d90675f5874230191a4ffbc1b336dec4d6bf" +dependencies = [ + "async-trait", + "axum-core", + "bitflags 1.3.2", + "bytes", + "futures-util", + "http 0.2.12", + "http-body 0.4.6", + "hyper 0.14.30", + "itoa", + "matchit", + "memchr", + "mime", + "percent-encoding", + "pin-project-lite", + "rustversion", + "serde", + "sync_wrapper 0.1.2", + "tower", + "tower-layer", + "tower-service", +] + +[[package]] +name = "axum-core" +version = "0.3.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "759fa577a247914fd3f7f76d62972792636412fbfd634cd452f6a385a74d2d2c" +dependencies = [ + "async-trait", + "bytes", + "futures-util", + "http 0.2.12", + "http-body 0.4.6", + "mime", + "rustversion", + "tower-layer", + "tower-service", +] + +[[package]] +name = "backoff" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b62ddb9cb1ec0a098ad4bbf9344d0713fa193ae1a80af55febcff2627b6a00c1" +dependencies = [ + "getrandom", + "instant", + "rand", +] + +[[package]] +name = "backtrace" +version = "0.3.73" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5cc23269a4f8976d0a4d2e7109211a419fe30e8d88d677cd60b6bc79c5732e0a" +dependencies = [ + "addr2line", + "cc", + "cfg-if", + "libc", + "miniz_oxide", + "object", + "rustc-demangle", +] + +[[package]] +name = "base64" +version = "0.21.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9d297deb1925b89f2ccc13d7635fa0714f12c87adce1c75356b39ca9b7178567" + +[[package]] +name = "base64" +version = "0.22.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "72b3254f16251a8381aa12e40e3c4d2f0199f8c6508fbecb9d91f575e0fbb8c6" + +[[package]] +name = "bimap" +version = "0.6.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "230c5f1ca6a325a32553f8640d31ac9b49f2411e901e427570154868b46da4f7" + +[[package]] +name = "bindgen" +version = "0.69.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a00dc851838a2120612785d195287475a3ac45514741da670b735818822129a0" +dependencies = [ + "bitflags 2.6.0", + "cexpr", + "clang-sys", + "itertools 0.12.1", + "lazy_static", + "lazycell", + "proc-macro2", + "quote", + "regex", + "rustc-hash", + "shlex", + "syn", +] + +[[package]] +name = "bitflags" +version = "1.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" + +[[package]] +name = "bitflags" +version = "2.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b048fb63fd8b5923fc5aa7b340d8e156aec7ec02f0c78fa8a6ddc2613f6f71de" + +[[package]] +name = "block-buffer" +version = "0.10.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3078c7629b62d3f0439517fa394996acacc5cbc91c5a20d8c658e77abd503a71" +dependencies = [ + "generic-array", +] + +[[package]] +name = "bumpalo" +version = "3.16.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "79296716171880943b8470b5f8d03aa55eb2e645a4874bdbb28adb49162e012c" + +[[package]] +name = "byteorder" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" + +[[package]] +name = "bytes" +version = "1.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "514de17de45fdb8dc022b1a7975556c53c86f9f0aa5f534b98977b171857c2c9" + +[[package]] +name = "bzip2" +version = "0.4.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bdb116a6ef3f6c3698828873ad02c3014b3c85cadb88496095628e3ef1e347f8" +dependencies = [ + "bzip2-sys", + "libc", +] + +[[package]] +name = "bzip2-sys" +version = "0.1.11+1.0.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "736a955f3fa7875102d57c82b8cac37ec45224a07fd32d58f9f7a186b6cd4cdc" +dependencies = [ + "cc", + "libc", + "pkg-config", +] + +[[package]] +name = "cast" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "37b2a672a2cb129a2e41c10b1224bb368f9f37a2b16b612598138befd7b37eb5" + +[[package]] +name = "cc" +version = "1.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "907d8581360765417f8f2e0e7d602733bbed60156b4465b7617243689ef9b83d" +dependencies = [ + "jobserver", + "libc", + "once_cell", +] + +[[package]] +name = "cexpr" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6fac387a98bb7c37292057cffc56d62ecb629900026402633ae9160df93a8766" +dependencies = [ + "nom", +] + +[[package]] +name = "cfg-if" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" + +[[package]] +name = "chrono" +version = "0.4.38" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a21f936df1771bf62b77f047b726c4625ff2e8aa607c01ec06e5a05bd8463401" +dependencies = [ + "num-traits", + "serde", +] + +[[package]] +name = "ciborium" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "42e69ffd6f0917f5c029256a24d0161db17cea3997d185db0d35926308770f0e" +dependencies = [ + "ciborium-io", + "ciborium-ll", + "serde", +] + +[[package]] +name = "ciborium-io" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "05afea1e0a06c9be33d539b876f1ce3692f4afea2cb41f740e7743225ed1c757" + +[[package]] +name = "ciborium-ll" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "57663b653d948a338bfb3eeba9bb2fd5fcfaecb9e199e87e1eda4d9e8b240fd9" +dependencies = [ + "ciborium-io", + "half", +] + +[[package]] +name = "cipher" +version = "0.4.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "773f3b9af64447d2ce9850330c473515014aa235e6a783b02db81ff39e4a3dad" +dependencies = [ + "crypto-common", + "inout", +] + +[[package]] +name = "clang-sys" +version = "1.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b023947811758c97c59bf9d1c188fd619ad4718dcaa767947df1cadb14f39f4" +dependencies = [ + "glob", + "libc", + "libloading", +] + +[[package]] +name = "clap" +version = "4.5.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "64acc1846d54c1fe936a78dc189c34e28d3f5afc348403f28ecf53660b9b8462" +dependencies = [ + "clap_builder", + "clap_derive", +] + +[[package]] +name = "clap_builder" +version = "4.5.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6fb8393d67ba2e7bfaf28a23458e4e2b543cc73a99595511eb207fdb8aede942" +dependencies = [ + "anstream", + "anstyle", + "clap_lex", + "strsim", +] + +[[package]] +name = "clap_derive" +version = "4.5.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2bac35c6dafb060fd4d275d9a4ffae97917c13a6327903a8be2153cd964f7085" +dependencies = [ + "heck", + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "clap_lex" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4b82cf0babdbd58558212896d1a4272303a57bdb245c2bf1147185fb45640e70" + +[[package]] +name = "colorchoice" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b6a852b24ab71dffc585bcb46eaf7959d175cb865a7152e35b348d1b2960422" + +[[package]] +name = "console-api" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fd326812b3fd01da5bb1af7d340d0d555fd3d4b641e7f1dfcf5962a902952787" +dependencies = [ + "futures-core", + "prost", + "prost-types", + "tonic 0.10.2", + "tracing-core", +] + +[[package]] +name = "console-subscriber" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7481d4c57092cd1c19dd541b92bdce883de840df30aa5d03fd48a3935c01842e" +dependencies = [ + "console-api", + "crossbeam-channel", + "crossbeam-utils", + "futures-task", + "hdrhistogram", + "humantime", + "prost-types", + "serde", + "serde_json", + "thread_local", + "tokio", + "tokio-stream", + "tonic 0.10.2", + "tracing", + "tracing-core", + "tracing-subscriber", +] + +[[package]] +name = "constant_time_eq" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f7144d30dcf0fafbce74250a3963025d8d52177934239851c917d29f1df280c2" + +[[package]] +name = "convert_case" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6245d59a3e82a7fc217c5828a6692dbc6dfb63a0c8c90495621f7b9d79704a0e" + +[[package]] +name = "core-foundation" +version = "0.9.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "91e195e091a93c46f7102ec7818a2aa394e1e1771c3ab4825963fa03e45afb8f" +dependencies = [ + "core-foundation-sys", + "libc", +] + +[[package]] +name = "core-foundation-sys" +version = "0.8.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "06ea2b9bc92be3c2baa9334a323ebca2d6f074ff852cd1d7b11064035cd3868f" + +[[package]] +name = "cpufeatures" +version = "0.2.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "53fe5e26ff1b7aef8bca9c6080520cfb8d9333c7568e1829cef191a9723e5504" +dependencies = [ + "libc", +] + +[[package]] +name = "crc" +version = "3.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "69e6e4d7b33a94f0991c26729976b10ebde1d34c3ee82408fb536164fa10d636" +dependencies = [ + "crc-catalog", +] + +[[package]] +name = "crc-catalog" +version = "2.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "19d374276b40fb8bbdee95aef7c7fa6b5316ec764510eb64b8dd0e2ed0d7e7f5" + +[[package]] +name = "crc32fast" +version = "1.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a97769d94ddab943e4510d138150169a2758b5ef3eb191a9ee688de3e23ef7b3" +dependencies = [ + "cfg-if", +] + +[[package]] +name = "criterion" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f2b12d017a929603d80db1831cd3a24082f8137ce19c69e6447f54f5fc8d692f" +dependencies = [ + "anes", + "cast", + "ciborium", + "clap", + "criterion-plot", + "is-terminal", + "itertools 0.10.5", + "num-traits", + "once_cell", + "oorandom", + "plotters", + "rayon", + "regex", + "serde", + "serde_derive", + "serde_json", + "tinytemplate", + "walkdir", +] + +[[package]] +name = "criterion-plot" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6b50826342786a51a89e2da3a28f1c32b06e387201bc2d19791f622c673706b1" +dependencies = [ + "cast", + "itertools 0.10.5", +] + +[[package]] +name = "crossbeam-channel" +version = "0.5.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "33480d6946193aa8033910124896ca395333cae7e2d1113d1fef6c3272217df2" +dependencies = [ + "crossbeam-utils", +] + +[[package]] +name = "crossbeam-deque" +version = "0.8.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "613f8cc01fe9cf1a3eb3d7f488fd2fa8388403e97039e2f73692932e291a770d" +dependencies = [ + "crossbeam-epoch", + "crossbeam-utils", +] + +[[package]] +name = "crossbeam-epoch" +version = "0.9.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5b82ac4a3c2ca9c3460964f020e1402edd5753411d7737aa39c3714ad1b5420e" +dependencies = [ + "crossbeam-utils", +] + +[[package]] +name = "crossbeam-queue" +version = "0.3.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "df0346b5d5e76ac2fe4e327c5fd1118d6be7c51dfb18f9b7922923f287471e35" +dependencies = [ + "crossbeam-utils", +] + +[[package]] +name = "crossbeam-utils" +version = "0.8.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "22ec99545bb0ed0ea7bb9b8e1e9122ea386ff8a48c0922e43f36d45ab09e0e80" + +[[package]] +name = "crunchy" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7a81dae078cea95a014a339291cec439d2f232ebe854a9d672b796c6afafa9b7" + +[[package]] +name = "crypto-common" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1bfb12502f3fc46cca1bb51ac28df9d618d813cdc3d2f25b9fe775a34af26bb3" +dependencies = [ + "generic-array", + "typenum", +] + +[[package]] +name = "darling" +version = "0.20.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6f63b86c8a8826a49b8c21f08a2d07338eec8d900540f8630dc76284be802989" +dependencies = [ + "darling_core", + "darling_macro", +] + +[[package]] +name = "darling_core" +version = "0.20.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "95133861a8032aaea082871032f5815eb9e98cef03fa916ab4500513994df9e5" +dependencies = [ + "fnv", + "ident_case", + "proc-macro2", + "quote", + "strsim", + "syn", +] + +[[package]] +name = "darling_macro" +version = "0.20.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d336a2a514f6ccccaa3e09b02d41d35330c07ddf03a62165fcec10bb561c7806" +dependencies = [ + "darling_core", + "quote", + "syn", +] + +[[package]] +name = "dashmap" +version = "5.5.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "978747c1d849a7d2ee5e8adc0159961c48fb7e5db2f06af6723b80123bb53856" +dependencies = [ + "cfg-if", + "hashbrown 0.14.5", + "lock_api", + "once_cell", + "parking_lot_core", +] + +[[package]] +name = "deflate64" +version = "0.1.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "83ace6c86376be0b6cdcf3fb41882e81d94b31587573d1cfa9d01cd06bba210d" + +[[package]] +name = "deranged" +version = "0.3.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b42b6fa04a440b495c8b04d0e71b707c585f83cb9cb28cf8cd0d976c315e31b4" +dependencies = [ + "powerfmt", +] + +[[package]] +name = "derive_arbitrary" +version = "1.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "67e77553c4162a157adbf834ebae5b415acbecbeafc7a74b0e886657506a7611" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "derive_builder" +version = "0.20.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0350b5cb0331628a5916d6c5c0b72e97393b8b6b03b47a9284f4e7f5a405ffd7" +dependencies = [ + "derive_builder_macro", +] + +[[package]] +name = "derive_builder_core" +version = "0.20.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d48cda787f839151732d396ac69e3473923d54312c070ee21e9effcaa8ca0b1d" +dependencies = [ + "darling", + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "derive_builder_macro" +version = "0.20.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "206868b8242f27cecce124c19fd88157fbd0dd334df2587f36417bafbc85097b" +dependencies = [ + "derive_builder_core", + "syn", +] + +[[package]] +name = "derive_more" +version = "0.99.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5f33878137e4dafd7fa914ad4e259e18a4e8e532b9617a2d0150262bf53abfce" +dependencies = [ + "convert_case", + "proc-macro2", + "quote", + "rustc_version", + "syn", +] + +[[package]] +name = "digest" +version = "0.10.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292" +dependencies = [ + "block-buffer", + "crypto-common", + "subtle", +] + +[[package]] +name = "displaydoc" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "97369cbbc041bc366949bc74d34658d6cda5621039731c6310521892a3a20ae0" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "dissimilar" +version = "1.0.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "59f8e79d1fbf76bdfbde321e902714bf6c49df88a7dda6fc682fc2979226962d" + +[[package]] +name = "downcast" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1435fa1053d8b2fbbe9be7e97eca7f33d37b28409959813daefc1446a14247f1" + +[[package]] +name = "either" +version = "1.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "60b1af1c220855b6ceac025d3f6ecdd2b7c4894bfe9cd9bda4fbb4bc7c0d4cf0" + +[[package]] +name = "enum-iterator" +version = "2.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c280b9e6b3ae19e152d8e31cf47f18389781e119d4013a2a2bb0180e5facc635" +dependencies = [ + "enum-iterator-derive", +] + +[[package]] +name = "enum-iterator-derive" +version = "1.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a1ab991c1362ac86c61ab6f556cff143daa22e5a15e4e189df818b2fd19fe65b" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "enum_dispatch" +version = "0.3.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aa18ce2bc66555b3218614519ac839ddb759a7d6720732f979ef8d13be147ecd" +dependencies = [ + "once_cell", + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "equivalent" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" + +[[package]] +name = "erased-serde" +version = "0.4.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "24e2389d65ab4fab27dc2a5de7b191e1f6617d1f1c8855c0dc569c94a4cbb18d" +dependencies = [ + "serde", + "typeid", +] + +[[package]] +name = "errno" +version = "0.3.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "534c5cf6194dfab3db3242765c03bbe257cf92f22b38f6bc0c58d59108a820ba" +dependencies = [ + "libc", + "windows-sys 0.52.0", +] + +[[package]] +name = "fastrand" +version = "2.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9fc0510504f03c51ada170672ac806f1f105a88aa97a5281117e1ddc3368e51a" + +[[package]] +name = "filetime" +version = "0.2.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1ee447700ac8aa0b2f2bd7bc4462ad686ba06baa6727ac149a2d6277f0d240fd" +dependencies = [ + "cfg-if", + "libc", + "redox_syscall 0.4.1", + "windows-sys 0.52.0", +] + +[[package]] +name = "fixedbitset" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0ce7134b9999ecaf8bcd65542e436736ef32ddca1b3e06094cb6ec5755203b80" + +[[package]] +name = "flate2" +version = "1.0.30" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5f54427cfd1c7829e2a139fcefea601bf088ebca651d2bf53ebc600eac295dae" +dependencies = [ + "crc32fast", + "miniz_oxide", +] + +[[package]] +name = "fnv" +version = "1.0.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" + +[[package]] +name = "form_urlencoded" +version = "1.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e13624c2627564efccf4934284bdd98cbaa14e79b0b5a141218e507b3a823456" +dependencies = [ + "percent-encoding", +] + +[[package]] +name = "fragile" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6c2141d6d6c8512188a7891b4b01590a45f6dac67afb4f255c4124dbb86d4eaa" + +[[package]] +name = "futures" +version = "0.3.30" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "645c6916888f6cb6350d2550b80fb63e734897a8498abe35cfb732b6487804b0" +dependencies = [ + "futures-channel", + "futures-core", + "futures-executor", + "futures-io", + "futures-sink", + "futures-task", + "futures-util", +] + +[[package]] +name = "futures-channel" +version = "0.3.30" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eac8f7d7865dcb88bd4373ab671c8cf4508703796caa2b1985a9ca867b3fcb78" +dependencies = [ + "futures-core", + "futures-sink", +] + +[[package]] +name = "futures-core" +version = "0.3.30" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dfc6580bb841c5a68e9ef15c77ccc837b40a7504914d52e47b8b0e9bbda25a1d" + +[[package]] +name = "futures-executor" +version = "0.3.30" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a576fc72ae164fca6b9db127eaa9a9dda0d61316034f33a0a0d4eda41f02b01d" +dependencies = [ + "futures-core", + "futures-task", + "futures-util", +] + +[[package]] +name = "futures-io" +version = "0.3.30" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a44623e20b9681a318efdd71c299b6b222ed6f231972bfe2f224ebad6311f0c1" + +[[package]] +name = "futures-macro" +version = "0.3.30" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "87750cf4b7a4c0625b1529e4c543c2182106e4dedc60a2a6455e00d212c489ac" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "futures-retry" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fde5a672a61f96552aa5ed9fd9c81c3fbdae4be9b1e205d6eaf17c83705adc0f" +dependencies = [ + "futures", + "pin-project-lite", + "tokio", +] + +[[package]] +name = "futures-sink" +version = "0.3.30" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9fb8e00e87438d937621c1c6269e53f536c14d3fbd6a042bb24879e57d474fb5" + +[[package]] +name = "futures-task" +version = "0.3.30" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "38d84fa142264698cdce1a9f9172cf383a0c82de1bddcf3092901442c4097004" + +[[package]] +name = "futures-timer" +version = "3.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f288b0a4f20f9a56b5d1da57e2227c661b7b16168e2f72365f57b63326e29b24" + +[[package]] +name = "futures-util" +version = "0.3.30" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3d6401deb83407ab3da39eba7e33987a73c3df0c82b4bb5813ee871c19c41d48" +dependencies = [ + "futures-channel", + "futures-core", + "futures-io", + "futures-macro", + "futures-sink", + "futures-task", + "memchr", + "pin-project-lite", + "pin-utils", + "slab", +] + +[[package]] +name = "generic-array" +version = "0.14.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "85649ca51fd72272d7821adaf274ad91c288277713d9c18820d8499a7ff69e9a" +dependencies = [ + "typenum", + "version_check", +] + +[[package]] +name = "getrandom" +version = "0.2.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c4567c8db10ae91089c99af84c68c38da3ec2f087c3f82960bcdbf3656b6f4d7" +dependencies = [ + "cfg-if", + "libc", + "wasi", +] + +[[package]] +name = "gimli" +version = "0.29.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "40ecd4077b5ae9fd2e9e169b102c6c330d0605168eb0e8bf79952b256dbefffd" + +[[package]] +name = "glob" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d2fabcfbdc87f4758337ca535fb41a6d701b65693ce38287d856d1674551ec9b" + +[[package]] +name = "governor" +version = "0.6.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "68a7f542ee6b35af73b06abc0dad1c1bae89964e4e253bc4b587b91c9637867b" +dependencies = [ + "cfg-if", + "dashmap", + "futures", + "futures-timer", + "no-std-compat", + "nonzero_ext", + "parking_lot", + "portable-atomic", + "quanta", + "rand", + "smallvec", + "spinning_top", +] + +[[package]] +name = "h2" +version = "0.3.26" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "81fe527a889e1532da5c525686d96d4c2e74cdd345badf8dfef9f6b39dd5f5e8" +dependencies = [ + "bytes", + "fnv", + "futures-core", + "futures-sink", + "futures-util", + "http 0.2.12", + "indexmap 2.2.6", + "slab", + "tokio", + "tokio-util", + "tracing", +] + +[[package]] +name = "h2" +version = "0.4.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fa82e28a107a8cc405f0839610bdc9b15f1e25ec7d696aa5cf173edbcb1486ab" +dependencies = [ + "atomic-waker", + "bytes", + "fnv", + "futures-core", + "futures-sink", + "http 1.1.0", + "indexmap 2.2.6", + "slab", + "tokio", + "tokio-util", + "tracing", +] + +[[package]] +name = "half" +version = "2.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6dd08c532ae367adf81c312a4580bc67f1d0fe8bc9c460520283f4c0ff277888" +dependencies = [ + "cfg-if", + "crunchy", +] + +[[package]] +name = "hashbrown" +version = "0.12.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" + +[[package]] +name = "hashbrown" +version = "0.14.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e5274423e17b7c9fc20b6e7e208532f9b19825d82dfd615708b70edd83df41f1" +dependencies = [ + "ahash", + "allocator-api2", +] + +[[package]] +name = "hdrhistogram" +version = "7.5.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "765c9198f173dd59ce26ff9f95ef0aafd0a0fe01fb9d72841bc5066a4c06511d" +dependencies = [ + "base64 0.21.7", + "byteorder", + "flate2", + "nom", + "num-traits", +] + +[[package]] +name = "heck" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea" + +[[package]] +name = "hermit-abi" +version = "0.3.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d231dfb89cfffdbc30e7fc41579ed6066ad03abda9e567ccafae602b97ec5024" + +[[package]] +name = "hmac" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6c49c37c09c17a53d937dfbb742eb3a961d65a994e6bcdcf37e7399d0cc8ab5e" +dependencies = [ + "digest", +] + +[[package]] +name = "http" +version = "0.2.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "601cbb57e577e2f5ef5be8e7b83f0f63994f25aa94d673e54a92d5c516d101f1" +dependencies = [ + "bytes", + "fnv", + "itoa", +] + +[[package]] +name = "http" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "21b9ddb458710bc376481b842f5da65cdf31522de232c1ca8146abce2a358258" +dependencies = [ + "bytes", + "fnv", + "itoa", +] + +[[package]] +name = "http-body" +version = "0.4.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7ceab25649e9960c0311ea418d17bee82c0dcec1bd053b5f9a66e265a693bed2" +dependencies = [ + "bytes", + "http 0.2.12", + "pin-project-lite", +] + +[[package]] +name = "http-body" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1efedce1fb8e6913f23e0c92de8e62cd5b772a67e7b3946df930a62566c93184" +dependencies = [ + "bytes", + "http 1.1.0", +] + +[[package]] +name = "http-body-util" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "793429d76616a256bcb62c2a2ec2bed781c8307e797e2598c50010f2bee2544f" +dependencies = [ + "bytes", + "futures-util", + "http 1.1.0", + "http-body 1.0.1", + "pin-project-lite", +] + +[[package]] +name = "httparse" +version = "1.9.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0fcc0b4a115bf80b728eb8ea024ad5bd707b615bfed49e0665b6e0f86fd082d9" + +[[package]] +name = "httpdate" +version = "1.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "df3b46402a9d5adb4c86a0cf463f42e19994e3ee891101b1841f30a545cb49a9" + +[[package]] +name = "humantime" +version = "2.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9a3a5bfb195931eeb336b2a7b4d761daec841b97f947d34394601737a7bba5e4" + +[[package]] +name = "hyper" +version = "0.14.30" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a152ddd61dfaec7273fe8419ab357f33aee0d914c5f4efbf0d96fa749eea5ec9" +dependencies = [ + "bytes", + "futures-channel", + "futures-core", + "futures-util", + "h2 0.3.26", + "http 0.2.12", + "http-body 0.4.6", + "httparse", + "httpdate", + "itoa", + "pin-project-lite", + "socket2", + "tokio", + "tower-service", + "tracing", + "want", +] + +[[package]] +name = "hyper" +version = "1.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "50dfd22e0e76d0f662d429a5f80fcaf3855009297eab6a0a9f8543834744ba05" +dependencies = [ + "bytes", + "futures-channel", + "futures-util", + "h2 0.4.5", + "http 1.1.0", + "http-body 1.0.1", + "httparse", + "httpdate", + "itoa", + "pin-project-lite", + "smallvec", + "tokio", + "want", +] + +[[package]] +name = "hyper-rustls" +version = "0.27.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5ee4be2c948921a1a5320b629c4193916ed787a7f7f293fd3f7f5a6c9de74155" +dependencies = [ + "futures-util", + "http 1.1.0", + "hyper 1.4.1", + "hyper-util", + "rustls 0.23.11", + "rustls-pki-types", + "tokio", + "tokio-rustls 0.26.0", + "tower-service", + "webpki-roots", +] + +[[package]] +name = "hyper-timeout" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bbb958482e8c7be4bc3cf272a766a2b0bf1a6755e7a6ae777f017a31d11b13b1" +dependencies = [ + "hyper 0.14.30", + "pin-project-lite", + "tokio", + "tokio-io-timeout", +] + +[[package]] +name = "hyper-util" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3ab92f4f49ee4fb4f997c784b7a2e0fa70050211e0b6a287f898c3c9785ca956" +dependencies = [ + "bytes", + "futures-channel", + "futures-util", + "http 1.1.0", + "http-body 1.0.1", + "hyper 1.4.1", + "pin-project-lite", + "socket2", + "tokio", + "tower", + "tower-service", + "tracing", +] + +[[package]] +name = "ident_case" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39" + +[[package]] +name = "idna" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "634d9b1461af396cad843f47fdba5597a4f9e6ddd4bfb6ff5d85028c25cb12f6" +dependencies = [ + "unicode-bidi", + "unicode-normalization", +] + +[[package]] +name = "indexmap" +version = "1.9.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bd070e393353796e801d209ad339e89596eb4c8d430d18ede6a1cced8fafbd99" +dependencies = [ + "autocfg", + "hashbrown 0.12.3", +] + +[[package]] +name = "indexmap" +version = "2.2.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "168fb715dda47215e360912c096649d23d58bf392ac62f73919e831745e40f26" +dependencies = [ + "equivalent", + "hashbrown 0.14.5", +] + +[[package]] +name = "inout" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a0c10553d664a4d0bcff9f4215d0aac67a639cc68ef660840afe309b807bc9f5" +dependencies = [ + "generic-array", +] + +[[package]] +name = "instant" +version = "0.1.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e0242819d153cba4b4b05a5a8f2a7e9bbf97b6055b2a002b395c96b5ff3c0222" +dependencies = [ + "cfg-if", +] + +[[package]] +name = "inventory" +version = "0.3.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f958d3d68f4167080a18141e10381e7634563984a537f2a49a30fd8e53ac5767" + +[[package]] +name = "ipnet" +version = "2.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8f518f335dce6725a761382244631d86cf0ccb2863413590b31338feb467f9c3" + +[[package]] +name = "is-terminal" +version = "0.4.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f23ff5ef2b80d608d61efee834934d862cd92461afc0560dedf493e4c033738b" +dependencies = [ + "hermit-abi", + "libc", + "windows-sys 0.52.0", +] + +[[package]] +name = "is_terminal_polyfill" +version = "1.70.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f8478577c03552c21db0e2724ffb8986a5ce7af88107e6be5d2ee6e158c12800" + +[[package]] +name = "itertools" +version = "0.10.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b0fd2260e829bddf4cb6ea802289de2f86d6a7a690192fbe91b3f46e0f2c8473" +dependencies = [ + "either", +] + +[[package]] +name = "itertools" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ba291022dbbd398a455acf126c1e341954079855bc60dfdda641363bd6922569" +dependencies = [ + "either", +] + +[[package]] +name = "itertools" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "413ee7dfc52ee1a4949ceeb7dbc8a33f2d6c088194d9f922fb8318faf1f01186" +dependencies = [ + "either", +] + +[[package]] +name = "itoa" +version = "1.0.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "49f1f14873335454500d59611f1cf4a4b0f786f9ac11f4312a78e4cf2566695b" + +[[package]] +name = "jobserver" +version = "0.1.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d2b099aaa34a9751c5bf0878add70444e1ed2dd73f347be99003d4577277de6e" +dependencies = [ + "libc", +] + +[[package]] +name = "js-sys" +version = "0.3.69" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "29c15563dc2726973df627357ce0c9ddddbea194836909d655df6a75d2cf296d" +dependencies = [ + "wasm-bindgen", +] + +[[package]] +name = "lazy_static" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe" + +[[package]] +name = "lazycell" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "830d08ce1d1d941e6b30645f1a0eb5643013d835ce3779a5fc208261dbe10f55" + +[[package]] +name = "libc" +version = "0.2.155" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "97b3888a4aecf77e811145cadf6eef5901f4782c53886191b2f693f24761847c" + +[[package]] +name = "libloading" +version = "0.8.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e310b3a6b5907f99202fcdb4960ff45b93735d7c7d96b760fcff8db2dc0e103d" +dependencies = [ + "cfg-if", + "windows-targets 0.52.6", +] + +[[package]] +name = "linux-raw-sys" +version = "0.4.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "78b3ae25bc7c8c38cec158d1f2757ee79e9b3740fbc7ccf0e59e4b08d793fa89" + +[[package]] +name = "lock_api" +version = "0.4.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "07af8b9cdd281b7915f413fa73f29ebd5d55d0d3f0155584dade1ff18cea1b17" +dependencies = [ + "autocfg", + "scopeguard", +] + +[[package]] +name = "lockfree-object-pool" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9374ef4228402d4b7e403e5838cb880d9ee663314b0a900d5a6aabf0c213552e" + +[[package]] +name = "log" +version = "0.4.22" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a7a70ba024b9dc04c27ea2f0c0548feb474ec5c54bba33a7f72f873a39d07b24" + +[[package]] +name = "lru" +version = "0.12.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d3262e75e648fce39813cb56ac41f3c3e3f65217ebf3844d818d1f9398cfb0dc" +dependencies = [ + "hashbrown 0.14.5", +] + +[[package]] +name = "lzma-rs" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "297e814c836ae64db86b36cf2a557ba54368d03f6afcd7d947c266692f71115e" +dependencies = [ + "byteorder", + "crc", +] + +[[package]] +name = "magnus" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3d87ae53030f3a22e83879e666cb94e58a7bdf31706878a0ba48752994146dab" +dependencies = [ + "magnus-macros", + "rb-sys", + "rb-sys-env", + "seq-macro", +] + +[[package]] +name = "magnus-macros" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5968c820e2960565f647819f5928a42d6e874551cab9d88d75e3e0660d7f71e3" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "matchers" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8263075bb86c5a1b1427b5ae862e8889656f126e9f77c484496e8b47cf5c5558" +dependencies = [ + "regex-automata 0.1.10", +] + +[[package]] +name = "matchit" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0e7465ac9959cc2b1404e8e2367b43684a6d13790fe23056cc8c6c5a6b7bcb94" + +[[package]] +name = "memchr" +version = "2.7.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "78ca9ab1a0babb1e7d5695e3530886289c18cf2f87ec19a575a0abdce112e3a3" + +[[package]] +name = "mime" +version = "0.3.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6877bb514081ee2a7ff5ef9de3281f14a4dd4bceac4c09388074a6b5df8a139a" + +[[package]] +name = "minimal-lexical" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" + +[[package]] +name = "miniz_oxide" +version = "0.7.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b8a240ddb74feaf34a79a7add65a741f3167852fba007066dcac1ca548d89c08" +dependencies = [ + "adler", +] + +[[package]] +name = "mio" +version = "0.8.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a4a650543ca06a924e8b371db273b2756685faae30f8487da1b56505a8f78b0c" +dependencies = [ + "libc", + "wasi", + "windows-sys 0.48.0", +] + +[[package]] +name = "mockall" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "43766c2b5203b10de348ffe19f7e54564b64f3d6018ff7648d1e2d6d3a0f0a48" +dependencies = [ + "cfg-if", + "downcast", + "fragile", + "lazy_static", + "mockall_derive", + "predicates", + "predicates-tree", +] + +[[package]] +name = "mockall_derive" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "af7cbce79ec385a1d4f54baa90a76401eb15d9cab93685f62e7e9f942aa00ae2" +dependencies = [ + "cfg-if", + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "multimap" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "defc4c55412d89136f966bbb339008b474350e5e6e78d2714439c386b3137a03" + +[[package]] +name = "no-std-compat" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b93853da6d84c2e3c7d730d6473e8817692dd89be387eb01b94d7f108ecb5b8c" + +[[package]] +name = "nom" +version = "7.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d273983c5a657a70a3e8f2a01329822f3b8c8172b73826411a55751e404a0a4a" +dependencies = [ + "memchr", + "minimal-lexical", +] + +[[package]] +name = "nonzero_ext" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "38bf9645c8b145698bb0b18a4637dcacbc421ea49bef2317e4fd8065a387cf21" + +[[package]] +name = "ntapi" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e8a3895c6391c39d7fe7ebc444a87eb2991b2a0bc718fdabd071eec617fc68e4" +dependencies = [ + "winapi", +] + +[[package]] +name = "nu-ansi-term" +version = "0.46.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "77a8165726e8236064dbb45459242600304b42a5ea24ee2948e18e023bf7ba84" +dependencies = [ + "overload", + "winapi", +] + +[[package]] +name = "num-conv" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "51d515d32fb182ee37cda2ccdcb92950d6a3c2893aa280e540671c2cd0f3b1d9" + +[[package]] +name = "num-traits" +version = "0.2.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "071dfc062690e90b734c0b2273ce72ad0ffa95f0c74596bc250dcfd960262841" +dependencies = [ + "autocfg", +] + +[[package]] +name = "num_cpus" +version = "1.16.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4161fcb6d602d4d2081af7c3a45852d875a03dd337a6bfdd6e06407b61342a43" +dependencies = [ + "hermit-abi", + "libc", +] + +[[package]] +name = "object" +version = "0.36.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "081b846d1d56ddfc18fdf1a922e4f6e07a11768ea1b92dec44e42b72712ccfce" +dependencies = [ + "memchr", +] + +[[package]] +name = "once_cell" +version = "1.19.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92" + +[[package]] +name = "oorandom" +version = "11.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b410bbe7e14ab526a0e86877eb47c6996a2bd7746f027ba551028c925390e4e9" + +[[package]] +name = "openssl-probe" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf" + +[[package]] +name = "opentelemetry" +version = "0.23.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1b69a91d4893e713e06f724597ad630f1fa76057a5e1026c0ca67054a9032a76" +dependencies = [ + "futures-core", + "futures-sink", + "js-sys", + "once_cell", + "pin-project-lite", + "thiserror", +] + +[[package]] +name = "opentelemetry-otlp" +version = "0.16.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a94c69209c05319cdf7460c6d4c055ed102be242a0a6245835d7bc42c6ec7f54" +dependencies = [ + "async-trait", + "futures-core", + "http 0.2.12", + "opentelemetry", + "opentelemetry-proto", + "opentelemetry_sdk", + "prost", + "thiserror", + "tokio", + "tonic 0.11.0", +] + +[[package]] +name = "opentelemetry-prometheus" +version = "0.16.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5e1a24eafe47b693cb938f8505f240dc26c71db60df9aca376b4f857e9653ec7" +dependencies = [ + "once_cell", + "opentelemetry", + "opentelemetry_sdk", + "prometheus", + "protobuf", +] + +[[package]] +name = "opentelemetry-proto" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "984806e6cf27f2b49282e2a05e288f30594f3dbc74eb7a6e99422bc48ed78162" +dependencies = [ + "opentelemetry", + "opentelemetry_sdk", + "prost", + "tonic 0.11.0", +] + +[[package]] +name = "opentelemetry_sdk" +version = "0.23.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ae312d58eaa90a82d2e627fd86e075cf5230b3f11794e2ed74199ebbe572d4fd" +dependencies = [ + "async-trait", + "futures-channel", + "futures-executor", + "futures-util", + "glob", + "lazy_static", + "once_cell", + "opentelemetry", + "ordered-float", + "percent-encoding", + "rand", + "thiserror", + "tokio", + "tokio-stream", +] + +[[package]] +name = "ordered-float" +version = "4.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "19ff2cf528c6c03d9ed653d6c4ce1dc0582dc4af309790ad92f07c1cd551b0be" +dependencies = [ + "num-traits", +] + +[[package]] +name = "overload" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b15813163c1d831bf4a13c3610c05c0d03b39feb07f7e09fa234dac9b15aaf39" + +[[package]] +name = "parking_lot" +version = "0.12.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f1bf18183cf54e8d6059647fc3063646a1801cf30896933ec2311622cc4b9a27" +dependencies = [ + "lock_api", + "parking_lot_core", +] + +[[package]] +name = "parking_lot_core" +version = "0.9.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e401f977ab385c9e4e3ab30627d6f26d00e2c73eef317493c4ec6d468726cf8" +dependencies = [ + "cfg-if", + "libc", + "redox_syscall 0.5.2", + "smallvec", + "windows-targets 0.52.6", +] + +[[package]] +name = "paste" +version = "1.0.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "57c0d7b74b563b49d38dae00a0c37d4d6de9b432382b2892f0574ddcae73fd0a" + +[[package]] +name = "pbkdf2" +version = "0.12.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f8ed6a7761f76e3b9f92dfb0a60a6a6477c61024b775147ff0973a02653abaf2" +dependencies = [ + "digest", + "hmac", +] + +[[package]] +name = "percent-encoding" +version = "2.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e" + +[[package]] +name = "petgraph" +version = "0.6.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b4c5cc86750666a3ed20bdaf5ca2a0344f9c67674cae0515bec2da16fbaa47db" +dependencies = [ + "fixedbitset", + "indexmap 2.2.6", +] + +[[package]] +name = "pid" +version = "4.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d7c931ef9756cd5e3fa3d395bfe09df4dfa6f0612c6ca8f6b12927d17ca34e36" +dependencies = [ + "num-traits", +] + +[[package]] +name = "pin-project" +version = "1.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6bf43b791c5b9e34c3d182969b4abb522f9343702850a2e57f460d00d09b4b3" +dependencies = [ + "pin-project-internal", +] + +[[package]] +name = "pin-project-internal" +version = "1.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2f38a4412a78282e09a2cf38d195ea5420d15ba0602cb375210efbc877243965" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "pin-project-lite" +version = "0.2.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bda66fc9667c18cb2758a2ac84d1167245054bcf85d5d1aaa6923f45801bdd02" + +[[package]] +name = "pin-utils" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" + +[[package]] +name = "pkg-config" +version = "0.3.30" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d231b230927b5e4ad203db57bbcbee2802f6bce620b1e4a9024a07d94e2907ec" + +[[package]] +name = "plotters" +version = "0.3.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a15b6eccb8484002195a3e44fe65a4ce8e93a625797a063735536fd59cb01cf3" +dependencies = [ + "num-traits", + "plotters-backend", + "plotters-svg", + "wasm-bindgen", + "web-sys", +] + +[[package]] +name = "plotters-backend" +version = "0.3.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "414cec62c6634ae900ea1c56128dfe87cf63e7caece0852ec76aba307cebadb7" + +[[package]] +name = "plotters-svg" +version = "0.3.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "81b30686a7d9c3e010b84284bdd26a29f2138574f52f5eb6f794fc0ad924e705" +dependencies = [ + "plotters-backend", +] + +[[package]] +name = "portable-atomic" +version = "1.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7170ef9988bc169ba16dd36a7fa041e5c4cbeb6a35b76d4c03daded371eae7c0" + +[[package]] +name = "powerfmt" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "439ee305def115ba05938db6eb1644ff94165c5ab5e9420d1c1bcedbba909391" + +[[package]] +name = "ppv-lite86" +version = "0.2.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de" + +[[package]] +name = "predicates" +version = "3.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "68b87bfd4605926cdfefc1c3b5f8fe560e3feca9d5552cf68c466d3d8236c7e8" +dependencies = [ + "anstyle", + "predicates-core", +] + +[[package]] +name = "predicates-core" +version = "1.0.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b794032607612e7abeb4db69adb4e33590fa6cf1149e95fd7cb00e634b92f174" + +[[package]] +name = "predicates-tree" +version = "1.0.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "368ba315fb8c5052ab692e68a0eefec6ec57b23a36959c14496f0b0df2c0cecf" +dependencies = [ + "predicates-core", + "termtree", +] + +[[package]] +name = "prettyplease" +version = "0.2.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5f12335488a2f3b0a83b14edad48dca9879ce89b2edd10e80237e4e852dd645e" +dependencies = [ + "proc-macro2", + "syn", +] + +[[package]] +name = "proc-macro2" +version = "1.0.86" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5e719e8df665df0d1c8fbfd238015744736151d4445ec0836b8e628aae103b77" +dependencies = [ + "unicode-ident", +] + +[[package]] +name = "prometheus" +version = "0.13.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3d33c28a30771f7f96db69893f78b857f7450d7e0237e9c8fc6427a81bae7ed1" +dependencies = [ + "cfg-if", + "fnv", + "lazy_static", + "memchr", + "parking_lot", + "protobuf", + "thiserror", +] + +[[package]] +name = "prost" +version = "0.12.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "deb1435c188b76130da55f17a466d252ff7b1418b2ad3e037d127b94e3411f29" +dependencies = [ + "bytes", + "prost-derive", +] + +[[package]] +name = "prost-build" +version = "0.12.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "22505a5c94da8e3b7c2996394d1c933236c4d743e81a410bcca4e6989fc066a4" +dependencies = [ + "bytes", + "heck", + "itertools 0.12.1", + "log", + "multimap", + "once_cell", + "petgraph", + "prettyplease", + "prost", + "prost-types", + "regex", + "syn", + "tempfile", +] + +[[package]] +name = "prost-derive" +version = "0.12.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "81bddcdb20abf9501610992b6759a4c888aef7d1a7247ef75e2404275ac24af1" +dependencies = [ + "anyhow", + "itertools 0.12.1", + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "prost-types" +version = "0.12.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9091c90b0a32608e984ff2fa4091273cbdd755d54935c51d520887f4a1dbd5b0" +dependencies = [ + "prost", +] + +[[package]] +name = "prost-wkt" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5fb7ec2850c138ebaa7ab682503b5d08c3cb330343e9c94776612928b6ddb53f" +dependencies = [ + "chrono", + "inventory", + "prost", + "serde", + "serde_derive", + "serde_json", + "typetag", +] + +[[package]] +name = "prost-wkt-build" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "598b7365952c2ed4e32902de0533653aafbe5ae3da436e8e2335c7d375a1cef3" +dependencies = [ + "heck", + "prost", + "prost-build", + "prost-types", + "quote", +] + +[[package]] +name = "prost-wkt-types" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1a8eadc2381640a49c1fbfb9f4a857794b4e5bf5a2cbc2d858cfdb74f64dcd22" +dependencies = [ + "chrono", + "prost", + "prost-build", + "prost-types", + "prost-wkt", + "prost-wkt-build", + "regex", + "serde", + "serde_derive", + "serde_json", +] + +[[package]] +name = "protobuf" +version = "2.28.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "106dd99e98437432fed6519dedecfade6a06a73bb7b2a1e019fdd2bee5778d94" + +[[package]] +name = "quanta" +version = "0.12.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e5167a477619228a0b284fac2674e3c388cba90631d7b7de620e6f1fcd08da5" +dependencies = [ + "crossbeam-utils", + "libc", + "once_cell", + "raw-cpuid", + "wasi", + "web-sys", + "winapi", +] + +[[package]] +name = "quinn" +version = "0.11.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e4ceeeeabace7857413798eb1ffa1e9c905a9946a57d81fb69b4b71c4d8eb3ad" +dependencies = [ + "bytes", + "pin-project-lite", + "quinn-proto", + "quinn-udp", + "rustc-hash", + "rustls 0.23.11", + "thiserror", + "tokio", + "tracing", +] + +[[package]] +name = "quinn-proto" +version = "0.11.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ddf517c03a109db8100448a4be38d498df8a210a99fe0e1b9eaf39e78c640efe" +dependencies = [ + "bytes", + "rand", + "ring", + "rustc-hash", + "rustls 0.23.11", + "slab", + "thiserror", + "tinyvec", + "tracing", +] + +[[package]] +name = "quinn-udp" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9096629c45860fc7fb143e125eb826b5e721e10be3263160c7d60ca832cf8c46" +dependencies = [ + "libc", + "once_cell", + "socket2", + "tracing", + "windows-sys 0.52.0", +] + +[[package]] +name = "quote" +version = "1.0.36" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0fa76aaf39101c457836aec0ce2316dbdc3ab723cdda1c6bd4e6ad4208acaca7" +dependencies = [ + "proc-macro2", +] + +[[package]] +name = "rand" +version = "0.8.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404" +dependencies = [ + "libc", + "rand_chacha", + "rand_core", +] + +[[package]] +name = "rand_chacha" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88" +dependencies = [ + "ppv-lite86", + "rand_core", +] + +[[package]] +name = "rand_core" +version = "0.6.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" +dependencies = [ + "getrandom", +] + +[[package]] +name = "raw-cpuid" +version = "11.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e29830cbb1290e404f24c73af91c5d8d631ce7e128691e9477556b540cd01ecd" +dependencies = [ + "bitflags 2.6.0", +] + +[[package]] +name = "rayon" +version = "1.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b418a60154510ca1a002a752ca9714984e21e4241e804d32555251faf8b78ffa" +dependencies = [ + "either", + "rayon-core", +] + +[[package]] +name = "rayon-core" +version = "1.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1465873a3dfdaa8ae7cb14b4383657caab0b3e8a0aa9ae8e04b044854c8dfce2" +dependencies = [ + "crossbeam-deque", + "crossbeam-utils", +] + +[[package]] +name = "rb-sys" +version = "0.9.98" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8914b2e6af10bd50dd7aaac8c5146872d3924d6012929b4ff504e988f6badd24" +dependencies = [ + "rb-sys-build", +] + +[[package]] +name = "rb-sys-build" +version = "0.9.98" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "12af68c9757d419b82d65a12b5db538990dfe9416049fea3f0ba4b9a8ca108cd" +dependencies = [ + "bindgen", + "lazy_static", + "proc-macro2", + "quote", + "regex", + "shell-words", + "syn", +] + +[[package]] +name = "rb-sys-env" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a35802679f07360454b418a5d1735c89716bde01d35b1560fc953c1415a0b3bb" + +[[package]] +name = "redox_syscall" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4722d768eff46b75989dd134e5c353f0d6296e5aaa3132e776cbdb56be7731aa" +dependencies = [ + "bitflags 1.3.2", +] + +[[package]] +name = "redox_syscall" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c82cf8cff14456045f55ec4241383baeff27af886adb72ffb2162f99911de0fd" +dependencies = [ + "bitflags 2.6.0", +] + +[[package]] +name = "regex" +version = "1.10.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b91213439dad192326a0d7c6ee3955910425f441d7038e0d6933b0aec5c4517f" +dependencies = [ + "aho-corasick", + "memchr", + "regex-automata 0.4.7", + "regex-syntax 0.8.4", +] + +[[package]] +name = "regex-automata" +version = "0.1.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6c230d73fb8d8c1b9c0b3135c5142a8acee3a0558fb8db5cf1cb65f8d7862132" +dependencies = [ + "regex-syntax 0.6.29", +] + +[[package]] +name = "regex-automata" +version = "0.4.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "38caf58cc5ef2fed281f89292ef23f6365465ed9a41b7a7754eb4e26496c92df" +dependencies = [ + "aho-corasick", + "memchr", + "regex-syntax 0.8.4", +] + +[[package]] +name = "regex-syntax" +version = "0.6.29" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f162c6dd7b008981e4d40210aca20b4bd0f9b60ca9271061b07f78537722f2e1" + +[[package]] +name = "regex-syntax" +version = "0.8.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7a66a03ae7c801facd77a29370b4faec201768915ac14a721ba36f20bc9c209b" + +[[package]] +name = "relative-path" +version = "1.9.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ba39f3699c378cd8970968dcbff9c43159ea4cfbd88d43c00b22f2ef10a435d2" + +[[package]] +name = "reqwest" +version = "0.12.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c7d6d2a27d57148378eb5e111173f4276ad26340ecc5c49a4a2152167a2d6a37" +dependencies = [ + "base64 0.22.1", + "bytes", + "futures-core", + "futures-util", + "http 1.1.0", + "http-body 1.0.1", + "http-body-util", + "hyper 1.4.1", + "hyper-rustls", + "hyper-util", + "ipnet", + "js-sys", + "log", + "mime", + "once_cell", + "percent-encoding", + "pin-project-lite", + "quinn", + "rustls 0.23.11", + "rustls-pemfile", + "rustls-pki-types", + "serde", + "serde_json", + "serde_urlencoded", + "sync_wrapper 1.0.1", + "tokio", + "tokio-rustls 0.26.0", + "tokio-util", + "tower-service", + "url", + "wasm-bindgen", + "wasm-bindgen-futures", + "wasm-streams", + "web-sys", + "webpki-roots", + "winreg", +] + +[[package]] +name = "ring" +version = "0.17.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c17fa4cb658e3583423e915b9f3acc01cceaee1860e33d59ebae66adc3a2dc0d" +dependencies = [ + "cc", + "cfg-if", + "getrandom", + "libc", + "spin", + "untrusted", + "windows-sys 0.52.0", +] + +[[package]] +name = "ringbuf" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c65e4c865bc3d2e3294493dff0acf7e6c259d066e34e22059fa9c39645c3636" +dependencies = [ + "crossbeam-utils", +] + +[[package]] +name = "rmp" +version = "0.8.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "228ed7c16fa39782c3b3468e974aec2795e9089153cd08ee2e9aefb3613334c4" +dependencies = [ + "byteorder", + "num-traits", + "paste", +] + +[[package]] +name = "rmp-serde" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "52e599a477cf9840e92f2cde9a7189e67b42c57532749bf90aea6ec10facd4db" +dependencies = [ + "byteorder", + "rmp", + "serde", +] + +[[package]] +name = "rstest" +version = "0.19.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9d5316d2a1479eeef1ea21e7f9ddc67c191d497abc8fc3ba2467857abbb68330" +dependencies = [ + "futures", + "futures-timer", + "rstest_macros", + "rustc_version", +] + +[[package]] +name = "rstest_macros" +version = "0.19.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "04a9df72cc1f67020b0d63ad9bfe4a323e459ea7eb68e03bd9824db49f9a4c25" +dependencies = [ + "cfg-if", + "glob", + "proc-macro2", + "quote", + "regex", + "relative-path", + "rustc_version", + "syn", + "unicode-ident", +] + +[[package]] +name = "rustc-demangle" +version = "0.1.24" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "719b953e2095829ee67db738b3bfa9fa368c94900df327b3f07fe6e794d2fe1f" + +[[package]] +name = "rustc-hash" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2" + +[[package]] +name = "rustc_version" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bfa0f585226d2e68097d4f95d113b15b83a82e819ab25717ec0590d9584ef366" +dependencies = [ + "semver", +] + +[[package]] +name = "rustfsm" +version = "0.1.0" +dependencies = [ + "rustfsm_procmacro", + "rustfsm_trait", +] + +[[package]] +name = "rustfsm_procmacro" +version = "0.1.0" +dependencies = [ + "derive_more", + "proc-macro2", + "quote", + "rustfsm_trait", + "syn", + "trybuild", +] + +[[package]] +name = "rustfsm_trait" +version = "0.1.0" + +[[package]] +name = "rustix" +version = "0.38.34" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "70dc5ec042f7a43c4a73241207cecc9873a06d45debb38b329f8541d85c2730f" +dependencies = [ + "bitflags 2.6.0", + "errno", + "libc", + "linux-raw-sys", + "windows-sys 0.52.0", +] + +[[package]] +name = "rustls" +version = "0.22.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bf4ef73721ac7bcd79b2b315da7779d8fc09718c6b3d2d1b2d94850eb8c18432" +dependencies = [ + "log", + "ring", + "rustls-pki-types", + "rustls-webpki", + "subtle", + "zeroize", +] + +[[package]] +name = "rustls" +version = "0.23.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4828ea528154ae444e5a642dbb7d5623354030dc9822b83fd9bb79683c7399d0" +dependencies = [ + "once_cell", + "ring", + "rustls-pki-types", + "rustls-webpki", + "subtle", + "zeroize", +] + +[[package]] +name = "rustls-native-certs" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a88d6d420651b496bdd98684116959239430022a115c1240e6c3993be0b15fba" +dependencies = [ + "openssl-probe", + "rustls-pemfile", + "rustls-pki-types", + "schannel", + "security-framework", +] + +[[package]] +name = "rustls-pemfile" +version = "2.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "29993a25686778eb88d4189742cd713c9bce943bc54251a33509dc63cbacf73d" +dependencies = [ + "base64 0.22.1", + "rustls-pki-types", +] + +[[package]] +name = "rustls-pki-types" +version = "1.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "976295e77ce332211c0d24d92c0e83e50f5c5f046d11082cea19f3df13a3562d" + +[[package]] +name = "rustls-webpki" +version = "0.102.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f9a6fccd794a42c2c105b513a2f62bc3fd8f3ba57a4593677ceb0bd035164d78" +dependencies = [ + "ring", + "rustls-pki-types", + "untrusted", +] + +[[package]] +name = "rustversion" +version = "1.0.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "955d28af4278de8121b7ebeb796b6a45735dc01436d898801014aced2773a3d6" + +[[package]] +name = "ryu" +version = "1.0.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f3cb5ba0dc43242ce17de99c180e96db90b235b8a9fdc9543c96d2209116bd9f" + +[[package]] +name = "same-file" +version = "1.0.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "93fc1dc3aaa9bfed95e02e6eadabb4baf7e3078b0bd1b4d7b6b0b68378900502" +dependencies = [ + "winapi-util", +] + +[[package]] +name = "schannel" +version = "0.1.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fbc91545643bcf3a0bbb6569265615222618bdf33ce4ffbbd13c4bbd4c093534" +dependencies = [ + "windows-sys 0.52.0", +] + +[[package]] +name = "scopeguard" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" + +[[package]] +name = "security-framework" +version = "2.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c627723fd09706bacdb5cf41499e95098555af3c3c29d014dc3c458ef6be11c0" +dependencies = [ + "bitflags 2.6.0", + "core-foundation", + "core-foundation-sys", + "libc", + "security-framework-sys", +] + +[[package]] +name = "security-framework-sys" +version = "2.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "317936bbbd05227752583946b9e66d7ce3b489f84e11a94a510b4437fef407d7" +dependencies = [ + "core-foundation-sys", + "libc", +] + +[[package]] +name = "semver" +version = "1.0.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "61697e0a1c7e512e84a621326239844a24d8207b4669b41bc18b32ea5cbf988b" + +[[package]] +name = "seq-macro" +version = "0.3.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a3f0bf26fd526d2a95683cd0f87bf103b8539e2ca1ef48ce002d67aad59aa0b4" + +[[package]] +name = "serde" +version = "1.0.204" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bc76f558e0cbb2a839d37354c575f1dc3fdc6546b5be373ba43d95f231bf7c12" +dependencies = [ + "serde_derive", +] + +[[package]] +name = "serde_derive" +version = "1.0.204" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e0cd7e117be63d3c3678776753929474f3b04a43a080c744d6b0ae2a8c28e222" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "serde_json" +version = "1.0.120" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4e0d21c9a8cae1235ad58a00c11cb40d4b1e5c784f1ef2c537876ed6ffd8b7c5" +dependencies = [ + "itoa", + "ryu", + "serde", +] + +[[package]] +name = "serde_spanned" +version = "0.6.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "79e674e01f999af37c49f70a6ede167a8a60b2503e56c5599532a65baa5969a0" +dependencies = [ + "serde", +] + +[[package]] +name = "serde_urlencoded" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d3491c14715ca2294c4d6a88f15e84739788c1d030eed8c110436aafdaa2f3fd" +dependencies = [ + "form_urlencoded", + "itoa", + "ryu", + "serde", +] + +[[package]] +name = "sha1" +version = "0.10.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e3bf829a2d51ab4a5ddf1352d8470c140cadc8301b2ae1789db023f01cedd6ba" +dependencies = [ + "cfg-if", + "cpufeatures", + "digest", +] + +[[package]] +name = "sharded-slab" +version = "0.1.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f40ca3c46823713e0d4209592e8d6e826aa57e928f09752619fc696c499637f6" +dependencies = [ + "lazy_static", +] + +[[package]] +name = "shell-words" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "24188a676b6ae68c3b2cb3a01be17fbf7240ce009799bb56d5b1409051e78fde" + +[[package]] +name = "shlex" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64" + +[[package]] +name = "signal-hook-registry" +version = "1.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a9e9e0b4211b72e7b8b6e85c807d36c212bdb33ea8587f7569562a84df5465b1" +dependencies = [ + "libc", +] + +[[package]] +name = "simd-adler32" +version = "0.3.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d66dc143e6b11c1eddc06d5c423cfc97062865baf299914ab64caa38182078fe" + +[[package]] +name = "siphasher" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "56199f7ddabf13fe5074ce809e7d3f42b42ae711800501b5b16ea82ad029c39d" + +[[package]] +name = "slab" +version = "0.4.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8f92a496fb766b417c996b9c5e57daf2f7ad3b0bebe1ccfca4856390e3d3bb67" +dependencies = [ + "autocfg", +] + +[[package]] +name = "slotmap" +version = "1.0.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dbff4acf519f630b3a3ddcfaea6c06b42174d9a44bc70c620e9ed1649d58b82a" +dependencies = [ + "version_check", +] + +[[package]] +name = "smallvec" +version = "1.13.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3c5e1a9a646d36c3599cd173a41282daf47c44583ad367b8e6837255952e5c67" + +[[package]] +name = "socket2" +version = "0.5.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ce305eb0b4296696835b71df73eb912e0f1ffd2556a501fcede6e0c50349191c" +dependencies = [ + "libc", + "windows-sys 0.52.0", +] + +[[package]] +name = "spin" +version = "0.9.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6980e8d7511241f8acf4aebddbb1ff938df5eebe98691418c4468d0b72a96a67" + +[[package]] +name = "spinning_top" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d96d2d1d716fb500937168cc09353ffdc7a012be8475ac7308e1bdf0e3923300" +dependencies = [ + "lock_api", +] + +[[package]] +name = "strsim" +version = "0.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f" + +[[package]] +name = "subtle" +version = "2.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "13c2bddecc57b384dee18652358fb23172facb8a2c51ccc10d74c157bdea3292" + +[[package]] +name = "syn" +version = "2.0.71" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b146dcf730474b4bcd16c311627b31ede9ab149045db4d6088b3becaea046462" +dependencies = [ + "proc-macro2", + "quote", + "unicode-ident", +] + +[[package]] +name = "sync_wrapper" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2047c6ded9c721764247e62cd3b03c09ffc529b2ba5b10ec482ae507a4a70160" + +[[package]] +name = "sync_wrapper" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a7065abeca94b6a8a577f9bd45aa0867a2238b74e8eb67cf10d492bc39351394" + +[[package]] +name = "sysinfo" +version = "0.30.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0a5b4ddaee55fb2bea2bf0e5000747e5f5c0de765e5a5ff87f4cd106439f4bb3" +dependencies = [ + "cfg-if", + "core-foundation-sys", + "libc", + "ntapi", + "once_cell", + "rayon", + "windows", +] + +[[package]] +name = "tar" +version = "0.4.41" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cb797dad5fb5b76fcf519e702f4a589483b5ef06567f160c392832c1f5e44909" +dependencies = [ + "filetime", + "libc", + "xattr", +] + +[[package]] +name = "tempfile" +version = "3.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "85b77fafb263dd9d05cbeac119526425676db3784113aa9295c88498cbf8bff1" +dependencies = [ + "cfg-if", + "fastrand", + "rustix", + "windows-sys 0.52.0", +] + +[[package]] +name = "temporal-client" +version = "0.1.0" +dependencies = [ + "anyhow", + "assert_matches", + "async-trait", + "backoff", + "base64 0.22.1", + "derive_builder", + "derive_more", + "futures", + "futures-retry", + "http 0.2.12", + "hyper 0.14.30", + "mockall", + "once_cell", + "opentelemetry", + "parking_lot", + "prost-types", + "slotmap", + "temporal-sdk-core-api", + "temporal-sdk-core-protos", + "thiserror", + "tokio", + "tonic 0.11.0", + "tower", + "tracing", + "url", + "uuid", +] + +[[package]] +name = "temporal-sdk" +version = "0.1.0-alpha.1" +dependencies = [ + "anyhow", + "async-trait", + "crossbeam-channel", + "derive_more", + "futures", + "parking_lot", + "prost-wkt-types", + "serde", + "temporal-client", + "temporal-sdk-core", + "temporal-sdk-core-api", + "temporal-sdk-core-protos", + "thiserror", + "tokio", + "tokio-stream", + "tokio-util", + "tracing", +] + +[[package]] +name = "temporal-sdk-core" +version = "0.1.0" +dependencies = [ + "anyhow", + "assert_matches", + "async-trait", + "bimap", + "clap", + "console-subscriber", + "criterion", + "crossbeam-channel", + "crossbeam-queue", + "crossbeam-utils", + "dashmap", + "derive_builder", + "derive_more", + "enum-iterator", + "enum_dispatch", + "flate2", + "futures", + "futures-util", + "governor", + "http-body-util", + "hyper 1.4.1", + "hyper-util", + "itertools 0.13.0", + "lru", + "mockall", + "once_cell", + "opentelemetry", + "opentelemetry-otlp", + "opentelemetry-prometheus", + "opentelemetry_sdk", + "parking_lot", + "pid", + "pin-project", + "prometheus", + "prost", + "prost-wkt-types", + "rand", + "reqwest", + "ringbuf", + "rstest", + "rustfsm", + "serde", + "serde_json", + "siphasher", + "slotmap", + "sysinfo", + "tar", + "temporal-client", + "temporal-sdk", + "temporal-sdk-core-api", + "temporal-sdk-core-protos", + "temporal-sdk-core-test-utils", + "thiserror", + "tokio", + "tokio-stream", + "tokio-util", + "tonic 0.11.0", + "tonic-build", + "tracing", + "tracing-subscriber", + "url", + "uuid", + "zip", +] + +[[package]] +name = "temporal-sdk-core-api" +version = "0.1.0" +dependencies = [ + "async-trait", + "derive_builder", + "derive_more", + "opentelemetry", + "prost-types", + "serde_json", + "temporal-sdk-core-protos", + "thiserror", + "tonic 0.11.0", + "tracing-core", + "url", +] + +[[package]] +name = "temporal-sdk-core-protos" +version = "0.1.0" +dependencies = [ + "anyhow", + "base64 0.22.1", + "derive_more", + "prost", + "prost-wkt", + "prost-wkt-build", + "prost-wkt-types", + "rand", + "serde", + "serde_json", + "thiserror", + "tonic 0.11.0", + "tonic-build", + "uuid", +] + +[[package]] +name = "temporal-sdk-core-test-utils" +version = "0.1.0" +dependencies = [ + "anyhow", + "async-trait", + "base64 0.22.1", + "bytes", + "futures", + "log", + "once_cell", + "parking_lot", + "prost", + "prost-types", + "rand", + "rmp-serde", + "serde_json", + "temporal-client", + "temporal-sdk", + "temporal-sdk-core", + "temporal-sdk-core-api", + "temporal-sdk-core-protos", + "thiserror", + "tokio", + "tokio-util", + "tracing", + "url", + "uuid", +] + +[[package]] +name = "temporalio_bridge" +version = "0.1.0" +dependencies = [ + "magnus", + "parking_lot", + "prost", + "rb-sys", + "temporal-client", + "temporal-sdk-core", + "temporal-sdk-core-api", + "temporal-sdk-core-protos", + "tokio", + "tonic 0.11.0", + "url", +] + +[[package]] +name = "termcolor" +version = "1.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "06794f8f6c5c898b3275aebefa6b8a1cb24cd2c6c79397ab15774837a0bc5755" +dependencies = [ + "winapi-util", +] + +[[package]] +name = "termtree" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3369f5ac52d5eb6ab48c6b4ffdc8efbcad6b89c765749064ba298f2c68a16a76" + +[[package]] +name = "thiserror" +version = "1.0.62" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f2675633b1499176c2dff06b0856a27976a8f9d436737b4cf4f312d4d91d8bbb" +dependencies = [ + "thiserror-impl", +] + +[[package]] +name = "thiserror-impl" +version = "1.0.62" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d20468752b09f49e909e55a5d338caa8bedf615594e9d80bc4c565d30faf798c" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "thread_local" +version = "1.1.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8b9ef9bad013ada3808854ceac7b46812a6465ba368859a37e2100283d2d719c" +dependencies = [ + "cfg-if", + "once_cell", +] + +[[package]] +name = "time" +version = "0.3.36" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5dfd88e563464686c916c7e46e623e520ddc6d79fa6641390f2e3fa86e83e885" +dependencies = [ + "deranged", + "num-conv", + "powerfmt", + "serde", + "time-core", +] + +[[package]] +name = "time-core" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ef927ca75afb808a4d64dd374f00a2adf8d0fcff8e7b184af886c3c87ec4a3f3" + +[[package]] +name = "tinytemplate" +version = "1.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "be4d6b5f19ff7664e8c98d03e2139cb510db9b0a60b55f8e8709b689d939b6bc" +dependencies = [ + "serde", + "serde_json", +] + +[[package]] +name = "tinyvec" +version = "1.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "445e881f4f6d382d5f27c034e25eb92edd7c784ceab92a0937db7f2e9471b938" +dependencies = [ + "tinyvec_macros", +] + +[[package]] +name = "tinyvec_macros" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" + +[[package]] +name = "tokio" +version = "1.38.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ba4f4a02a7a80d6f274636f0aa95c7e383b912d41fe721a31f29e29698585a4a" +dependencies = [ + "backtrace", + "bytes", + "libc", + "mio", + "num_cpus", + "parking_lot", + "pin-project-lite", + "signal-hook-registry", + "socket2", + "tokio-macros", + "tracing", + "windows-sys 0.48.0", +] + +[[package]] +name = "tokio-io-timeout" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "30b74022ada614a1b4834de765f9bb43877f910cc8ce4be40e89042c9223a8bf" +dependencies = [ + "pin-project-lite", + "tokio", +] + +[[package]] +name = "tokio-macros" +version = "2.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5f5ae998a069d4b5aba8ee9dad856af7d520c3699e6159b185c2acd48155d39a" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "tokio-rustls" +version = "0.25.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "775e0c0f0adb3a2f22a00c4745d728b479985fc15ee7ca6a2608388c5569860f" +dependencies = [ + "rustls 0.22.4", + "rustls-pki-types", + "tokio", +] + +[[package]] +name = "tokio-rustls" +version = "0.26.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0c7bc40d0e5a97695bb96e27995cd3a08538541b0a846f65bba7a359f36700d4" +dependencies = [ + "rustls 0.23.11", + "rustls-pki-types", + "tokio", +] + +[[package]] +name = "tokio-stream" +version = "0.1.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "267ac89e0bec6e691e5813911606935d77c476ff49024f98abcea3e7b15e37af" +dependencies = [ + "futures-core", + "pin-project-lite", + "tokio", +] + +[[package]] +name = "tokio-util" +version = "0.7.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9cf6b47b3771c49ac75ad09a6162f53ad4b8088b76ac60e8ec1455b31a189fe1" +dependencies = [ + "bytes", + "futures-core", + "futures-sink", + "pin-project-lite", + "tokio", +] + +[[package]] +name = "toml" +version = "0.8.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6f49eb2ab21d2f26bd6db7bf383edc527a7ebaee412d17af4d40fdccd442f335" +dependencies = [ + "serde", + "serde_spanned", + "toml_datetime", + "toml_edit", +] + +[[package]] +name = "toml_datetime" +version = "0.6.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4badfd56924ae69bcc9039335b2e017639ce3f9b001c393c1b2d1ef846ce2cbf" +dependencies = [ + "serde", +] + +[[package]] +name = "toml_edit" +version = "0.22.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d59a3a72298453f564e2b111fa896f8d07fabb36f51f06d7e875fc5e0b5a3ef1" +dependencies = [ + "indexmap 2.2.6", + "serde", + "serde_spanned", + "toml_datetime", + "winnow", +] + +[[package]] +name = "tonic" +version = "0.10.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d560933a0de61cf715926b9cac824d4c883c2c43142f787595e48280c40a1d0e" +dependencies = [ + "async-stream", + "async-trait", + "axum", + "base64 0.21.7", + "bytes", + "h2 0.3.26", + "http 0.2.12", + "http-body 0.4.6", + "hyper 0.14.30", + "hyper-timeout", + "percent-encoding", + "pin-project", + "prost", + "tokio", + "tokio-stream", + "tower", + "tower-layer", + "tower-service", + "tracing", +] + +[[package]] +name = "tonic" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "76c4eb7a4e9ef9d4763600161f12f5070b92a578e1b634db88a6887844c91a13" +dependencies = [ + "async-stream", + "async-trait", + "axum", + "base64 0.21.7", + "bytes", + "h2 0.3.26", + "http 0.2.12", + "http-body 0.4.6", + "hyper 0.14.30", + "hyper-timeout", + "percent-encoding", + "pin-project", + "prost", + "rustls-native-certs", + "rustls-pemfile", + "rustls-pki-types", + "tokio", + "tokio-rustls 0.25.0", + "tokio-stream", + "tower", + "tower-layer", + "tower-service", + "tracing", +] + +[[package]] +name = "tonic-build" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "be4ef6dd70a610078cb4e338a0f79d06bc759ff1b22d2120c2ff02ae264ba9c2" +dependencies = [ + "prettyplease", + "proc-macro2", + "prost-build", + "quote", + "syn", +] + +[[package]] +name = "tower" +version = "0.4.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b8fa9be0de6cf49e536ce1851f987bd21a43b771b09473c3549a6c853db37c1c" +dependencies = [ + "futures-core", + "futures-util", + "indexmap 1.9.3", + "pin-project", + "pin-project-lite", + "rand", + "slab", + "tokio", + "tokio-util", + "tower-layer", + "tower-service", + "tracing", +] + +[[package]] +name = "tower-layer" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c20c8dbed6283a09604c3e69b4b7eeb54e298b8a600d4d5ecb5ad39de609f1d0" + +[[package]] +name = "tower-service" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6bc1c9ce2b5135ac7f93c72918fc37feb872bdc6a5533a8b85eb4b86bfdae52" + +[[package]] +name = "tracing" +version = "0.1.40" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c3523ab5a71916ccf420eebdf5521fcef02141234bbc0b8a49f2fdc4544364ef" +dependencies = [ + "log", + "pin-project-lite", + "tracing-attributes", + "tracing-core", +] + +[[package]] +name = "tracing-attributes" +version = "0.1.27" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "tracing-core" +version = "0.1.32" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c06d3da6113f116aaee68e4d601191614c9053067f9ab7f6edbcb161237daa54" +dependencies = [ + "once_cell", + "valuable", +] + +[[package]] +name = "tracing-log" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ee855f1f400bd0e5c02d150ae5de3840039a3f54b025156404e34c23c03f47c3" +dependencies = [ + "log", + "once_cell", + "tracing-core", +] + +[[package]] +name = "tracing-subscriber" +version = "0.3.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ad0f048c97dbd9faa9b7df56362b8ebcaa52adb06b498c050d2f4e32f90a7a8b" +dependencies = [ + "matchers", + "nu-ansi-term", + "once_cell", + "parking_lot", + "regex", + "sharded-slab", + "smallvec", + "thread_local", + "tracing", + "tracing-core", + "tracing-log", +] + +[[package]] +name = "try-lock" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e421abadd41a4225275504ea4d6566923418b7f05506fbc9c0fe86ba7396114b" + +[[package]] +name = "trybuild" +version = "1.0.97" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5b1e5645f2ee8025c2f1d75e1138f2dd034d74e6ba54620f3c569ba2a2a1ea06" +dependencies = [ + "dissimilar", + "glob", + "serde", + "serde_derive", + "serde_json", + "termcolor", + "toml", +] + +[[package]] +name = "typeid" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "059d83cc991e7a42fc37bd50941885db0888e34209f8cfd9aab07ddec03bc9cf" + +[[package]] +name = "typenum" +version = "1.17.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "42ff0bf0c66b8238c6f3b578df37d0b7848e55df8577b3f74f92a69acceeb825" + +[[package]] +name = "typetag" +version = "0.2.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "661d18414ec032a49ece2d56eee03636e43c4e8d577047ab334c0ba892e29aaf" +dependencies = [ + "erased-serde", + "inventory", + "once_cell", + "serde", + "typetag-impl", +] + +[[package]] +name = "typetag-impl" +version = "0.2.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ac73887f47b9312552aa90ef477927ff014d63d1920ca8037c6c1951eab64bb1" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "unicode-bidi" +version = "0.3.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "08f95100a766bf4f8f28f90d77e0a5461bbdb219042e7679bebe79004fed8d75" + +[[package]] +name = "unicode-ident" +version = "1.0.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b" + +[[package]] +name = "unicode-normalization" +version = "0.1.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a56d1686db2308d901306f92a263857ef59ea39678a5458e7cb17f01415101f5" +dependencies = [ + "tinyvec", +] + +[[package]] +name = "untrusted" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8ecb6da28b8a351d773b68d5825ac39017e680750f980f3a1a85cd8dd28a47c1" + +[[package]] +name = "url" +version = "2.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "22784dbdf76fdde8af1aeda5622b546b422b6fc585325248a2bf9f5e41e94d6c" +dependencies = [ + "form_urlencoded", + "idna", + "percent-encoding", +] + +[[package]] +name = "utf8parse" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "06abde3611657adf66d383f00b093d7faecc7fa57071cce2578660c9f1010821" + +[[package]] +name = "uuid" +version = "1.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "81dfa00651efa65069b0b6b651f4aaa31ba9e3c3ce0137aaad053604ee7e0314" +dependencies = [ + "getrandom", +] + +[[package]] +name = "valuable" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "830b7e5d4d90034032940e4ace0d9a9a057e7a45cd94e6c007832e39edb82f6d" + +[[package]] +name = "version_check" +version = "0.9.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" + +[[package]] +name = "walkdir" +version = "2.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "29790946404f91d9c5d06f9874efddea1dc06c5efe94541a7d6863108e3a5e4b" +dependencies = [ + "same-file", + "winapi-util", +] + +[[package]] +name = "want" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bfa7760aed19e106de2c7c0b581b509f2f25d3dacaf737cb82ac61bc6d760b0e" +dependencies = [ + "try-lock", +] + +[[package]] +name = "wasi" +version = "0.11.0+wasi-snapshot-preview1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" + +[[package]] +name = "wasm-bindgen" +version = "0.2.92" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4be2531df63900aeb2bca0daaaddec08491ee64ceecbee5076636a3b026795a8" +dependencies = [ + "cfg-if", + "wasm-bindgen-macro", +] + +[[package]] +name = "wasm-bindgen-backend" +version = "0.2.92" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "614d787b966d3989fa7bb98a654e369c762374fd3213d212cfc0251257e747da" +dependencies = [ + "bumpalo", + "log", + "once_cell", + "proc-macro2", + "quote", + "syn", + "wasm-bindgen-shared", +] + +[[package]] +name = "wasm-bindgen-futures" +version = "0.4.42" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "76bc14366121efc8dbb487ab05bcc9d346b3b5ec0eaa76e46594cabbe51762c0" +dependencies = [ + "cfg-if", + "js-sys", + "wasm-bindgen", + "web-sys", +] + +[[package]] +name = "wasm-bindgen-macro" +version = "0.2.92" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a1f8823de937b71b9460c0c34e25f3da88250760bec0ebac694b49997550d726" +dependencies = [ + "quote", + "wasm-bindgen-macro-support", +] + +[[package]] +name = "wasm-bindgen-macro-support" +version = "0.2.92" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e94f17b526d0a461a191c78ea52bbce64071ed5c04c9ffe424dcb38f74171bb7" +dependencies = [ + "proc-macro2", + "quote", + "syn", + "wasm-bindgen-backend", + "wasm-bindgen-shared", +] + +[[package]] +name = "wasm-bindgen-shared" +version = "0.2.92" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "af190c94f2773fdb3729c55b007a722abb5384da03bc0986df4c289bf5567e96" + +[[package]] +name = "wasm-streams" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b65dc4c90b63b118468cf747d8bf3566c1913ef60be765b5730ead9e0a3ba129" +dependencies = [ + "futures-util", + "js-sys", + "wasm-bindgen", + "wasm-bindgen-futures", + "web-sys", +] + +[[package]] +name = "web-sys" +version = "0.3.69" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "77afa9a11836342370f4817622a2f0f418b134426d91a82dfb48f532d2ec13ef" +dependencies = [ + "js-sys", + "wasm-bindgen", +] + +[[package]] +name = "webpki-roots" +version = "0.26.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bd7c23921eeb1713a4e851530e9b9756e4fb0e89978582942612524cf09f01cd" +dependencies = [ + "rustls-pki-types", +] + +[[package]] +name = "winapi" +version = "0.3.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419" +dependencies = [ + "winapi-i686-pc-windows-gnu", + "winapi-x86_64-pc-windows-gnu", +] + +[[package]] +name = "winapi-i686-pc-windows-gnu" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" + +[[package]] +name = "winapi-util" +version = "0.1.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4d4cc384e1e73b93bafa6fb4f1df8c41695c8a91cf9c4c64358067d15a7b6c6b" +dependencies = [ + "windows-sys 0.52.0", +] + +[[package]] +name = "winapi-x86_64-pc-windows-gnu" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" + +[[package]] +name = "windows" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e48a53791691ab099e5e2ad123536d0fff50652600abaf43bbf952894110d0be" +dependencies = [ + "windows-core", + "windows-targets 0.52.6", +] + +[[package]] +name = "windows-core" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "33ab640c8d7e35bf8ba19b884ba838ceb4fba93a4e8c65a9059d08afcfc683d9" +dependencies = [ + "windows-targets 0.52.6", +] + +[[package]] +name = "windows-sys" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9" +dependencies = [ + "windows-targets 0.48.5", +] + +[[package]] +name = "windows-sys" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" +dependencies = [ + "windows-targets 0.52.6", +] + +[[package]] +name = "windows-targets" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9a2fa6e2155d7247be68c096456083145c183cbbbc2764150dda45a87197940c" +dependencies = [ + "windows_aarch64_gnullvm 0.48.5", + "windows_aarch64_msvc 0.48.5", + "windows_i686_gnu 0.48.5", + "windows_i686_msvc 0.48.5", + "windows_x86_64_gnu 0.48.5", + "windows_x86_64_gnullvm 0.48.5", + "windows_x86_64_msvc 0.48.5", +] + +[[package]] +name = "windows-targets" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973" +dependencies = [ + "windows_aarch64_gnullvm 0.52.6", + "windows_aarch64_msvc 0.52.6", + "windows_i686_gnu 0.52.6", + "windows_i686_gnullvm", + "windows_i686_msvc 0.52.6", + "windows_x86_64_gnu 0.52.6", + "windows_x86_64_gnullvm 0.52.6", + "windows_x86_64_msvc 0.52.6", +] + +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8" + +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3" + +[[package]] +name = "windows_aarch64_msvc" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc" + +[[package]] +name = "windows_aarch64_msvc" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469" + +[[package]] +name = "windows_i686_gnu" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e" + +[[package]] +name = "windows_i686_gnu" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b" + +[[package]] +name = "windows_i686_gnullvm" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66" + +[[package]] +name = "windows_i686_msvc" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406" + +[[package]] +name = "windows_i686_msvc" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66" + +[[package]] +name = "windows_x86_64_gnu" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e" + +[[package]] +name = "windows_x86_64_gnu" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78" + +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc" + +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d" + +[[package]] +name = "windows_x86_64_msvc" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" + +[[package]] +name = "windows_x86_64_msvc" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" + +[[package]] +name = "winnow" +version = "0.6.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "59b5e5f6c299a3c7890b876a2a587f3115162487e704907d9b6cd29473052ba1" +dependencies = [ + "memchr", +] + +[[package]] +name = "winreg" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a277a57398d4bfa075df44f501a17cfdf8542d224f0d36095a2adc7aee4ef0a5" +dependencies = [ + "cfg-if", + "windows-sys 0.48.0", +] + +[[package]] +name = "xattr" +version = "1.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8da84f1a25939b27f6820d92aed108f83ff920fdf11a7b19366c27c4cda81d4f" +dependencies = [ + "libc", + "linux-raw-sys", + "rustix", +] + +[[package]] +name = "zerocopy" +version = "0.7.35" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1b9b4fd18abc82b8136838da5d50bae7bdea537c574d8dc1a34ed098d6c166f0" +dependencies = [ + "zerocopy-derive", +] + +[[package]] +name = "zerocopy-derive" +version = "0.7.35" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fa4f8080344d4671fb4e831a13ad1e68092748387dfc4f55e356242fae12ce3e" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "zeroize" +version = "1.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ced3678a2879b30306d323f4542626697a464a97c0a07c9aebf7ebca65cd4dde" +dependencies = [ + "zeroize_derive", +] + +[[package]] +name = "zeroize_derive" +version = "1.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "zip" +version = "2.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "775a2b471036342aa69bc5a602bc889cb0a06cda00477d0c69566757d5553d39" +dependencies = [ + "aes", + "arbitrary", + "bzip2", + "constant_time_eq", + "crc32fast", + "crossbeam-utils", + "deflate64", + "displaydoc", + "flate2", + "hmac", + "indexmap 2.2.6", + "lzma-rs", + "memchr", + "pbkdf2", + "rand", + "sha1", + "thiserror", + "time", + "zeroize", + "zopfli", + "zstd", +] + +[[package]] +name = "zopfli" +version = "0.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e5019f391bac5cf252e93bbcc53d039ffd62c7bfb7c150414d61369afe57e946" +dependencies = [ + "bumpalo", + "crc32fast", + "lockfree-object-pool", + "log", + "once_cell", + "simd-adler32", +] + +[[package]] +name = "zstd" +version = "0.13.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fcf2b778a664581e31e389454a7072dab1647606d44f7feea22cd5abb9c9f3f9" +dependencies = [ + "zstd-safe", +] + +[[package]] +name = "zstd-safe" +version = "7.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fa556e971e7b568dc775c136fc9de8c779b1c2fc3a63defaafadffdbd3181afa" +dependencies = [ + "zstd-sys", +] + +[[package]] +name = "zstd-sys" +version = "2.0.12+zstd.1.5.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0a4e40c320c3cb459d9a9ff6de98cff88f4751ee9275d140e2be94a2b74e4c13" +dependencies = [ + "cc", + "pkg-config", +] diff --git a/temporalio/Cargo.toml b/temporalio/Cargo.toml new file mode 100644 index 00000000..c2195b8f --- /dev/null +++ b/temporalio/Cargo.toml @@ -0,0 +1,20 @@ +[workspace] +members = ["./ext"] +resolver = "2" + +[workspace.package] +license = "MIT" +license-file = "LICENSE" + +[workspace.dependencies] +derive_builder = "0.20" +derive_more = { version = "0.99", default-features = false, features = ["constructor", "display", "from", "into"] } +once_cell = "1.16" +tonic = "0.11" +tonic-build = "0.11" +opentelemetry = "0.23" +prost = "0.12" +prost-types = "0.12" + +[workspace.lints.rust] +unreachable_pub = "warn" \ No newline at end of file diff --git a/temporalio/Gemfile b/temporalio/Gemfile new file mode 100644 index 00000000..7f4f5e95 --- /dev/null +++ b/temporalio/Gemfile @@ -0,0 +1,5 @@ +# frozen_string_literal: true + +source 'https://rubygems.org' + +gemspec diff --git a/temporalio/Rakefile b/temporalio/Rakefile new file mode 100644 index 00000000..ef145f75 --- /dev/null +++ b/temporalio/Rakefile @@ -0,0 +1,107 @@ +# frozen_string_literal: true + +require 'bundler/gem_tasks' +require 'rb_sys/cargo/metadata' +require 'rb_sys/extensiontask' + +task build: :compile + +GEMSPEC = Gem::Specification.load('temporalio.gemspec') + +RbSys::ExtensionTask.new('temporalio_bridge', GEMSPEC) do |ext| + ext.lib_dir = 'lib/temporalio' +end + +require 'rake/testtask' + +Rake::TestTask.new(:test) do |t| + t.warning = false + t.libs << 'test' + t.libs << 'lib' + t.test_files = FileList['test/**/*_test.rb'] +end + +require 'rubocop/rake_task' + +RuboCop::RakeTask.new + +require 'steep/rake_task' + +Steep::RakeTask.new + +require 'yard' + +YARD::Rake::YardocTask.new + +require 'fileutils' + +namespace :proto do + desc 'Generate API and Core protobufs' + task :generate do + # Remove all existing + FileUtils.rm_rf('lib/temporalio/api') + + # Collect set of API protos with Google ones removed + api_protos = Dir.glob('ext/sdk-core/sdk-core-protos/protos/api_upstream/**/*.proto').reject do |proto| + proto.include?('google') + end + + # Generate API to temp dir and move + FileUtils.rm_rf('tmp-proto') + FileUtils.mkdir_p('tmp-proto') + sh 'bundle exec grpc_tools_ruby_protoc ' \ + '--proto_path=ext/sdk-core/sdk-core-protos/protos/api_upstream ' \ + '--ruby_out=tmp-proto ' \ + "#{api_protos.join(' ')}" + + # Walk all generated Ruby files and cleanup content and filename + Dir.glob('tmp-proto/temporal/api/**/*.rb') do |path| + # Fix up the import + content = File.read(path) + content.gsub!(%r{^require 'temporal/(.*)_pb'$}, "require 'temporalio/\\1'") + File.write(path, content) + + # Remove _pb from the filename + FileUtils.mv(path, path.sub('_pb', '')) + end + + # Move from temp dir and remove temp dir + FileUtils.mv('tmp-proto/temporal/api', 'lib/temporalio') + FileUtils.rm_rf('tmp-proto') + + # Write files that will help with imports. We are requiring the + # request_response and not the service because the service depends on Google + # API annotations we don't want to have to depend on. + string_lit = "# frozen_string_literal: true\n\n" + File.write( + 'lib/temporalio/api/workflowservice.rb', + "#{string_lit}require 'temporalio/api/workflowservice/v1/request_response'\n" + ) + File.write( + 'lib/temporalio/api/operatorservice.rb', + "#{string_lit}require 'temporalio/api/operatorservice/v1/request_response'\n" + ) + File.write( + 'lib/temporalio/api.rb', + "#{string_lit}require 'temporalio/api/operatorservice'\nrequire 'temporalio/api/workflowservice'\n" + ) + end +end + +namespace :rbs do + desc 'RBS tasks' + task :install_collection do + sh 'rbs collection install' + end +end + +# We have to copy some parent files to this dir for gem +task :copy_parent_files do + cp '../LICENSE', 'LICENSE' + cp '../README.md', 'README.md' +end +Rake::Task[:build].enhance([:copy_parent_files]) do + rm ['LICENSE', 'README.md'] +end + +task default: [:rubocop, 'rbs:install_collection', :steep, :compile, :test] diff --git a/temporalio/Steepfile b/temporalio/Steepfile new file mode 100644 index 00000000..d1a1a09d --- /dev/null +++ b/temporalio/Steepfile @@ -0,0 +1,18 @@ +# frozen_string_literal: true + +D = Steep::Diagnostic + +target :lib do + signature 'sig', 'test/sig' + + check 'lib', 'test' + + ignore 'lib/temporalio/api' + + library 'uri' + + configure_code_diagnostics do |hash| + hash[D::Ruby::UnknownConstant] = :information + hash[D::Ruby::NoMethod] = :information + end +end diff --git a/temporalio/ext/Cargo.toml b/temporalio/ext/Cargo.toml new file mode 100644 index 00000000..3fd41b0f --- /dev/null +++ b/temporalio/ext/Cargo.toml @@ -0,0 +1,23 @@ +[package] +name = "temporalio_bridge" +version = "0.1.0" +edition = "2021" +authors = ["Chad Retz "] +license = "MIT" +publish = false + +[lib] +crate-type = ["cdylib"] + +[dependencies] +magnus = "0.7" +parking_lot = "0.12" +prost = "0.12" +rb-sys = "0.9" +temporal-client = { version = "0.1.0", path = "./sdk-core/client" } +temporal-sdk-core = { version = "0.1.0", path = "./sdk-core/core", features = ["ephemeral-server"] } +temporal-sdk-core-api = { version = "0.1.0", path = "./sdk-core/core-api" } +temporal-sdk-core-protos = { version = "0.1.0", path = "./sdk-core/sdk-core-protos" } +tokio = "1.26" +tonic = "0.11" +url = "2.2" diff --git a/temporalio/ext/extconf.rb b/temporalio/ext/extconf.rb new file mode 100644 index 00000000..bbb08ff4 --- /dev/null +++ b/temporalio/ext/extconf.rb @@ -0,0 +1,6 @@ +# frozen_string_literal: true + +require 'mkmf' +require 'rb_sys/mkmf' + +create_rust_makefile('temporalio/temporalio_bridge') diff --git a/temporalio/ext/src/client.rs b/temporalio/ext/src/client.rs new file mode 100644 index 00000000..1d31b8d2 --- /dev/null +++ b/temporalio/ext/src/client.rs @@ -0,0 +1,314 @@ +use std::{collections::HashMap, future::Future, time::Duration}; + +use temporal_client::{ + ClientInitError, ClientKeepAliveConfig, ClientOptionsBuilder, ClientTlsConfig, + ConfiguredClient, HttpConnectProxyOptions, RetryClient, RetryConfig, + TemporalServiceClientWithMetrics, TlsConfig, WorkflowService, +}; + +use magnus::{ + block::Proc, class, function, method, prelude::*, scan_args, value::Opaque, DataTypeFunctions, + Error, RString, Ruby, TypedData, Value, +}; +use tonic::{metadata::MetadataKey, Status}; +use url::Url; + +use super::{error, new_error, ROOT_MOD}; +use crate::{ + runtime::{Runtime, RuntimeHandle}, + util::Struct, +}; +use std::str::FromStr; + +const SERVICE_WORKFLOW: u8 = 1; +const SERVICE_OPERATOR: u8 = 2; +const SERVICE_CLOUD: u8 = 3; +const SERVICE_TEST: u8 = 4; +const SERVICE_HEALTH: u8 = 5; + +pub fn init(ruby: &Ruby) -> Result<(), Error> { + let root_mod = ruby.get_inner(&ROOT_MOD); + + let class = root_mod.define_class("Client", class::object())?; + class.const_set("SERVICE_WORKFLOW", SERVICE_WORKFLOW)?; + class.const_set("SERVICE_OPERATOR", SERVICE_OPERATOR)?; + class.const_set("SERVICE_CLOUD", SERVICE_CLOUD)?; + class.const_set("SERVICE_TEST", SERVICE_TEST)?; + class.const_set("SERVICE_HEALTH", SERVICE_HEALTH)?; + class.define_singleton_method("async_new", function!(Client::async_new, 2))?; + class.define_method("async_invoke_rpc", method!(Client::async_invoke_rpc, -1))?; + + let inner_class = class.define_class("RpcFailure", class::object())?; + inner_class.define_method("code", method!(RpcFailure::code, 0))?; + inner_class.define_method("message", method!(RpcFailure::message, 0))?; + inner_class.define_method("details", method!(RpcFailure::details, 0))?; + Ok(()) +} + +type CoreClient = RetryClient>; + +#[derive(DataTypeFunctions, TypedData)] +#[magnus(class = "Temporalio::Internal::Bridge::Client", free_immediately)] +pub struct Client { + pub(crate) core: CoreClient, + runtime_handle: RuntimeHandle, +} + +macro_rules! rpc_call { + ($client:ident, $block:ident, $call:ident, $call_name:ident) => {{ + if $call.retry { + let mut core_client = $client.core.clone(); + let req = $call.into_request()?; + rpc_resp( + $client, + $block, + async move { core_client.$call_name(req).await }, + ) + } else { + let mut core_client = $client.core.clone().into_inner(); + let req = $call.into_request()?; + rpc_resp( + $client, + $block, + async move { core_client.$call_name(req).await }, + ) + } + }}; +} + +impl Client { + pub fn async_new(ruby: &Ruby, runtime: &Runtime, options: Struct) -> Result<(), Error> { + // Build options + let mut opts_build = ClientOptionsBuilder::default(); + opts_build + .target_url( + Url::parse(format!("http://{}", options.aref::("target_host")?).as_str()) + .map_err(|err| error!("Failed parsing host: {}", err))?, + ) + .client_name(options.aref::("client_name")?) + .client_version(options.aref::("client_version")?) + .headers(Some(options.aref("rpc_metadata")?)) + .api_key(options.aref("api_key")?) + .identity(options.aref("identity")?); + if let Some(tls) = options.child("tls")? { + opts_build.tls_cfg(TlsConfig { + client_tls_config: match ( + tls.aref::>("client_cert")?, + tls.aref::>("client_private_key")?, + ) { + (None, None) => None, + (Some(client_cert), Some(client_private_key)) => Some(ClientTlsConfig { + // These are unsafe because of lifetime issues, but we copy right away + client_cert: unsafe { client_cert.as_slice().to_vec() }, + client_private_key: unsafe { client_private_key.as_slice().to_vec() }, + }), + _ => { + return Err(error!( + "Must have both client cert and private key or neither" + )) + } + }, + server_root_ca_cert: tls + .aref::>("server_root_ca_cert")? + .map(|rstr| unsafe { rstr.as_slice().to_vec() }), + domain: tls.aref("domain")?, + }); + } + let rpc_retry = options + .child("rpc_retry")? + .ok_or_else(|| error!("Missing rpc_retry"))?; + opts_build.retry_config(RetryConfig { + initial_interval: Duration::from_millis(rpc_retry.aref("initial_interval_ms")?), + randomization_factor: rpc_retry.aref("randomization_factor")?, + multiplier: rpc_retry.aref("multiplier")?, + max_interval: Duration::from_millis(rpc_retry.aref("max_interval_ms")?), + max_elapsed_time: match rpc_retry.aref::("max_elapsed_time_ms")? { + // 0 means none + 0 => None, + val => Some(Duration::from_millis(val)), + }, + max_retries: rpc_retry.aref("max_retries")?, + }); + if let Some(keep_alive) = options.child("keep_alive")? { + opts_build.keep_alive(Some(ClientKeepAliveConfig { + interval: Duration::from_millis(keep_alive.aref("interval_ms")?), + timeout: Duration::from_millis(keep_alive.aref("timeout_ms")?), + })); + } + if let Some(proxy) = options.child("http_connect_proxy")? { + opts_build.http_connect_proxy(Some(HttpConnectProxyOptions { + target_addr: proxy.aref("target_host")?, + basic_auth: match ( + proxy.aref::>("basic_auth_user")?, + proxy.aref::>("basic_auth_user")?, + ) { + (None, None) => None, + (Some(user), Some(pass)) => Some((user, pass)), + _ => return Err(error!("Must have both basic auth and pass or neither")), + }, + })); + } + let opts = opts_build + .build() + .map_err(|err| error!("Invalid client options: {}", err))?; + + // Create client + let block = Opaque::from(ruby.block_proc()?); + let core_runtime = runtime.handle.core.clone(); + let runtime_handle = runtime.handle.clone(); + runtime.handle.spawn( + async move { + let core = opts + .connect_no_namespace(core_runtime.telemetry().get_temporal_metric_meter()) + .await?; + Ok(core) + }, + move |ruby, result: Result| { + let block = ruby.get_inner(block); + match result { + Ok(core) => { + let _: Value = block + .call((Client { + core, + runtime_handle, + },)) + .expect("Block call failed"); + } + Err(err) => { + let _: Value = block + .call((new_error!("Failed client connect: {}", err),)) + .expect("Block call failed"); + } + }; + }, + ); + Ok(()) + } + + pub fn async_invoke_rpc(&self, args: &[Value]) -> Result<(), Error> { + let args = scan_args::scan_args::<(), (), (), (), _, Proc>(args)?; + let (service, rpc, request, retry, metadata, timeout_ms) = scan_args::get_kwargs::< + _, + (u8, String, RString, bool, HashMap, u64), + (), + (), + >( + args.keywords, + &[ + "service", + "rpc", + "request", + "rpc_retry", + "rpc_metadata", + "rpc_timeout_ms", + ], + &[], + )? + .required; + let call = RpcCall { + rpc, + request: unsafe { request.as_slice() }, + retry, + metadata, + timeout_ms, + }; + let block = Opaque::from(args.block); + match service { + SERVICE_WORKFLOW => match call.rpc.as_str() { + "get_workflow_execution_history" => { + rpc_call!(self, block, call, get_workflow_execution_history) + } + "start_workflow_execution" => { + rpc_call!(self, block, call, start_workflow_execution) + } + _ => Err(error!("Unknown RPC call {}", call.rpc)), + }, + _ => Err(error!("Unknown service")), + } + } +} + +#[derive(DataTypeFunctions, TypedData)] +#[magnus( + class = "Temporalio::Internal::Bridge::Client::RpcFailure", + free_immediately +)] +pub struct RpcFailure { + status: Status, +} + +impl RpcFailure { + pub fn code(&self) -> u32 { + self.status.code() as u32 + } + + pub fn message(&self) -> &str { + self.status.message() + } + + pub fn details(&self) -> Option { + if self.status.details().len() == 0 { + None + } else { + Some(RString::from_slice(self.status.details())) + } + } +} + +struct RpcCall<'a> { + rpc: String, + request: &'a [u8], + retry: bool, + metadata: HashMap, + timeout_ms: u64, +} + +impl RpcCall<'_> { + fn into_request(self) -> Result, Error> { + let proto = P::decode(self.request).map_err(|err| error!("Invalid proto: {}", err))?; + let mut req = tonic::Request::new(proto); + for (k, v) in self.metadata { + req.metadata_mut().insert( + MetadataKey::from_str(k.as_str()) + .map_err(|err| error!("Invalid metadata key: {}", err))?, + v.parse() + .map_err(|err| error!("Invalid metadata value: {}", err))?, + ); + } + if self.timeout_ms > 0 { + req.set_timeout(Duration::from_millis(self.timeout_ms)); + } + Ok(req) + } +} + +fn rpc_resp

( + client: &Client, + block: Opaque, + fut: impl Future, tonic::Status>> + Send + 'static, +) -> Result<(), Error> +where + P: prost::Message, + P: Default, +{ + client.runtime_handle.spawn( + async move { fut.await.map(|msg| msg.get_ref().encode_to_vec()) }, + move |ruby, result| { + let block = ruby.get_inner(block); + match result { + Ok(val) => { + // TODO(cretz): Any reasonable way to prevent byte copy? + let _: Value = block + .call((RString::from_slice(&val),)) + .expect("Block call failed"); + } + Err(status) => { + let _: Value = block + .call((RpcFailure { status },)) + .expect("Block call failed"); + } + }; + }, + ); + Ok(()) +} diff --git a/temporalio/ext/src/lib.rs b/temporalio/ext/src/lib.rs new file mode 100644 index 00000000..3a3162ec --- /dev/null +++ b/temporalio/ext/src/lib.rs @@ -0,0 +1,46 @@ +use magnus::{prelude::*, value::Lazy, Error, ExceptionClass, RModule, Ruby}; + +mod client; +mod runtime; +mod testing; +mod util; + +pub static ROOT_MOD: Lazy = Lazy::new(|ruby| { + ruby.define_module("Temporalio") + .expect("Module definition failed") + .define_module("Internal") + .expect("Module definition failed") + .define_module("Bridge") + .expect("Module definition failed") +}); + +pub static ROOT_ERR: Lazy = Lazy::new(|ruby| { + ruby.get_inner(&ROOT_MOD) + .define_error("Error", ruby.exception_standard_error()) + .expect("Error definition failed") +}); + +#[macro_export] +macro_rules! error { + ($($arg:expr),*) => { + Error::new(Ruby::get().expect("Not in Ruby thread").get_inner(&$crate::ROOT_ERR), format!($($arg),*)) + }; +} + +#[macro_export] +macro_rules! new_error { + ($($arg:expr),*) => { + Ruby::get().expect("Not in Ruby thread").get_inner(&$crate::ROOT_ERR).new_instance((format!($($arg),*),)).expect("Cannot create exception") + }; +} + +#[magnus::init] +fn init(ruby: &Ruby) -> Result<(), Error> { + Lazy::force(&ROOT_ERR, ruby); + + client::init(ruby)?; + runtime::init(ruby)?; + testing::init(ruby)?; + + Ok(()) +} diff --git a/temporalio/ext/src/runtime.rs b/temporalio/ext/src/runtime.rs new file mode 100644 index 00000000..2ca8d3b4 --- /dev/null +++ b/temporalio/ext/src/runtime.rs @@ -0,0 +1,204 @@ +use super::{error, ROOT_MOD}; +use crate::util::{without_gvl, Struct}; +use magnus::{ + class, function, method, prelude::*, DataTypeFunctions, Error, Ruby, TypedData, Value, +}; +use std::collections::HashMap; +use std::net::SocketAddr; +use std::str::FromStr; +use std::sync::mpsc::{channel, Receiver, Sender}; +use std::time::Duration; +use std::{future::Future, sync::Arc}; +use temporal_sdk_core::telemetry::{build_otlp_metric_exporter, start_prometheus_metric_exporter}; +use temporal_sdk_core::CoreRuntime; +use temporal_sdk_core_api::telemetry::{ + Logger, MetricTemporality, OtelCollectorOptionsBuilder, PrometheusExporterOptionsBuilder, + TelemetryOptionsBuilder, +}; +use url::Url; + +pub fn init(ruby: &Ruby) -> Result<(), Error> { + let class = ruby + .get_inner(&ROOT_MOD) + .define_class("Runtime", class::object())?; + class.define_singleton_method("new", function!(Runtime::new, 1))?; + class.define_method("run_command_loop", method!(Runtime::run_command_loop, 0))?; + Ok(()) +} + +#[derive(DataTypeFunctions, TypedData)] +#[magnus(class = "Temporalio::Internal::Bridge::Runtime", free_immediately)] +pub struct Runtime { + /// Separate cloneable handle that can be reference in other Rust objects. + pub(crate) handle: RuntimeHandle, + async_command_rx: Receiver, +} + +#[derive(Clone)] +pub(crate) struct RuntimeHandle { + pub(crate) core: Arc, + async_command_tx: Sender, +} + +type Callback = Box; + +enum AsyncCommand { + RunCallback(Callback), + Shutdown, +} + +impl Runtime { + pub fn new(options: Struct) -> Result { + // Build options + let mut opts_build = TelemetryOptionsBuilder::default(); + let telemetry = options + .child("telemetry")? + .ok_or_else(|| error!("Missing telemetry options"))?; + if let Some(logging) = telemetry.child("logging")? { + opts_build.logging( + if let Some(_forward_to) = logging.aref::>("forward_to")? { + // TODO(cretz): This + return Err(error!("Forwarding not yet supported")); + } else { + Logger::Console { + filter: logging.aref("log_filter")?, + } + }, + ); + } + // Set some metrics options now, but the metrics instance is late-bound + // after CoreRuntime created since it needs Tokio runtime + if let Some(metrics) = telemetry.child("metrics")? { + opts_build.attach_service_name(metrics.aref("attach_service_name")?); + if let Some(prefix) = metrics.aref::>("metric_prefix")? { + opts_build.metric_prefix(prefix); + } + } + let opts = opts_build + .build() + .map_err(|err| error!("Invalid telemetry options: {}", err))?; + + // Create core runtime + let mut core = CoreRuntime::new(opts, tokio::runtime::Builder::new_multi_thread()) + .map_err(|err| error!("Failed initializing telemetry: {}", err))?; + + // Create metrics (created after Core runtime since it needs Tokio handle) + if let Some(metrics) = telemetry.child("metrics")? { + let _guard = core.tokio_handle().enter(); + match (metrics.child("opentelemetry")?, metrics.child("prometheus")?, metrics.child("buffered_with_size")?) { + // Build OTel + (Some(opentelemetry), None, None) => { + let mut opts_build = OtelCollectorOptionsBuilder::default(); + opts_build.url( + Url::parse(&opentelemetry.aref::("url")?).map_err(|err| { + error!("Invalid OTel URL: {}", err) + })?). + use_seconds_for_durations(opentelemetry.aref("durations_as_seconds")?); + if let Some(headers) = opentelemetry.aref::>>("headers")? { + opts_build.headers(headers); + } + if let Some(period) = opentelemetry.aref::>("metric_periodicity_ms")? { + opts_build.metric_periodicity(Duration::from_millis(period)); + } + if opentelemetry.aref::("metric_temporality_delta")? { + opts_build.metric_temporality(MetricTemporality::Delta); + } + if let Some(global_tags) = metrics.aref::>>("global_tags")? { + opts_build.global_tags(global_tags); + } + let opts = opts_build + .build() + .map_err(|err| error!("Invalid OpenTelemetry options: {}", err))?; + core.telemetry_mut().attach_late_init_metrics(Arc::new(build_otlp_metric_exporter(opts).map_err( + |err| error!("Failed building OpenTelemetry exporter: {}", err), + )?)); + }, + (None, Some(prom), None) => { + let mut opts_build = PrometheusExporterOptionsBuilder::default(); + opts_build + .socket_addr( + SocketAddr::from_str(&prom.aref::("bind_address")?).map_err(|err| { + error!("Invalid Prometheus address: {}", err) + })?, + ) + .counters_total_suffix(prom.aref("counters_total_suffix")?) + .unit_suffix(prom.aref("unit_suffix")?) + .use_seconds_for_durations(prom.aref("durations_as_seconds")?); + if let Some(global_tags) = metrics.aref::>>("global_tags")? { + opts_build.global_tags(global_tags); + } + let opts = opts_build + .build() + .map_err(|err| error!("Invalid Prometheus options: {}", err))?; + core.telemetry_mut().attach_late_init_metrics(start_prometheus_metric_exporter(opts).map_err( + |err| error!("Failed building starting Prometheus exporter: {}", err), + )?.meter); + }, + // TODO(cretz): Metric buffering + (None, None, Some(_buffer_size)) => return Err(error!("Metric buffering not yet supported")), + _ => return Err(error!("One and only one of opentelemetry, prometheus, or buffered_with_size must be set")) + }; + } + + // Create Ruby runtime + let (async_command_tx, async_command_rx): (Sender, Receiver) = + channel(); + Ok(Self { + handle: RuntimeHandle { + core: Arc::new(core), + async_command_tx, + }, + async_command_rx, + }) + } + + pub fn run_command_loop(&self) { + loop { + let cmd = without_gvl( + || self.async_command_rx.recv(), + || { + // Ignore fail since we don't properly catch panics in + // without_gvl right now + let _ = self.handle.async_command_tx.send(AsyncCommand::Shutdown); + }, + ); + if let Ok(AsyncCommand::RunCallback(callback)) = cmd { + // TODO(cretz): Can we trust that this call is cheap? + // TODO(cretz): Catch and unwind here? + callback(); + } else { + // We break on all errors/shutdown + break; + } + } + } +} + +impl RuntimeHandle { + /// Spawn the given future in Tokio and then, upon complete, call the given + /// function inside a Ruby thread. The callback inside the Ruby thread must + /// be cheap because it is one shared Ruby thread for everything. Therefore + /// it should be something like a queue push or a fiber scheduling. + pub(crate) fn spawn( + &self, + without_gvl: impl Future + Send + 'static, + with_gvl: F, + ) where + F: FnOnce(Ruby, T) + Send + 'static, + T: Send + 'static, + { + let async_command_tx = self.async_command_tx.clone(); + self.core.tokio_handle().spawn(async move { + let val = without_gvl.await; + // Ignore fail to send in rare case that the runtime/handle is + // dropped before this Tokio future runs + let _ = async_command_tx + .clone() + .send(AsyncCommand::RunCallback(Box::new(move || { + if let Ok(ruby) = Ruby::get() { + with_gvl(ruby, val); + } + }))); + }); + } +} diff --git a/temporalio/ext/src/testing.rs b/temporalio/ext/src/testing.rs new file mode 100644 index 00000000..d70e793e --- /dev/null +++ b/temporalio/ext/src/testing.rs @@ -0,0 +1,138 @@ +use magnus::{ + class, function, method, prelude::*, value::Opaque, DataTypeFunctions, Error, Ruby, TypedData, + Value, +}; +use parking_lot::Mutex; +use temporal_sdk_core::ephemeral_server::{ + self, EphemeralExe, EphemeralExeVersion, TemporalDevServerConfigBuilder, +}; + +use crate::{ + error, new_error, + runtime::{Runtime, RuntimeHandle}, + util::Struct, + ROOT_MOD, +}; + +pub fn init(ruby: &Ruby) -> Result<(), Error> { + let root_mod = ruby.get_inner(&ROOT_MOD); + + let module = root_mod.define_module("Testing")?; + + let class = module.define_class("EphemeralServer", class::object())?; + class.define_singleton_method( + "async_start_dev_server", + function!(EphemeralServer::async_start_dev_server, 2), + )?; + class.define_method("target", method!(EphemeralServer::target, 0))?; + class.define_method( + "async_shutdown", + method!(EphemeralServer::async_shutdown, 0), + )?; + Ok(()) +} + +#[derive(DataTypeFunctions, TypedData)] +#[magnus( + class = "Temporalio::Internal::Bridge::Testing::EphemeralServer", + free_immediately +)] +pub struct EphemeralServer { + core: Mutex>, + target: String, + runtime_handle: RuntimeHandle, +} + +impl EphemeralServer { + pub fn async_start_dev_server( + ruby: &Ruby, + runtime: &Runtime, + options: Struct, + ) -> Result<(), Error> { + // Build options + let mut opts_build = TemporalDevServerConfigBuilder::default(); + opts_build + .exe( + if let Some(existing_path) = options.aref::>("existing_path")? { + EphemeralExe::ExistingPath(existing_path) + } else { + EphemeralExe::CachedDownload { + version: match options.aref::("download_version")? { + ref v if v == "default" => EphemeralExeVersion::SDKDefault { + sdk_name: options.aref("sdk_name")?, + sdk_version: options.aref("sdk_version")?, + }, + download_version => EphemeralExeVersion::Fixed(download_version), + }, + dest_dir: options.aref("download_dest_dir")?, + } + }, + ) + .namespace(options.aref::("namespace")?) + .ip(options.aref::("ip")?) + .port(options.aref::>("port")?) + .db_filename(options.aref::>("database_filename")?) + .ui(options.aref("namespace")?) + .log(( + options.aref::("log_format")?, + options.aref::("log_level")?, + )) + .extra_args(options.aref("extra_args")?); + let opts = opts_build + .build() + .map_err(|err| error!("Invalid Temporalite config: {}", err))?; + + // Start + let block = Opaque::from(ruby.block_proc()?); + let runtime_handle = runtime.handle.clone(); + runtime.handle.spawn( + async move { opts.start_server().await }, + move |ruby, result| { + let block = ruby.get_inner(block); + match result { + Ok(core) => { + let _: Value = block + .call((EphemeralServer { + target: core.target.clone(), + core: Mutex::new(Some(core)), + runtime_handle, + },)) + .expect("Block call failed"); + } + Err(err) => { + let _: Value = block + .call((new_error!("Failed starting server: {}", err),)) + .expect("Block call failed"); + } + } + }, + ); + Ok(()) + } + + pub fn target(&self) -> &str { + &self.target + } + + pub fn async_shutdown(&self) -> Result<(), Error> { + let ruby = Ruby::get().expect("Not in Ruby thread"); + if let Some(mut core) = self.core.lock().take() { + let block = Opaque::from(ruby.block_proc()?); + self.runtime_handle + .spawn(async move { core.shutdown().await }, move |ruby, result| { + let block = ruby.get_inner(block); + match result { + Ok(_) => { + let _: Value = block.call((ruby.qnil(),)).expect("Block call failed"); + } + Err(err) => { + let _: Value = block + .call((new_error!("Failed shutting down server: {}", err),)) + .expect("Block call failed"); + } + }; + }) + } + Ok(()) + } +} diff --git a/temporalio/ext/src/util.rs b/temporalio/ext/src/util.rs new file mode 100644 index 00000000..bb460ad5 --- /dev/null +++ b/temporalio/ext/src/util.rs @@ -0,0 +1,93 @@ +use std::ffi::c_void; + +use magnus::Ruby; +use magnus::{Error, RStruct, TryConvert, Value}; + +use crate::error; + +pub(crate) struct Struct { + field_path: Vec<&'static str>, + inner: RStruct, +} + +impl TryConvert for Struct { + fn try_convert(val: Value) -> Result { + Ok(Self { + field_path: Vec::new(), + inner: RStruct::try_convert(val)?, + }) + } +} + +impl Struct { + pub(crate) fn aref(&self, field: &'static str) -> Result + where + T: TryConvert, + { + self.inner.aref::<_, T>(field).map_err(|err| { + if self.field_path.is_empty() { + error!("Failed reading field '{}': {}", field, err) + } else { + error!( + "Failed reading field '{}.{}': {}", + self.field_path.join("."), + field, + err + ) + } + }) + } + + pub(crate) fn child(&self, field: &'static str) -> Result, Error> { + self.aref::>(field).map(|inner| { + inner.map(|inner| { + let mut field_path = self.field_path.clone(); + field_path.push(field); + Struct { field_path, inner } + }) + }) + } +} + +/// Inspired by https://github.com/matsadler/magnus/pull/14 and +/// https://github.com/matsadler/magnus/pull/48 and +/// https://github.com/danielpclark/rutie/blob/master/src/binding/thread.rs and +/// others. +pub(crate) fn without_gvl(func: F, unblock: U) -> R +where + F: FnMut() -> R, + U: FnMut(), +{ + unsafe extern "C" fn anon_func(data: *mut c_void) -> *mut c_void + where + F: FnMut() -> R, + { + let mut func: F = *Box::from_raw(data as _); + + // TODO(cretz): Handle panics/unwind via call_handle_error? + Box::into_raw(Box::new(func())) as _ + } + + unsafe extern "C" fn anon_unblock(data: *mut c_void) + where + U: FnMut(), + { + let mut func: U = *Box::from_raw(data as _); + + func(); + } + + let boxed_func = Box::new(func); + let boxed_unblock = Box::new(unblock); + + unsafe { + let result = rb_sys::rb_thread_call_without_gvl( + Some(anon_func::), + Box::into_raw(boxed_func) as *mut _, + Some(anon_unblock::), + Box::into_raw(boxed_unblock) as *mut _, + ); + + *Box::from_raw(result as _) + } +} diff --git a/temporalio/lib/temporalio.rb b/temporalio/lib/temporalio.rb new file mode 100644 index 00000000..14e7b6c8 --- /dev/null +++ b/temporalio/lib/temporalio.rb @@ -0,0 +1,7 @@ +# frozen_string_literal: true + +require 'temporalio/version' + +# Temporal Ruby SDK. See the README at https://github.com/temporalio/sdk-ruby. +module Temporalio +end diff --git a/temporalio/lib/temporalio/api.rb b/temporalio/lib/temporalio/api.rb new file mode 100644 index 00000000..1a7a2f04 --- /dev/null +++ b/temporalio/lib/temporalio/api.rb @@ -0,0 +1,10 @@ +# frozen_string_literal: true + +require 'temporalio/api/operatorservice' +require 'temporalio/api/workflowservice' + +module Temporalio + # Raw protocol buffer models. + module Api + end +end diff --git a/temporalio/lib/temporalio/api/batch/v1/message.rb b/temporalio/lib/temporalio/api/batch/v1/message.rb new file mode 100644 index 00000000..cc2b4a91 --- /dev/null +++ b/temporalio/lib/temporalio/api/batch/v1/message.rb @@ -0,0 +1,31 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: temporal/api/batch/v1/message.proto + +require 'google/protobuf' + +require 'google/protobuf/timestamp_pb' +require 'temporalio/api/common/v1/message' +require 'temporalio/api/enums/v1/batch_operation' +require 'temporalio/api/enums/v1/reset' + + +descriptor_data = "\n#temporal/api/batch/v1/message.proto\x12\x15temporal.api.batch.v1\x1a\x1fgoogle/protobuf/timestamp.proto\x1a$temporal/api/common/v1/message.proto\x1a+temporal/api/enums/v1/batch_operation.proto\x1a!temporal/api/enums/v1/reset.proto\"\xbf\x01\n\x12\x42\x61tchOperationInfo\x12\x0e\n\x06job_id\x18\x01 \x01(\t\x12\x39\n\x05state\x18\x02 \x01(\x0e\x32*.temporal.api.enums.v1.BatchOperationState\x12.\n\nstart_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12.\n\nclose_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\"`\n\x19\x42\x61tchOperationTermination\x12\x31\n\x07\x64\x65tails\x18\x01 \x01(\x0b\x32 .temporal.api.common.v1.Payloads\x12\x10\n\x08identity\x18\x02 \x01(\t\"\x99\x01\n\x14\x42\x61tchOperationSignal\x12\x0e\n\x06signal\x18\x01 \x01(\t\x12/\n\x05input\x18\x02 \x01(\x0b\x32 .temporal.api.common.v1.Payloads\x12.\n\x06header\x18\x03 \x01(\x0b\x32\x1e.temporal.api.common.v1.Header\x12\x10\n\x08identity\x18\x04 \x01(\t\".\n\x1a\x42\x61tchOperationCancellation\x12\x10\n\x08identity\x18\x01 \x01(\t\"*\n\x16\x42\x61tchOperationDeletion\x12\x10\n\x08identity\x18\x01 \x01(\t\"\xd9\x01\n\x13\x42\x61tchOperationReset\x12\x10\n\x08identity\x18\x03 \x01(\t\x12\x35\n\x07options\x18\x04 \x01(\x0b\x32$.temporal.api.common.v1.ResetOptions\x12\x34\n\nreset_type\x18\x01 \x01(\x0e\x32 .temporal.api.enums.v1.ResetType\x12\x43\n\x12reset_reapply_type\x18\x02 \x01(\x0e\x32\'.temporal.api.enums.v1.ResetReapplyTypeB\x84\x01\n\x18io.temporal.api.batch.v1B\x0cMessageProtoP\x01Z!go.temporal.io/api/batch/v1;batch\xaa\x02\x17Temporalio.Api.Batch.V1\xea\x02\x1aTemporalio::Api::Batch::V1b\x06proto3" + +pool = Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Temporalio + module Api + module Batch + module V1 + BatchOperationInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("temporal.api.batch.v1.BatchOperationInfo").msgclass + BatchOperationTermination = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("temporal.api.batch.v1.BatchOperationTermination").msgclass + BatchOperationSignal = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("temporal.api.batch.v1.BatchOperationSignal").msgclass + BatchOperationCancellation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("temporal.api.batch.v1.BatchOperationCancellation").msgclass + BatchOperationDeletion = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("temporal.api.batch.v1.BatchOperationDeletion").msgclass + BatchOperationReset = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("temporal.api.batch.v1.BatchOperationReset").msgclass + end + end + end +end diff --git a/temporalio/lib/temporalio/api/command/v1/message.rb b/temporalio/lib/temporalio/api/command/v1/message.rb new file mode 100644 index 00000000..7b0446f1 --- /dev/null +++ b/temporalio/lib/temporalio/api/command/v1/message.rb @@ -0,0 +1,43 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: temporal/api/command/v1/message.proto + +require 'google/protobuf' + +require 'google/protobuf/duration_pb' +require 'temporalio/api/enums/v1/workflow' +require 'temporalio/api/enums/v1/command_type' +require 'temporalio/api/common/v1/message' +require 'temporalio/api/failure/v1/message' +require 'temporalio/api/taskqueue/v1/message' + + +descriptor_data = "\n%temporal/api/command/v1/message.proto\x12\x17temporal.api.command.v1\x1a\x1egoogle/protobuf/duration.proto\x1a$temporal/api/enums/v1/workflow.proto\x1a(temporal/api/enums/v1/command_type.proto\x1a$temporal/api/common/v1/message.proto\x1a%temporal/api/failure/v1/message.proto\x1a\'temporal/api/taskqueue/v1/message.proto\"\x83\x05\n%ScheduleActivityTaskCommandAttributes\x12\x13\n\x0b\x61\x63tivity_id\x18\x01 \x01(\t\x12;\n\ractivity_type\x18\x02 \x01(\x0b\x32$.temporal.api.common.v1.ActivityType\x12\x38\n\ntask_queue\x18\x04 \x01(\x0b\x32$.temporal.api.taskqueue.v1.TaskQueue\x12.\n\x06header\x18\x05 \x01(\x0b\x32\x1e.temporal.api.common.v1.Header\x12/\n\x05input\x18\x06 \x01(\x0b\x32 .temporal.api.common.v1.Payloads\x12<\n\x19schedule_to_close_timeout\x18\x07 \x01(\x0b\x32\x19.google.protobuf.Duration\x12<\n\x19schedule_to_start_timeout\x18\x08 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x39\n\x16start_to_close_timeout\x18\t \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x34\n\x11heartbeat_timeout\x18\n \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x39\n\x0cretry_policy\x18\x0b \x01(\x0b\x32#.temporal.api.common.v1.RetryPolicy\x12\x1f\n\x17request_eager_execution\x18\x0c \x01(\x08\x12\x1e\n\x16use_compatible_version\x18\r \x01(\x08J\x04\x08\x03\x10\x04\"H\n*RequestCancelActivityTaskCommandAttributes\x12\x1a\n\x12scheduled_event_id\x18\x01 \x01(\x03\"i\n\x1bStartTimerCommandAttributes\x12\x10\n\x08timer_id\x18\x01 \x01(\t\x12\x38\n\x15start_to_fire_timeout\x18\x02 \x01(\x0b\x32\x19.google.protobuf.Duration\"^\n*CompleteWorkflowExecutionCommandAttributes\x12\x30\n\x06result\x18\x01 \x01(\x0b\x32 .temporal.api.common.v1.Payloads\"[\n&FailWorkflowExecutionCommandAttributes\x12\x31\n\x07\x66\x61ilure\x18\x01 \x01(\x0b\x32 .temporal.api.failure.v1.Failure\"0\n\x1c\x43\x61ncelTimerCommandAttributes\x12\x10\n\x08timer_id\x18\x01 \x01(\t\"]\n(CancelWorkflowExecutionCommandAttributes\x12\x31\n\x07\x64\x65tails\x18\x01 \x01(\x0b\x32 .temporal.api.common.v1.Payloads\"\xaf\x01\n7RequestCancelExternalWorkflowExecutionCommandAttributes\x12\x11\n\tnamespace\x18\x01 \x01(\t\x12\x13\n\x0bworkflow_id\x18\x02 \x01(\t\x12\x0e\n\x06run_id\x18\x03 \x01(\t\x12\x0f\n\x07\x63ontrol\x18\x04 \x01(\t\x12\x1b\n\x13\x63hild_workflow_only\x18\x05 \x01(\x08\x12\x0e\n\x06reason\x18\x06 \x01(\t\"\xa7\x02\n0SignalExternalWorkflowExecutionCommandAttributes\x12\x11\n\tnamespace\x18\x01 \x01(\t\x12<\n\texecution\x18\x02 \x01(\x0b\x32).temporal.api.common.v1.WorkflowExecution\x12\x13\n\x0bsignal_name\x18\x03 \x01(\t\x12/\n\x05input\x18\x04 \x01(\x0b\x32 .temporal.api.common.v1.Payloads\x12\x0f\n\x07\x63ontrol\x18\x05 \x01(\t\x12\x1b\n\x13\x63hild_workflow_only\x18\x06 \x01(\x08\x12.\n\x06header\x18\x07 \x01(\x0b\x32\x1e.temporal.api.common.v1.Header\"v\n/UpsertWorkflowSearchAttributesCommandAttributes\x12\x43\n\x11search_attributes\x18\x01 \x01(\x0b\x32(.temporal.api.common.v1.SearchAttributes\"`\n)ModifyWorkflowPropertiesCommandAttributes\x12\x33\n\rupserted_memo\x18\x01 \x01(\x0b\x32\x1c.temporal.api.common.v1.Memo\"\xbf\x02\n\x1dRecordMarkerCommandAttributes\x12\x13\n\x0bmarker_name\x18\x01 \x01(\t\x12T\n\x07\x64\x65tails\x18\x02 \x03(\x0b\x32\x43.temporal.api.command.v1.RecordMarkerCommandAttributes.DetailsEntry\x12.\n\x06header\x18\x03 \x01(\x0b\x32\x1e.temporal.api.common.v1.Header\x12\x31\n\x07\x66\x61ilure\x18\x04 \x01(\x0b\x32 .temporal.api.failure.v1.Failure\x1aP\n\x0c\x44\x65tailsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12/\n\x05value\x18\x02 \x01(\x0b\x32 .temporal.api.common.v1.Payloads:\x02\x38\x01\"\xd1\x06\n/ContinueAsNewWorkflowExecutionCommandAttributes\x12;\n\rworkflow_type\x18\x01 \x01(\x0b\x32$.temporal.api.common.v1.WorkflowType\x12\x38\n\ntask_queue\x18\x02 \x01(\x0b\x32$.temporal.api.taskqueue.v1.TaskQueue\x12/\n\x05input\x18\x03 \x01(\x0b\x32 .temporal.api.common.v1.Payloads\x12\x37\n\x14workflow_run_timeout\x18\x04 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x38\n\x15workflow_task_timeout\x18\x05 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x39\n\x16\x62\x61\x63koff_start_interval\x18\x06 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x39\n\x0cretry_policy\x18\x07 \x01(\x0b\x32#.temporal.api.common.v1.RetryPolicy\x12@\n\tinitiator\x18\x08 \x01(\x0e\x32-.temporal.api.enums.v1.ContinueAsNewInitiator\x12\x31\n\x07\x66\x61ilure\x18\t \x01(\x0b\x32 .temporal.api.failure.v1.Failure\x12@\n\x16last_completion_result\x18\n \x01(\x0b\x32 .temporal.api.common.v1.Payloads\x12\x15\n\rcron_schedule\x18\x0b \x01(\t\x12.\n\x06header\x18\x0c \x01(\x0b\x32\x1e.temporal.api.common.v1.Header\x12*\n\x04memo\x18\r \x01(\x0b\x32\x1c.temporal.api.common.v1.Memo\x12\x43\n\x11search_attributes\x18\x0e \x01(\x0b\x32(.temporal.api.common.v1.SearchAttributes\x12\x1e\n\x16use_compatible_version\x18\x0f \x01(\x08\"\xeb\x06\n,StartChildWorkflowExecutionCommandAttributes\x12\x11\n\tnamespace\x18\x01 \x01(\t\x12\x13\n\x0bworkflow_id\x18\x02 \x01(\t\x12;\n\rworkflow_type\x18\x03 \x01(\x0b\x32$.temporal.api.common.v1.WorkflowType\x12\x38\n\ntask_queue\x18\x04 \x01(\x0b\x32$.temporal.api.taskqueue.v1.TaskQueue\x12/\n\x05input\x18\x05 \x01(\x0b\x32 .temporal.api.common.v1.Payloads\x12=\n\x1aworkflow_execution_timeout\x18\x06 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x37\n\x14workflow_run_timeout\x18\x07 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x38\n\x15workflow_task_timeout\x18\x08 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x45\n\x13parent_close_policy\x18\t \x01(\x0e\x32(.temporal.api.enums.v1.ParentClosePolicy\x12\x0f\n\x07\x63ontrol\x18\n \x01(\t\x12N\n\x18workflow_id_reuse_policy\x18\x0b \x01(\x0e\x32,.temporal.api.enums.v1.WorkflowIdReusePolicy\x12\x39\n\x0cretry_policy\x18\x0c \x01(\x0b\x32#.temporal.api.common.v1.RetryPolicy\x12\x15\n\rcron_schedule\x18\r \x01(\t\x12.\n\x06header\x18\x0e \x01(\x0b\x32\x1e.temporal.api.common.v1.Header\x12*\n\x04memo\x18\x0f \x01(\x0b\x32\x1c.temporal.api.common.v1.Memo\x12\x43\n\x11search_attributes\x18\x10 \x01(\x0b\x32(.temporal.api.common.v1.SearchAttributes\x12\x1e\n\x16use_compatible_version\x18\x11 \x01(\x08\"6\n ProtocolMessageCommandAttributes\x12\x12\n\nmessage_id\x18\x01 \x01(\t\"\x89\x0f\n\x07\x43ommand\x12\x38\n\x0c\x63ommand_type\x18\x01 \x01(\x0e\x32\".temporal.api.enums.v1.CommandType\x12s\n)schedule_activity_task_command_attributes\x18\x02 \x01(\x0b\x32>.temporal.api.command.v1.ScheduleActivityTaskCommandAttributesH\x00\x12^\n\x1estart_timer_command_attributes\x18\x03 \x01(\x0b\x32\x34.temporal.api.command.v1.StartTimerCommandAttributesH\x00\x12}\n.complete_workflow_execution_command_attributes\x18\x04 \x01(\x0b\x32\x43.temporal.api.command.v1.CompleteWorkflowExecutionCommandAttributesH\x00\x12u\n*fail_workflow_execution_command_attributes\x18\x05 \x01(\x0b\x32?.temporal.api.command.v1.FailWorkflowExecutionCommandAttributesH\x00\x12~\n/request_cancel_activity_task_command_attributes\x18\x06 \x01(\x0b\x32\x43.temporal.api.command.v1.RequestCancelActivityTaskCommandAttributesH\x00\x12`\n\x1f\x63\x61ncel_timer_command_attributes\x18\x07 \x01(\x0b\x32\x35.temporal.api.command.v1.CancelTimerCommandAttributesH\x00\x12y\n,cancel_workflow_execution_command_attributes\x18\x08 \x01(\x0b\x32\x41.temporal.api.command.v1.CancelWorkflowExecutionCommandAttributesH\x00\x12\x99\x01\n=request_cancel_external_workflow_execution_command_attributes\x18\t \x01(\x0b\x32P.temporal.api.command.v1.RequestCancelExternalWorkflowExecutionCommandAttributesH\x00\x12\x62\n record_marker_command_attributes\x18\n \x01(\x0b\x32\x36.temporal.api.command.v1.RecordMarkerCommandAttributesH\x00\x12\x89\x01\n5continue_as_new_workflow_execution_command_attributes\x18\x0b \x01(\x0b\x32H.temporal.api.command.v1.ContinueAsNewWorkflowExecutionCommandAttributesH\x00\x12\x82\x01\n1start_child_workflow_execution_command_attributes\x18\x0c \x01(\x0b\x32\x45.temporal.api.command.v1.StartChildWorkflowExecutionCommandAttributesH\x00\x12\x8a\x01\n5signal_external_workflow_execution_command_attributes\x18\r \x01(\x0b\x32I.temporal.api.command.v1.SignalExternalWorkflowExecutionCommandAttributesH\x00\x12\x88\x01\n4upsert_workflow_search_attributes_command_attributes\x18\x0e \x01(\x0b\x32H.temporal.api.command.v1.UpsertWorkflowSearchAttributesCommandAttributesH\x00\x12h\n#protocol_message_command_attributes\x18\x0f \x01(\x0b\x32\x39.temporal.api.command.v1.ProtocolMessageCommandAttributesH\x00\x12{\n-modify_workflow_properties_command_attributes\x18\x11 \x01(\x0b\x32\x42.temporal.api.command.v1.ModifyWorkflowPropertiesCommandAttributesH\x00\x42\x0c\n\nattributesB\x8e\x01\n\x1aio.temporal.api.command.v1B\x0cMessageProtoP\x01Z%go.temporal.io/api/command/v1;command\xaa\x02\x19Temporalio.Api.Command.V1\xea\x02\x1cTemporalio::Api::Command::V1b\x06proto3" + +pool = Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Temporalio + module Api + module Command + module V1 + ScheduleActivityTaskCommandAttributes = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("temporal.api.command.v1.ScheduleActivityTaskCommandAttributes").msgclass + RequestCancelActivityTaskCommandAttributes = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("temporal.api.command.v1.RequestCancelActivityTaskCommandAttributes").msgclass + StartTimerCommandAttributes = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("temporal.api.command.v1.StartTimerCommandAttributes").msgclass + CompleteWorkflowExecutionCommandAttributes = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("temporal.api.command.v1.CompleteWorkflowExecutionCommandAttributes").msgclass + FailWorkflowExecutionCommandAttributes = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("temporal.api.command.v1.FailWorkflowExecutionCommandAttributes").msgclass + CancelTimerCommandAttributes = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("temporal.api.command.v1.CancelTimerCommandAttributes").msgclass + CancelWorkflowExecutionCommandAttributes = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("temporal.api.command.v1.CancelWorkflowExecutionCommandAttributes").msgclass + RequestCancelExternalWorkflowExecutionCommandAttributes = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("temporal.api.command.v1.RequestCancelExternalWorkflowExecutionCommandAttributes").msgclass + SignalExternalWorkflowExecutionCommandAttributes = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("temporal.api.command.v1.SignalExternalWorkflowExecutionCommandAttributes").msgclass + UpsertWorkflowSearchAttributesCommandAttributes = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("temporal.api.command.v1.UpsertWorkflowSearchAttributesCommandAttributes").msgclass + ModifyWorkflowPropertiesCommandAttributes = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("temporal.api.command.v1.ModifyWorkflowPropertiesCommandAttributes").msgclass + RecordMarkerCommandAttributes = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("temporal.api.command.v1.RecordMarkerCommandAttributes").msgclass + ContinueAsNewWorkflowExecutionCommandAttributes = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("temporal.api.command.v1.ContinueAsNewWorkflowExecutionCommandAttributes").msgclass + StartChildWorkflowExecutionCommandAttributes = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("temporal.api.command.v1.StartChildWorkflowExecutionCommandAttributes").msgclass + ProtocolMessageCommandAttributes = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("temporal.api.command.v1.ProtocolMessageCommandAttributes").msgclass + Command = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("temporal.api.command.v1.Command").msgclass + end + end + end +end diff --git a/temporalio/lib/temporalio/api/common/v1/message.rb b/temporalio/lib/temporalio/api/common/v1/message.rb new file mode 100644 index 00000000..cd0b3ec9 --- /dev/null +++ b/temporalio/lib/temporalio/api/common/v1/message.rb @@ -0,0 +1,39 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: temporal/api/common/v1/message.proto + +require 'google/protobuf' + +require 'google/protobuf/duration_pb' +require 'google/protobuf/empty_pb' +require 'temporalio/api/enums/v1/common' +require 'temporalio/api/enums/v1/reset' + + +descriptor_data = "\n$temporal/api/common/v1/message.proto\x12\x16temporal.api.common.v1\x1a\x1egoogle/protobuf/duration.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a\"temporal/api/enums/v1/common.proto\x1a!temporal/api/enums/v1/reset.proto\"T\n\x08\x44\x61taBlob\x12:\n\rencoding_type\x18\x01 \x01(\x0e\x32#.temporal.api.enums.v1.EncodingType\x12\x0c\n\x04\x64\x61ta\x18\x02 \x01(\x0c\"=\n\x08Payloads\x12\x31\n\x08payloads\x18\x01 \x03(\x0b\x32\x1f.temporal.api.common.v1.Payload\"\x89\x01\n\x07Payload\x12?\n\x08metadata\x18\x01 \x03(\x0b\x32-.temporal.api.common.v1.Payload.MetadataEntry\x12\x0c\n\x04\x64\x61ta\x18\x02 \x01(\x0c\x1a/\n\rMetadataEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\x0c:\x02\x38\x01\"\xbe\x01\n\x10SearchAttributes\x12S\n\x0eindexed_fields\x18\x01 \x03(\x0b\x32;.temporal.api.common.v1.SearchAttributes.IndexedFieldsEntry\x1aU\n\x12IndexedFieldsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12.\n\x05value\x18\x02 \x01(\x0b\x32\x1f.temporal.api.common.v1.Payload:\x02\x38\x01\"\x90\x01\n\x04Memo\x12\x38\n\x06\x66ields\x18\x01 \x03(\x0b\x32(.temporal.api.common.v1.Memo.FieldsEntry\x1aN\n\x0b\x46ieldsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12.\n\x05value\x18\x02 \x01(\x0b\x32\x1f.temporal.api.common.v1.Payload:\x02\x38\x01\"\x94\x01\n\x06Header\x12:\n\x06\x66ields\x18\x01 \x03(\x0b\x32*.temporal.api.common.v1.Header.FieldsEntry\x1aN\n\x0b\x46ieldsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12.\n\x05value\x18\x02 \x01(\x0b\x32\x1f.temporal.api.common.v1.Payload:\x02\x38\x01\"8\n\x11WorkflowExecution\x12\x13\n\x0bworkflow_id\x18\x01 \x01(\t\x12\x0e\n\x06run_id\x18\x02 \x01(\t\"\x1c\n\x0cWorkflowType\x12\x0c\n\x04name\x18\x01 \x01(\t\"\x1c\n\x0c\x41\x63tivityType\x12\x0c\n\x04name\x18\x01 \x01(\t\"\xd1\x01\n\x0bRetryPolicy\x12\x33\n\x10initial_interval\x18\x01 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x1b\n\x13\x62\x61\x63koff_coefficient\x18\x02 \x01(\x01\x12\x33\n\x10maximum_interval\x18\x03 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x18\n\x10maximum_attempts\x18\x04 \x01(\x05\x12!\n\x19non_retryable_error_types\x18\x05 \x03(\t\"F\n\x10MeteringMetadata\x12\x32\n*nonfirst_local_activity_execution_attempts\x18\r \x01(\r\"Q\n\x12WorkerVersionStamp\x12\x10\n\x08\x62uild_id\x18\x01 \x01(\t\x12\x11\n\tbundle_id\x18\x02 \x01(\t\x12\x16\n\x0euse_versioning\x18\x03 \x01(\x08\"E\n\x19WorkerVersionCapabilities\x12\x10\n\x08\x62uild_id\x18\x01 \x01(\t\x12\x16\n\x0euse_versioning\x18\x02 \x01(\x08\"\x94\x02\n\x0cResetOptions\x12\x35\n\x13\x66irst_workflow_task\x18\x01 \x01(\x0b\x32\x16.google.protobuf.EmptyH\x00\x12\x34\n\x12last_workflow_task\x18\x02 \x01(\x0b\x32\x16.google.protobuf.EmptyH\x00\x12\x1a\n\x10workflow_task_id\x18\x03 \x01(\x03H\x00\x12\x12\n\x08\x62uild_id\x18\x04 \x01(\tH\x00\x12\x43\n\x12reset_reapply_type\x18\n \x01(\x0e\x32\'.temporal.api.enums.v1.ResetReapplyType\x12\x18\n\x10\x63urrent_run_only\x18\x0b \x01(\x08\x42\x08\n\x06targetB\x89\x01\n\x19io.temporal.api.common.v1B\x0cMessageProtoP\x01Z#go.temporal.io/api/common/v1;common\xaa\x02\x18Temporalio.Api.Common.V1\xea\x02\x1bTemporalio::Api::Common::V1b\x06proto3" + +pool = Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Temporalio + module Api + module Common + module V1 + DataBlob = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("temporal.api.common.v1.DataBlob").msgclass + Payloads = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("temporal.api.common.v1.Payloads").msgclass + Payload = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("temporal.api.common.v1.Payload").msgclass + SearchAttributes = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("temporal.api.common.v1.SearchAttributes").msgclass + Memo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("temporal.api.common.v1.Memo").msgclass + Header = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("temporal.api.common.v1.Header").msgclass + WorkflowExecution = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("temporal.api.common.v1.WorkflowExecution").msgclass + WorkflowType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("temporal.api.common.v1.WorkflowType").msgclass + ActivityType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("temporal.api.common.v1.ActivityType").msgclass + RetryPolicy = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("temporal.api.common.v1.RetryPolicy").msgclass + MeteringMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("temporal.api.common.v1.MeteringMetadata").msgclass + WorkerVersionStamp = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("temporal.api.common.v1.WorkerVersionStamp").msgclass + WorkerVersionCapabilities = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("temporal.api.common.v1.WorkerVersionCapabilities").msgclass + ResetOptions = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("temporal.api.common.v1.ResetOptions").msgclass + end + end + end +end diff --git a/temporalio/lib/temporalio/api/enums/v1/batch_operation.rb b/temporalio/lib/temporalio/api/enums/v1/batch_operation.rb new file mode 100644 index 00000000..a6ef04e6 --- /dev/null +++ b/temporalio/lib/temporalio/api/enums/v1/batch_operation.rb @@ -0,0 +1,22 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: temporal/api/enums/v1/batch_operation.proto + +require 'google/protobuf' + + +descriptor_data = "\n+temporal/api/enums/v1/batch_operation.proto\x12\x15temporal.api.enums.v1*\xe1\x01\n\x12\x42\x61tchOperationType\x12$\n BATCH_OPERATION_TYPE_UNSPECIFIED\x10\x00\x12\"\n\x1e\x42\x41TCH_OPERATION_TYPE_TERMINATE\x10\x01\x12\x1f\n\x1b\x42\x41TCH_OPERATION_TYPE_CANCEL\x10\x02\x12\x1f\n\x1b\x42\x41TCH_OPERATION_TYPE_SIGNAL\x10\x03\x12\x1f\n\x1b\x42\x41TCH_OPERATION_TYPE_DELETE\x10\x04\x12\x1e\n\x1a\x42\x41TCH_OPERATION_TYPE_RESET\x10\x05*\xa6\x01\n\x13\x42\x61tchOperationState\x12%\n!BATCH_OPERATION_STATE_UNSPECIFIED\x10\x00\x12!\n\x1d\x42\x41TCH_OPERATION_STATE_RUNNING\x10\x01\x12#\n\x1f\x42\x41TCH_OPERATION_STATE_COMPLETED\x10\x02\x12 \n\x1c\x42\x41TCH_OPERATION_STATE_FAILED\x10\x03\x42\x8b\x01\n\x18io.temporal.api.enums.v1B\x13\x42\x61tchOperationProtoP\x01Z!go.temporal.io/api/enums/v1;enums\xaa\x02\x17Temporalio.Api.Enums.V1\xea\x02\x1aTemporalio::Api::Enums::V1b\x06proto3" + +pool = Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Temporalio + module Api + module Enums + module V1 + BatchOperationType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("temporal.api.enums.v1.BatchOperationType").enummodule + BatchOperationState = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("temporal.api.enums.v1.BatchOperationState").enummodule + end + end + end +end diff --git a/temporalio/lib/temporalio/api/enums/v1/command_type.rb b/temporalio/lib/temporalio/api/enums/v1/command_type.rb new file mode 100644 index 00000000..c7ccd1f2 --- /dev/null +++ b/temporalio/lib/temporalio/api/enums/v1/command_type.rb @@ -0,0 +1,21 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: temporal/api/enums/v1/command_type.proto + +require 'google/protobuf' + + +descriptor_data = "\n(temporal/api/enums/v1/command_type.proto\x12\x15temporal.api.enums.v1*\xc0\x05\n\x0b\x43ommandType\x12\x1c\n\x18\x43OMMAND_TYPE_UNSPECIFIED\x10\x00\x12\'\n#COMMAND_TYPE_SCHEDULE_ACTIVITY_TASK\x10\x01\x12-\n)COMMAND_TYPE_REQUEST_CANCEL_ACTIVITY_TASK\x10\x02\x12\x1c\n\x18\x43OMMAND_TYPE_START_TIMER\x10\x03\x12,\n(COMMAND_TYPE_COMPLETE_WORKFLOW_EXECUTION\x10\x04\x12(\n$COMMAND_TYPE_FAIL_WORKFLOW_EXECUTION\x10\x05\x12\x1d\n\x19\x43OMMAND_TYPE_CANCEL_TIMER\x10\x06\x12*\n&COMMAND_TYPE_CANCEL_WORKFLOW_EXECUTION\x10\x07\x12;\n7COMMAND_TYPE_REQUEST_CANCEL_EXTERNAL_WORKFLOW_EXECUTION\x10\x08\x12\x1e\n\x1a\x43OMMAND_TYPE_RECORD_MARKER\x10\t\x12\x33\n/COMMAND_TYPE_CONTINUE_AS_NEW_WORKFLOW_EXECUTION\x10\n\x12/\n+COMMAND_TYPE_START_CHILD_WORKFLOW_EXECUTION\x10\x0b\x12\x33\n/COMMAND_TYPE_SIGNAL_EXTERNAL_WORKFLOW_EXECUTION\x10\x0c\x12\x32\n.COMMAND_TYPE_UPSERT_WORKFLOW_SEARCH_ATTRIBUTES\x10\r\x12!\n\x1d\x43OMMAND_TYPE_PROTOCOL_MESSAGE\x10\x0e\x12+\n\'COMMAND_TYPE_MODIFY_WORKFLOW_PROPERTIES\x10\x10\x42\x88\x01\n\x18io.temporal.api.enums.v1B\x10\x43ommandTypeProtoP\x01Z!go.temporal.io/api/enums/v1;enums\xaa\x02\x17Temporalio.Api.Enums.V1\xea\x02\x1aTemporalio::Api::Enums::V1b\x06proto3" + +pool = Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Temporalio + module Api + module Enums + module V1 + CommandType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("temporal.api.enums.v1.CommandType").enummodule + end + end + end +end diff --git a/temporalio/lib/temporalio/api/enums/v1/common.rb b/temporalio/lib/temporalio/api/enums/v1/common.rb new file mode 100644 index 00000000..90e52281 --- /dev/null +++ b/temporalio/lib/temporalio/api/enums/v1/common.rb @@ -0,0 +1,23 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: temporal/api/enums/v1/common.proto + +require 'google/protobuf' + + +descriptor_data = "\n\"temporal/api/enums/v1/common.proto\x12\x15temporal.api.enums.v1*_\n\x0c\x45ncodingType\x12\x1d\n\x19\x45NCODING_TYPE_UNSPECIFIED\x10\x00\x12\x18\n\x14\x45NCODING_TYPE_PROTO3\x10\x01\x12\x16\n\x12\x45NCODING_TYPE_JSON\x10\x02*\x91\x02\n\x10IndexedValueType\x12\"\n\x1eINDEXED_VALUE_TYPE_UNSPECIFIED\x10\x00\x12\x1b\n\x17INDEXED_VALUE_TYPE_TEXT\x10\x01\x12\x1e\n\x1aINDEXED_VALUE_TYPE_KEYWORD\x10\x02\x12\x1a\n\x16INDEXED_VALUE_TYPE_INT\x10\x03\x12\x1d\n\x19INDEXED_VALUE_TYPE_DOUBLE\x10\x04\x12\x1b\n\x17INDEXED_VALUE_TYPE_BOOL\x10\x05\x12\x1f\n\x1bINDEXED_VALUE_TYPE_DATETIME\x10\x06\x12#\n\x1fINDEXED_VALUE_TYPE_KEYWORD_LIST\x10\x07*^\n\x08Severity\x12\x18\n\x14SEVERITY_UNSPECIFIED\x10\x00\x12\x11\n\rSEVERITY_HIGH\x10\x01\x12\x13\n\x0fSEVERITY_MEDIUM\x10\x02\x12\x10\n\x0cSEVERITY_LOW\x10\x03\x42\x83\x01\n\x18io.temporal.api.enums.v1B\x0b\x43ommonProtoP\x01Z!go.temporal.io/api/enums/v1;enums\xaa\x02\x17Temporalio.Api.Enums.V1\xea\x02\x1aTemporalio::Api::Enums::V1b\x06proto3" + +pool = Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Temporalio + module Api + module Enums + module V1 + EncodingType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("temporal.api.enums.v1.EncodingType").enummodule + IndexedValueType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("temporal.api.enums.v1.IndexedValueType").enummodule + Severity = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("temporal.api.enums.v1.Severity").enummodule + end + end + end +end diff --git a/temporalio/lib/temporalio/api/enums/v1/event_type.rb b/temporalio/lib/temporalio/api/enums/v1/event_type.rb new file mode 100644 index 00000000..0d261a76 --- /dev/null +++ b/temporalio/lib/temporalio/api/enums/v1/event_type.rb @@ -0,0 +1,21 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: temporal/api/enums/v1/event_type.proto + +require 'google/protobuf' + + +descriptor_data = "\n&temporal/api/enums/v1/event_type.proto\x12\x15temporal.api.enums.v1*\xc2\x11\n\tEventType\x12\x1a\n\x16\x45VENT_TYPE_UNSPECIFIED\x10\x00\x12)\n%EVENT_TYPE_WORKFLOW_EXECUTION_STARTED\x10\x01\x12+\n\'EVENT_TYPE_WORKFLOW_EXECUTION_COMPLETED\x10\x02\x12(\n$EVENT_TYPE_WORKFLOW_EXECUTION_FAILED\x10\x03\x12+\n\'EVENT_TYPE_WORKFLOW_EXECUTION_TIMED_OUT\x10\x04\x12&\n\"EVENT_TYPE_WORKFLOW_TASK_SCHEDULED\x10\x05\x12$\n EVENT_TYPE_WORKFLOW_TASK_STARTED\x10\x06\x12&\n\"EVENT_TYPE_WORKFLOW_TASK_COMPLETED\x10\x07\x12&\n\"EVENT_TYPE_WORKFLOW_TASK_TIMED_OUT\x10\x08\x12#\n\x1f\x45VENT_TYPE_WORKFLOW_TASK_FAILED\x10\t\x12&\n\"EVENT_TYPE_ACTIVITY_TASK_SCHEDULED\x10\n\x12$\n EVENT_TYPE_ACTIVITY_TASK_STARTED\x10\x0b\x12&\n\"EVENT_TYPE_ACTIVITY_TASK_COMPLETED\x10\x0c\x12#\n\x1f\x45VENT_TYPE_ACTIVITY_TASK_FAILED\x10\r\x12&\n\"EVENT_TYPE_ACTIVITY_TASK_TIMED_OUT\x10\x0e\x12-\n)EVENT_TYPE_ACTIVITY_TASK_CANCEL_REQUESTED\x10\x0f\x12%\n!EVENT_TYPE_ACTIVITY_TASK_CANCELED\x10\x10\x12\x1c\n\x18\x45VENT_TYPE_TIMER_STARTED\x10\x11\x12\x1a\n\x16\x45VENT_TYPE_TIMER_FIRED\x10\x12\x12\x1d\n\x19\x45VENT_TYPE_TIMER_CANCELED\x10\x13\x12\x32\n.EVENT_TYPE_WORKFLOW_EXECUTION_CANCEL_REQUESTED\x10\x14\x12*\n&EVENT_TYPE_WORKFLOW_EXECUTION_CANCELED\x10\x15\x12\x43\n?EVENT_TYPE_REQUEST_CANCEL_EXTERNAL_WORKFLOW_EXECUTION_INITIATED\x10\x16\x12@\n\n\x17WorkflowExecutionFilter\x12\x13\n\x0bworkflow_id\x18\x01 \x01(\t\x12\x0e\n\x06run_id\x18\x02 \x01(\t\"\"\n\x12WorkflowTypeFilter\x12\x0c\n\x04name\x18\x01 \x01(\t\"u\n\x0fStartTimeFilter\x12\x31\n\rearliest_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12/\n\x0blatest_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\"N\n\x0cStatusFilter\x12>\n\x06status\x18\x01 \x01(\x0e\x32..temporal.api.enums.v1.WorkflowExecutionStatusB\x89\x01\n\x19io.temporal.api.filter.v1B\x0cMessageProtoP\x01Z#go.temporal.io/api/filter/v1;filter\xaa\x02\x18Temporalio.Api.Filter.V1\xea\x02\x1bTemporalio::Api::Filter::V1b\x06proto3" + +pool = Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Temporalio + module Api + module Filter + module V1 + WorkflowExecutionFilter = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("temporal.api.filter.v1.WorkflowExecutionFilter").msgclass + WorkflowTypeFilter = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("temporal.api.filter.v1.WorkflowTypeFilter").msgclass + StartTimeFilter = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("temporal.api.filter.v1.StartTimeFilter").msgclass + StatusFilter = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("temporal.api.filter.v1.StatusFilter").msgclass + end + end + end +end diff --git a/temporalio/lib/temporalio/api/history/v1/message.rb b/temporalio/lib/temporalio/api/history/v1/message.rb new file mode 100644 index 00000000..5d1aa94f --- /dev/null +++ b/temporalio/lib/temporalio/api/history/v1/message.rb @@ -0,0 +1,82 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: temporal/api/history/v1/message.proto + +require 'google/protobuf' + +require 'google/protobuf/duration_pb' +require 'google/protobuf/timestamp_pb' +require 'temporalio/api/enums/v1/event_type' +require 'temporalio/api/enums/v1/failed_cause' +require 'temporalio/api/enums/v1/update' +require 'temporalio/api/enums/v1/workflow' +require 'temporalio/api/common/v1/message' +require 'temporalio/api/failure/v1/message' +require 'temporalio/api/taskqueue/v1/message' +require 'temporalio/api/update/v1/message' +require 'temporalio/api/workflow/v1/message' +require 'temporalio/api/sdk/v1/task_complete_metadata' + + +descriptor_data = "\n%temporal/api/history/v1/message.proto\x12\x17temporal.api.history.v1\x1a\x1egoogle/protobuf/duration.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a&temporal/api/enums/v1/event_type.proto\x1a(temporal/api/enums/v1/failed_cause.proto\x1a\"temporal/api/enums/v1/update.proto\x1a$temporal/api/enums/v1/workflow.proto\x1a$temporal/api/common/v1/message.proto\x1a%temporal/api/failure/v1/message.proto\x1a\'temporal/api/taskqueue/v1/message.proto\x1a$temporal/api/update/v1/message.proto\x1a&temporal/api/workflow/v1/message.proto\x1a\x30temporal/api/sdk/v1/task_complete_metadata.proto\"\xd1\x0b\n\'WorkflowExecutionStartedEventAttributes\x12;\n\rworkflow_type\x18\x01 \x01(\x0b\x32$.temporal.api.common.v1.WorkflowType\x12!\n\x19parent_workflow_namespace\x18\x02 \x01(\t\x12$\n\x1cparent_workflow_namespace_id\x18\x1b \x01(\t\x12L\n\x19parent_workflow_execution\x18\x03 \x01(\x0b\x32).temporal.api.common.v1.WorkflowExecution\x12!\n\x19parent_initiated_event_id\x18\x04 \x01(\x03\x12\x38\n\ntask_queue\x18\x05 \x01(\x0b\x32$.temporal.api.taskqueue.v1.TaskQueue\x12/\n\x05input\x18\x06 \x01(\x0b\x32 .temporal.api.common.v1.Payloads\x12=\n\x1aworkflow_execution_timeout\x18\x07 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x37\n\x14workflow_run_timeout\x18\x08 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x38\n\x15workflow_task_timeout\x18\t \x01(\x0b\x32\x19.google.protobuf.Duration\x12\"\n\x1a\x63ontinued_execution_run_id\x18\n \x01(\t\x12@\n\tinitiator\x18\x0b \x01(\x0e\x32-.temporal.api.enums.v1.ContinueAsNewInitiator\x12;\n\x11\x63ontinued_failure\x18\x0c \x01(\x0b\x32 .temporal.api.failure.v1.Failure\x12@\n\x16last_completion_result\x18\r \x01(\x0b\x32 .temporal.api.common.v1.Payloads\x12!\n\x19original_execution_run_id\x18\x0e \x01(\t\x12\x10\n\x08identity\x18\x0f \x01(\t\x12\x1e\n\x16\x66irst_execution_run_id\x18\x10 \x01(\t\x12\x39\n\x0cretry_policy\x18\x11 \x01(\x0b\x32#.temporal.api.common.v1.RetryPolicy\x12\x0f\n\x07\x61ttempt\x18\x12 \x01(\x05\x12\x46\n\"workflow_execution_expiration_time\x18\x13 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x15\n\rcron_schedule\x18\x14 \x01(\t\x12>\n\x1b\x66irst_workflow_task_backoff\x18\x15 \x01(\x0b\x32\x19.google.protobuf.Duration\x12*\n\x04memo\x18\x16 \x01(\x0b\x32\x1c.temporal.api.common.v1.Memo\x12\x43\n\x11search_attributes\x18\x17 \x01(\x0b\x32(.temporal.api.common.v1.SearchAttributes\x12\x45\n\x16prev_auto_reset_points\x18\x18 \x01(\x0b\x32%.temporal.api.workflow.v1.ResetPoints\x12.\n\x06header\x18\x19 \x01(\x0b\x32\x1e.temporal.api.common.v1.Header\x12&\n\x1eparent_initiated_event_version\x18\x1a \x01(\x03\x12\x13\n\x0bworkflow_id\x18\x1c \x01(\t\x12H\n\x14source_version_stamp\x18\x1d \x01(\x0b\x32*.temporal.api.common.v1.WorkerVersionStamp\"\xa5\x01\n)WorkflowExecutionCompletedEventAttributes\x12\x30\n\x06result\x18\x01 \x01(\x0b\x32 .temporal.api.common.v1.Payloads\x12(\n workflow_task_completed_event_id\x18\x02 \x01(\x03\x12\x1c\n\x14new_execution_run_id\x18\x03 \x01(\t\"\xdb\x01\n&WorkflowExecutionFailedEventAttributes\x12\x31\n\x07\x66\x61ilure\x18\x01 \x01(\x0b\x32 .temporal.api.failure.v1.Failure\x12\x36\n\x0bretry_state\x18\x02 \x01(\x0e\x32!.temporal.api.enums.v1.RetryState\x12(\n workflow_task_completed_event_id\x18\x03 \x01(\x03\x12\x1c\n\x14new_execution_run_id\x18\x04 \x01(\t\"\x80\x01\n(WorkflowExecutionTimedOutEventAttributes\x12\x36\n\x0bretry_state\x18\x01 \x01(\x0e\x32!.temporal.api.enums.v1.RetryState\x12\x1c\n\x14new_execution_run_id\x18\x02 \x01(\t\"\xc6\x06\n.WorkflowExecutionContinuedAsNewEventAttributes\x12\x1c\n\x14new_execution_run_id\x18\x01 \x01(\t\x12;\n\rworkflow_type\x18\x02 \x01(\x0b\x32$.temporal.api.common.v1.WorkflowType\x12\x38\n\ntask_queue\x18\x03 \x01(\x0b\x32$.temporal.api.taskqueue.v1.TaskQueue\x12/\n\x05input\x18\x04 \x01(\x0b\x32 .temporal.api.common.v1.Payloads\x12\x37\n\x14workflow_run_timeout\x18\x05 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x38\n\x15workflow_task_timeout\x18\x06 \x01(\x0b\x32\x19.google.protobuf.Duration\x12(\n workflow_task_completed_event_id\x18\x07 \x01(\x03\x12\x39\n\x16\x62\x61\x63koff_start_interval\x18\x08 \x01(\x0b\x32\x19.google.protobuf.Duration\x12@\n\tinitiator\x18\t \x01(\x0e\x32-.temporal.api.enums.v1.ContinueAsNewInitiator\x12\x31\n\x07\x66\x61ilure\x18\n \x01(\x0b\x32 .temporal.api.failure.v1.Failure\x12@\n\x16last_completion_result\x18\x0b \x01(\x0b\x32 .temporal.api.common.v1.Payloads\x12.\n\x06header\x18\x0c \x01(\x0b\x32\x1e.temporal.api.common.v1.Header\x12*\n\x04memo\x18\r \x01(\x0b\x32\x1c.temporal.api.common.v1.Memo\x12\x43\n\x11search_attributes\x18\x0e \x01(\x0b\x32(.temporal.api.common.v1.SearchAttributes\x12\x1e\n\x16use_compatible_version\x18\x0f \x01(\x08\"\xac\x01\n$WorkflowTaskScheduledEventAttributes\x12\x38\n\ntask_queue\x18\x01 \x01(\x0b\x32$.temporal.api.taskqueue.v1.TaskQueue\x12\x39\n\x16start_to_close_timeout\x18\x02 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x0f\n\x07\x61ttempt\x18\x03 \x01(\x05\"\xa3\x01\n\"WorkflowTaskStartedEventAttributes\x12\x1a\n\x12scheduled_event_id\x18\x01 \x01(\x03\x12\x10\n\x08identity\x18\x02 \x01(\t\x12\x12\n\nrequest_id\x18\x03 \x01(\t\x12\x1f\n\x17suggest_continue_as_new\x18\x04 \x01(\x08\x12\x1a\n\x12history_size_bytes\x18\x05 \x01(\x03\"\xda\x02\n$WorkflowTaskCompletedEventAttributes\x12\x1a\n\x12scheduled_event_id\x18\x01 \x01(\x03\x12\x18\n\x10started_event_id\x18\x02 \x01(\x03\x12\x10\n\x08identity\x18\x03 \x01(\t\x12\x17\n\x0f\x62inary_checksum\x18\x04 \x01(\t\x12\x42\n\x0eworker_version\x18\x05 \x01(\x0b\x32*.temporal.api.common.v1.WorkerVersionStamp\x12H\n\x0csdk_metadata\x18\x06 \x01(\x0b\x32\x32.temporal.api.sdk.v1.WorkflowTaskCompletedMetadata\x12\x43\n\x11metering_metadata\x18\r \x01(\x0b\x32(.temporal.api.common.v1.MeteringMetadata\"\x95\x01\n#WorkflowTaskTimedOutEventAttributes\x12\x1a\n\x12scheduled_event_id\x18\x01 \x01(\x03\x12\x18\n\x10started_event_id\x18\x02 \x01(\x03\x12\x38\n\x0ctimeout_type\x18\x03 \x01(\x0e\x32\".temporal.api.enums.v1.TimeoutType\"\xff\x02\n!WorkflowTaskFailedEventAttributes\x12\x1a\n\x12scheduled_event_id\x18\x01 \x01(\x03\x12\x18\n\x10started_event_id\x18\x02 \x01(\x03\x12=\n\x05\x63\x61use\x18\x03 \x01(\x0e\x32..temporal.api.enums.v1.WorkflowTaskFailedCause\x12\x31\n\x07\x66\x61ilure\x18\x04 \x01(\x0b\x32 .temporal.api.failure.v1.Failure\x12\x10\n\x08identity\x18\x05 \x01(\t\x12\x13\n\x0b\x62\x61se_run_id\x18\x06 \x01(\t\x12\x12\n\nnew_run_id\x18\x07 \x01(\t\x12\x1a\n\x12\x66ork_event_version\x18\x08 \x01(\x03\x12\x17\n\x0f\x62inary_checksum\x18\t \x01(\t\x12\x42\n\x0eworker_version\x18\n \x01(\x0b\x32*.temporal.api.common.v1.WorkerVersionStamp\"\x8b\x05\n$ActivityTaskScheduledEventAttributes\x12\x13\n\x0b\x61\x63tivity_id\x18\x01 \x01(\t\x12;\n\ractivity_type\x18\x02 \x01(\x0b\x32$.temporal.api.common.v1.ActivityType\x12\x38\n\ntask_queue\x18\x04 \x01(\x0b\x32$.temporal.api.taskqueue.v1.TaskQueue\x12.\n\x06header\x18\x05 \x01(\x0b\x32\x1e.temporal.api.common.v1.Header\x12/\n\x05input\x18\x06 \x01(\x0b\x32 .temporal.api.common.v1.Payloads\x12<\n\x19schedule_to_close_timeout\x18\x07 \x01(\x0b\x32\x19.google.protobuf.Duration\x12<\n\x19schedule_to_start_timeout\x18\x08 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x39\n\x16start_to_close_timeout\x18\t \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x34\n\x11heartbeat_timeout\x18\n \x01(\x0b\x32\x19.google.protobuf.Duration\x12(\n workflow_task_completed_event_id\x18\x0b \x01(\x03\x12\x39\n\x0cretry_policy\x18\x0c \x01(\x0b\x32#.temporal.api.common.v1.RetryPolicy\x12\x1e\n\x16use_compatible_version\x18\r \x01(\x08J\x04\x08\x03\x10\x04\"\xaf\x01\n\"ActivityTaskStartedEventAttributes\x12\x1a\n\x12scheduled_event_id\x18\x01 \x01(\x03\x12\x10\n\x08identity\x18\x02 \x01(\t\x12\x12\n\nrequest_id\x18\x03 \x01(\t\x12\x0f\n\x07\x61ttempt\x18\x04 \x01(\x05\x12\x36\n\x0clast_failure\x18\x05 \x01(\x0b\x32 .temporal.api.failure.v1.Failure\"\xe4\x01\n$ActivityTaskCompletedEventAttributes\x12\x30\n\x06result\x18\x01 \x01(\x0b\x32 .temporal.api.common.v1.Payloads\x12\x1a\n\x12scheduled_event_id\x18\x02 \x01(\x03\x12\x18\n\x10started_event_id\x18\x03 \x01(\x03\x12\x10\n\x08identity\x18\x04 \x01(\t\x12\x42\n\x0eworker_version\x18\x05 \x01(\x0b\x32*.temporal.api.common.v1.WorkerVersionStamp\"\x9a\x02\n!ActivityTaskFailedEventAttributes\x12\x31\n\x07\x66\x61ilure\x18\x01 \x01(\x0b\x32 .temporal.api.failure.v1.Failure\x12\x1a\n\x12scheduled_event_id\x18\x02 \x01(\x03\x12\x18\n\x10started_event_id\x18\x03 \x01(\x03\x12\x10\n\x08identity\x18\x04 \x01(\t\x12\x36\n\x0bretry_state\x18\x05 \x01(\x0e\x32!.temporal.api.enums.v1.RetryState\x12\x42\n\x0eworker_version\x18\x06 \x01(\x0b\x32*.temporal.api.common.v1.WorkerVersionStamp\"\xc6\x01\n#ActivityTaskTimedOutEventAttributes\x12\x31\n\x07\x66\x61ilure\x18\x01 \x01(\x0b\x32 .temporal.api.failure.v1.Failure\x12\x1a\n\x12scheduled_event_id\x18\x02 \x01(\x03\x12\x18\n\x10started_event_id\x18\x03 \x01(\x03\x12\x36\n\x0bretry_state\x18\x04 \x01(\x0e\x32!.temporal.api.enums.v1.RetryState\"r\n*ActivityTaskCancelRequestedEventAttributes\x12\x1a\n\x12scheduled_event_id\x18\x01 \x01(\x03\x12(\n workflow_task_completed_event_id\x18\x02 \x01(\x03\"\x8e\x02\n#ActivityTaskCanceledEventAttributes\x12\x31\n\x07\x64\x65tails\x18\x01 \x01(\x0b\x32 .temporal.api.common.v1.Payloads\x12(\n latest_cancel_requested_event_id\x18\x02 \x01(\x03\x12\x1a\n\x12scheduled_event_id\x18\x03 \x01(\x03\x12\x18\n\x10started_event_id\x18\x04 \x01(\x03\x12\x10\n\x08identity\x18\x05 \x01(\t\x12\x42\n\x0eworker_version\x18\x06 \x01(\x0b\x32*.temporal.api.common.v1.WorkerVersionStamp\"\x93\x01\n\x1bTimerStartedEventAttributes\x12\x10\n\x08timer_id\x18\x01 \x01(\t\x12\x38\n\x15start_to_fire_timeout\x18\x02 \x01(\x0b\x32\x19.google.protobuf.Duration\x12(\n workflow_task_completed_event_id\x18\x03 \x01(\x03\"G\n\x19TimerFiredEventAttributes\x12\x10\n\x08timer_id\x18\x01 \x01(\t\x12\x18\n\x10started_event_id\x18\x02 \x01(\x03\"\x86\x01\n\x1cTimerCanceledEventAttributes\x12\x10\n\x08timer_id\x18\x01 \x01(\t\x12\x18\n\x10started_event_id\x18\x02 \x01(\x03\x12(\n workflow_task_completed_event_id\x18\x03 \x01(\x03\x12\x10\n\x08identity\x18\x04 \x01(\t\"\xc7\x01\n/WorkflowExecutionCancelRequestedEventAttributes\x12\r\n\x05\x63\x61use\x18\x01 \x01(\t\x12#\n\x1b\x65xternal_initiated_event_id\x18\x02 \x01(\x03\x12N\n\x1b\x65xternal_workflow_execution\x18\x03 \x01(\x0b\x32).temporal.api.common.v1.WorkflowExecution\x12\x10\n\x08identity\x18\x04 \x01(\t\"\x87\x01\n(WorkflowExecutionCanceledEventAttributes\x12(\n workflow_task_completed_event_id\x18\x01 \x01(\x03\x12\x31\n\x07\x64\x65tails\x18\x02 \x01(\x0b\x32 .temporal.api.common.v1.Payloads\"\xe9\x02\n\x1dMarkerRecordedEventAttributes\x12\x13\n\x0bmarker_name\x18\x01 \x01(\t\x12T\n\x07\x64\x65tails\x18\x02 \x03(\x0b\x32\x43.temporal.api.history.v1.MarkerRecordedEventAttributes.DetailsEntry\x12(\n workflow_task_completed_event_id\x18\x03 \x01(\x03\x12.\n\x06header\x18\x04 \x01(\x0b\x32\x1e.temporal.api.common.v1.Header\x12\x31\n\x07\x66\x61ilure\x18\x05 \x01(\x0b\x32 .temporal.api.failure.v1.Failure\x1aP\n\x0c\x44\x65tailsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12/\n\x05value\x18\x02 \x01(\x0b\x32 .temporal.api.common.v1.Payloads:\x02\x38\x01\"\xa7\x02\n(WorkflowExecutionSignaledEventAttributes\x12\x13\n\x0bsignal_name\x18\x01 \x01(\t\x12/\n\x05input\x18\x02 \x01(\x0b\x32 .temporal.api.common.v1.Payloads\x12\x10\n\x08identity\x18\x03 \x01(\t\x12.\n\x06header\x18\x04 \x01(\x0b\x32\x1e.temporal.api.common.v1.Header\x12#\n\x1bskip_generate_workflow_task\x18\x05 \x01(\x08\x12N\n\x1b\x65xternal_workflow_execution\x18\x06 \x01(\x0b\x32).temporal.api.common.v1.WorkflowExecution\"\x81\x01\n*WorkflowExecutionTerminatedEventAttributes\x12\x0e\n\x06reason\x18\x01 \x01(\t\x12\x31\n\x07\x64\x65tails\x18\x02 \x01(\x0b\x32 .temporal.api.common.v1.Payloads\x12\x10\n\x08identity\x18\x03 \x01(\t\"\x98\x02\n>RequestCancelExternalWorkflowExecutionInitiatedEventAttributes\x12(\n workflow_task_completed_event_id\x18\x01 \x01(\x03\x12\x11\n\tnamespace\x18\x02 \x01(\t\x12\x14\n\x0cnamespace_id\x18\x07 \x01(\t\x12\x45\n\x12workflow_execution\x18\x03 \x01(\x0b\x32).temporal.api.common.v1.WorkflowExecution\x12\x0f\n\x07\x63ontrol\x18\x04 \x01(\t\x12\x1b\n\x13\x63hild_workflow_only\x18\x05 \x01(\x08\x12\x0e\n\x06reason\x18\x06 \x01(\t\"\xd6\x02\n;RequestCancelExternalWorkflowExecutionFailedEventAttributes\x12P\n\x05\x63\x61use\x18\x01 \x01(\x0e\x32\x41.temporal.api.enums.v1.CancelExternalWorkflowExecutionFailedCause\x12(\n workflow_task_completed_event_id\x18\x02 \x01(\x03\x12\x11\n\tnamespace\x18\x03 \x01(\t\x12\x14\n\x0cnamespace_id\x18\x07 \x01(\t\x12\x45\n\x12workflow_execution\x18\x04 \x01(\x0b\x32).temporal.api.common.v1.WorkflowExecution\x12\x1a\n\x12initiated_event_id\x18\x05 \x01(\x03\x12\x0f\n\x07\x63ontrol\x18\x06 \x01(\t\"\xc5\x01\n7ExternalWorkflowExecutionCancelRequestedEventAttributes\x12\x1a\n\x12initiated_event_id\x18\x01 \x01(\x03\x12\x11\n\tnamespace\x18\x02 \x01(\t\x12\x14\n\x0cnamespace_id\x18\x04 \x01(\t\x12\x45\n\x12workflow_execution\x18\x03 \x01(\x0b\x32).temporal.api.common.v1.WorkflowExecution\"\xf7\x02\n7SignalExternalWorkflowExecutionInitiatedEventAttributes\x12(\n workflow_task_completed_event_id\x18\x01 \x01(\x03\x12\x11\n\tnamespace\x18\x02 \x01(\t\x12\x14\n\x0cnamespace_id\x18\t \x01(\t\x12\x45\n\x12workflow_execution\x18\x03 \x01(\x0b\x32).temporal.api.common.v1.WorkflowExecution\x12\x13\n\x0bsignal_name\x18\x04 \x01(\t\x12/\n\x05input\x18\x05 \x01(\x0b\x32 .temporal.api.common.v1.Payloads\x12\x0f\n\x07\x63ontrol\x18\x06 \x01(\t\x12\x1b\n\x13\x63hild_workflow_only\x18\x07 \x01(\x08\x12.\n\x06header\x18\x08 \x01(\x0b\x32\x1e.temporal.api.common.v1.Header\"\xcf\x02\n4SignalExternalWorkflowExecutionFailedEventAttributes\x12P\n\x05\x63\x61use\x18\x01 \x01(\x0e\x32\x41.temporal.api.enums.v1.SignalExternalWorkflowExecutionFailedCause\x12(\n workflow_task_completed_event_id\x18\x02 \x01(\x03\x12\x11\n\tnamespace\x18\x03 \x01(\t\x12\x14\n\x0cnamespace_id\x18\x07 \x01(\t\x12\x45\n\x12workflow_execution\x18\x04 \x01(\x0b\x32).temporal.api.common.v1.WorkflowExecution\x12\x1a\n\x12initiated_event_id\x18\x05 \x01(\x03\x12\x0f\n\x07\x63ontrol\x18\x06 \x01(\t\"\xcf\x01\n0ExternalWorkflowExecutionSignaledEventAttributes\x12\x1a\n\x12initiated_event_id\x18\x01 \x01(\x03\x12\x11\n\tnamespace\x18\x02 \x01(\t\x12\x14\n\x0cnamespace_id\x18\x05 \x01(\t\x12\x45\n\x12workflow_execution\x18\x03 \x01(\x0b\x32).temporal.api.common.v1.WorkflowExecution\x12\x0f\n\x07\x63ontrol\x18\x04 \x01(\t\"\x9e\x01\n-UpsertWorkflowSearchAttributesEventAttributes\x12(\n workflow_task_completed_event_id\x18\x01 \x01(\x03\x12\x43\n\x11search_attributes\x18\x02 \x01(\x0b\x32(.temporal.api.common.v1.SearchAttributes\"\x8a\x01\n)WorkflowPropertiesModifiedEventAttributes\x12(\n workflow_task_completed_event_id\x18\x01 \x01(\x03\x12\x33\n\rupserted_memo\x18\x02 \x01(\x0b\x32\x1c.temporal.api.common.v1.Memo\"\xb2\x07\n3StartChildWorkflowExecutionInitiatedEventAttributes\x12\x11\n\tnamespace\x18\x01 \x01(\t\x12\x14\n\x0cnamespace_id\x18\x12 \x01(\t\x12\x13\n\x0bworkflow_id\x18\x02 \x01(\t\x12;\n\rworkflow_type\x18\x03 \x01(\x0b\x32$.temporal.api.common.v1.WorkflowType\x12\x38\n\ntask_queue\x18\x04 \x01(\x0b\x32$.temporal.api.taskqueue.v1.TaskQueue\x12/\n\x05input\x18\x05 \x01(\x0b\x32 .temporal.api.common.v1.Payloads\x12=\n\x1aworkflow_execution_timeout\x18\x06 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x37\n\x14workflow_run_timeout\x18\x07 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x38\n\x15workflow_task_timeout\x18\x08 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x45\n\x13parent_close_policy\x18\t \x01(\x0e\x32(.temporal.api.enums.v1.ParentClosePolicy\x12\x0f\n\x07\x63ontrol\x18\n \x01(\t\x12(\n workflow_task_completed_event_id\x18\x0b \x01(\x03\x12N\n\x18workflow_id_reuse_policy\x18\x0c \x01(\x0e\x32,.temporal.api.enums.v1.WorkflowIdReusePolicy\x12\x39\n\x0cretry_policy\x18\r \x01(\x0b\x32#.temporal.api.common.v1.RetryPolicy\x12\x15\n\rcron_schedule\x18\x0e \x01(\t\x12.\n\x06header\x18\x0f \x01(\x0b\x32\x1e.temporal.api.common.v1.Header\x12*\n\x04memo\x18\x10 \x01(\x0b\x32\x1c.temporal.api.common.v1.Memo\x12\x43\n\x11search_attributes\x18\x11 \x01(\x0b\x32(.temporal.api.common.v1.SearchAttributes\x12\x1e\n\x16use_compatible_version\x18\x13 \x01(\x08\"\xd2\x02\n0StartChildWorkflowExecutionFailedEventAttributes\x12\x11\n\tnamespace\x18\x01 \x01(\t\x12\x14\n\x0cnamespace_id\x18\x08 \x01(\t\x12\x13\n\x0bworkflow_id\x18\x02 \x01(\t\x12;\n\rworkflow_type\x18\x03 \x01(\x0b\x32$.temporal.api.common.v1.WorkflowType\x12L\n\x05\x63\x61use\x18\x04 \x01(\x0e\x32=.temporal.api.enums.v1.StartChildWorkflowExecutionFailedCause\x12\x0f\n\x07\x63ontrol\x18\x05 \x01(\t\x12\x1a\n\x12initiated_event_id\x18\x06 \x01(\x03\x12(\n workflow_task_completed_event_id\x18\x07 \x01(\x03\"\xa7\x02\n,ChildWorkflowExecutionStartedEventAttributes\x12\x11\n\tnamespace\x18\x01 \x01(\t\x12\x14\n\x0cnamespace_id\x18\x06 \x01(\t\x12\x1a\n\x12initiated_event_id\x18\x02 \x01(\x03\x12\x45\n\x12workflow_execution\x18\x03 \x01(\x0b\x32).temporal.api.common.v1.WorkflowExecution\x12;\n\rworkflow_type\x18\x04 \x01(\x0b\x32$.temporal.api.common.v1.WorkflowType\x12.\n\x06header\x18\x05 \x01(\x0b\x32\x1e.temporal.api.common.v1.Header\"\xc5\x02\n.ChildWorkflowExecutionCompletedEventAttributes\x12\x30\n\x06result\x18\x01 \x01(\x0b\x32 .temporal.api.common.v1.Payloads\x12\x11\n\tnamespace\x18\x02 \x01(\t\x12\x14\n\x0cnamespace_id\x18\x07 \x01(\t\x12\x45\n\x12workflow_execution\x18\x03 \x01(\x0b\x32).temporal.api.common.v1.WorkflowExecution\x12;\n\rworkflow_type\x18\x04 \x01(\x0b\x32$.temporal.api.common.v1.WorkflowType\x12\x1a\n\x12initiated_event_id\x18\x05 \x01(\x03\x12\x18\n\x10started_event_id\x18\x06 \x01(\x03\"\xfb\x02\n+ChildWorkflowExecutionFailedEventAttributes\x12\x31\n\x07\x66\x61ilure\x18\x01 \x01(\x0b\x32 .temporal.api.failure.v1.Failure\x12\x11\n\tnamespace\x18\x02 \x01(\t\x12\x14\n\x0cnamespace_id\x18\x08 \x01(\t\x12\x45\n\x12workflow_execution\x18\x03 \x01(\x0b\x32).temporal.api.common.v1.WorkflowExecution\x12;\n\rworkflow_type\x18\x04 \x01(\x0b\x32$.temporal.api.common.v1.WorkflowType\x12\x1a\n\x12initiated_event_id\x18\x05 \x01(\x03\x12\x18\n\x10started_event_id\x18\x06 \x01(\x03\x12\x36\n\x0bretry_state\x18\x07 \x01(\x0e\x32!.temporal.api.enums.v1.RetryState\"\xc5\x02\n-ChildWorkflowExecutionCanceledEventAttributes\x12\x31\n\x07\x64\x65tails\x18\x01 \x01(\x0b\x32 .temporal.api.common.v1.Payloads\x12\x11\n\tnamespace\x18\x02 \x01(\t\x12\x14\n\x0cnamespace_id\x18\x07 \x01(\t\x12\x45\n\x12workflow_execution\x18\x03 \x01(\x0b\x32).temporal.api.common.v1.WorkflowExecution\x12;\n\rworkflow_type\x18\x04 \x01(\x0b\x32$.temporal.api.common.v1.WorkflowType\x12\x1a\n\x12initiated_event_id\x18\x05 \x01(\x03\x12\x18\n\x10started_event_id\x18\x06 \x01(\x03\"\xca\x02\n-ChildWorkflowExecutionTimedOutEventAttributes\x12\x11\n\tnamespace\x18\x01 \x01(\t\x12\x14\n\x0cnamespace_id\x18\x07 \x01(\t\x12\x45\n\x12workflow_execution\x18\x02 \x01(\x0b\x32).temporal.api.common.v1.WorkflowExecution\x12;\n\rworkflow_type\x18\x03 \x01(\x0b\x32$.temporal.api.common.v1.WorkflowType\x12\x1a\n\x12initiated_event_id\x18\x04 \x01(\x03\x12\x18\n\x10started_event_id\x18\x05 \x01(\x03\x12\x36\n\x0bretry_state\x18\x06 \x01(\x0e\x32!.temporal.api.enums.v1.RetryState\"\x94\x02\n/ChildWorkflowExecutionTerminatedEventAttributes\x12\x11\n\tnamespace\x18\x01 \x01(\t\x12\x14\n\x0cnamespace_id\x18\x06 \x01(\t\x12\x45\n\x12workflow_execution\x18\x02 \x01(\x0b\x32).temporal.api.common.v1.WorkflowExecution\x12;\n\rworkflow_type\x18\x03 \x01(\x0b\x32$.temporal.api.common.v1.WorkflowType\x12\x1a\n\x12initiated_event_id\x18\x04 \x01(\x03\x12\x18\n\x10started_event_id\x18\x05 \x01(\x03\"\xc0\x02\n3WorkflowPropertiesModifiedExternallyEventAttributes\x12\x16\n\x0enew_task_queue\x18\x01 \x01(\t\x12<\n\x19new_workflow_task_timeout\x18\x02 \x01(\x0b\x32\x19.google.protobuf.Duration\x12;\n\x18new_workflow_run_timeout\x18\x03 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x41\n\x1enew_workflow_execution_timeout\x18\x04 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x33\n\rupserted_memo\x18\x05 \x01(\x0b\x32\x1c.temporal.api.common.v1.Memo\"\x90\x01\n3ActivityPropertiesModifiedExternallyEventAttributes\x12\x1a\n\x12scheduled_event_id\x18\x01 \x01(\x03\x12=\n\x10new_retry_policy\x18\x02 \x01(\x0b\x32#.temporal.api.common.v1.RetryPolicy\"\xdc\x01\n.WorkflowExecutionUpdateAcceptedEventAttributes\x12\x1c\n\x14protocol_instance_id\x18\x01 \x01(\t\x12#\n\x1b\x61\x63\x63\x65pted_request_message_id\x18\x02 \x01(\t\x12,\n$accepted_request_sequencing_event_id\x18\x03 \x01(\x03\x12\x39\n\x10\x61\x63\x63\x65pted_request\x18\x04 \x01(\x0b\x32\x1f.temporal.api.update.v1.Request\"\xaa\x01\n/WorkflowExecutionUpdateCompletedEventAttributes\x12*\n\x04meta\x18\x01 \x01(\x0b\x32\x1c.temporal.api.update.v1.Meta\x12\x19\n\x11\x61\x63\x63\x65pted_event_id\x18\x03 \x01(\x03\x12\x30\n\x07outcome\x18\x02 \x01(\x0b\x32\x1f.temporal.api.update.v1.Outcome\"\x8f\x02\n.WorkflowExecutionUpdateRejectedEventAttributes\x12\x1c\n\x14protocol_instance_id\x18\x01 \x01(\t\x12#\n\x1brejected_request_message_id\x18\x02 \x01(\t\x12,\n$rejected_request_sequencing_event_id\x18\x03 \x01(\x03\x12\x39\n\x10rejected_request\x18\x04 \x01(\x0b\x32\x1f.temporal.api.update.v1.Request\x12\x31\n\x07\x66\x61ilure\x18\x05 \x01(\x0b\x32 .temporal.api.failure.v1.Failure\"\xa6\x01\n/WorkflowExecutionUpdateRequestedEventAttributes\x12\x30\n\x07request\x18\x01 \x01(\x0b\x32\x1f.temporal.api.update.v1.Request\x12\x41\n\x06origin\x18\x02 \x01(\x0e\x32\x31.temporal.api.enums.v1.UpdateRequestedEventOrigin\"\xea\x30\n\x0cHistoryEvent\x12\x10\n\x08\x65vent_id\x18\x01 \x01(\x03\x12.\n\nevent_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x34\n\nevent_type\x18\x03 \x01(\x0e\x32 .temporal.api.enums.v1.EventType\x12\x0f\n\x07version\x18\x04 \x01(\x03\x12\x0f\n\x07task_id\x18\x05 \x01(\x03\x12\x1a\n\x11worker_may_ignore\x18\xac\x02 \x01(\x08\x12w\n+workflow_execution_started_event_attributes\x18\x06 \x01(\x0b\x32@.temporal.api.history.v1.WorkflowExecutionStartedEventAttributesH\x00\x12{\n-workflow_execution_completed_event_attributes\x18\x07 \x01(\x0b\x32\x42.temporal.api.history.v1.WorkflowExecutionCompletedEventAttributesH\x00\x12u\n*workflow_execution_failed_event_attributes\x18\x08 \x01(\x0b\x32?.temporal.api.history.v1.WorkflowExecutionFailedEventAttributesH\x00\x12z\n-workflow_execution_timed_out_event_attributes\x18\t \x01(\x0b\x32\x41.temporal.api.history.v1.WorkflowExecutionTimedOutEventAttributesH\x00\x12q\n(workflow_task_scheduled_event_attributes\x18\n \x01(\x0b\x32=.temporal.api.history.v1.WorkflowTaskScheduledEventAttributesH\x00\x12m\n&workflow_task_started_event_attributes\x18\x0b \x01(\x0b\x32;.temporal.api.history.v1.WorkflowTaskStartedEventAttributesH\x00\x12q\n(workflow_task_completed_event_attributes\x18\x0c \x01(\x0b\x32=.temporal.api.history.v1.WorkflowTaskCompletedEventAttributesH\x00\x12p\n(workflow_task_timed_out_event_attributes\x18\r \x01(\x0b\x32<.temporal.api.history.v1.WorkflowTaskTimedOutEventAttributesH\x00\x12k\n%workflow_task_failed_event_attributes\x18\x0e \x01(\x0b\x32:.temporal.api.history.v1.WorkflowTaskFailedEventAttributesH\x00\x12q\n(activity_task_scheduled_event_attributes\x18\x0f \x01(\x0b\x32=.temporal.api.history.v1.ActivityTaskScheduledEventAttributesH\x00\x12m\n&activity_task_started_event_attributes\x18\x10 \x01(\x0b\x32;.temporal.api.history.v1.ActivityTaskStartedEventAttributesH\x00\x12q\n(activity_task_completed_event_attributes\x18\x11 \x01(\x0b\x32=.temporal.api.history.v1.ActivityTaskCompletedEventAttributesH\x00\x12k\n%activity_task_failed_event_attributes\x18\x12 \x01(\x0b\x32:.temporal.api.history.v1.ActivityTaskFailedEventAttributesH\x00\x12p\n(activity_task_timed_out_event_attributes\x18\x13 \x01(\x0b\x32<.temporal.api.history.v1.ActivityTaskTimedOutEventAttributesH\x00\x12^\n\x1etimer_started_event_attributes\x18\x14 \x01(\x0b\x32\x34.temporal.api.history.v1.TimerStartedEventAttributesH\x00\x12Z\n\x1ctimer_fired_event_attributes\x18\x15 \x01(\x0b\x32\x32.temporal.api.history.v1.TimerFiredEventAttributesH\x00\x12~\n/activity_task_cancel_requested_event_attributes\x18\x16 \x01(\x0b\x32\x43.temporal.api.history.v1.ActivityTaskCancelRequestedEventAttributesH\x00\x12o\n\'activity_task_canceled_event_attributes\x18\x17 \x01(\x0b\x32<.temporal.api.history.v1.ActivityTaskCanceledEventAttributesH\x00\x12`\n\x1ftimer_canceled_event_attributes\x18\x18 \x01(\x0b\x32\x35.temporal.api.history.v1.TimerCanceledEventAttributesH\x00\x12\x62\n marker_recorded_event_attributes\x18\x19 \x01(\x0b\x32\x36.temporal.api.history.v1.MarkerRecordedEventAttributesH\x00\x12y\n,workflow_execution_signaled_event_attributes\x18\x1a \x01(\x0b\x32\x41.temporal.api.history.v1.WorkflowExecutionSignaledEventAttributesH\x00\x12}\n.workflow_execution_terminated_event_attributes\x18\x1b \x01(\x0b\x32\x43.temporal.api.history.v1.WorkflowExecutionTerminatedEventAttributesH\x00\x12\x88\x01\n4workflow_execution_cancel_requested_event_attributes\x18\x1c \x01(\x0b\x32H.temporal.api.history.v1.WorkflowExecutionCancelRequestedEventAttributesH\x00\x12y\n,workflow_execution_canceled_event_attributes\x18\x1d \x01(\x0b\x32\x41.temporal.api.history.v1.WorkflowExecutionCanceledEventAttributesH\x00\x12\xa8\x01\nErequest_cancel_external_workflow_execution_initiated_event_attributes\x18\x1e \x01(\x0b\x32W.temporal.api.history.v1.RequestCancelExternalWorkflowExecutionInitiatedEventAttributesH\x00\x12\xa2\x01\nBrequest_cancel_external_workflow_execution_failed_event_attributes\x18\x1f \x01(\x0b\x32T.temporal.api.history.v1.RequestCancelExternalWorkflowExecutionFailedEventAttributesH\x00\x12\x99\x01\n=external_workflow_execution_cancel_requested_event_attributes\x18 \x01(\x0b\x32P.temporal.api.history.v1.ExternalWorkflowExecutionCancelRequestedEventAttributesH\x00\x12\x87\x01\n4workflow_execution_continued_as_new_event_attributes\x18! \x01(\x0b\x32G.temporal.api.history.v1.WorkflowExecutionContinuedAsNewEventAttributesH\x00\x12\x91\x01\n9start_child_workflow_execution_initiated_event_attributes\x18\" \x01(\x0b\x32L.temporal.api.history.v1.StartChildWorkflowExecutionInitiatedEventAttributesH\x00\x12\x8b\x01\n6start_child_workflow_execution_failed_event_attributes\x18# \x01(\x0b\x32I.temporal.api.history.v1.StartChildWorkflowExecutionFailedEventAttributesH\x00\x12\x82\x01\n1child_workflow_execution_started_event_attributes\x18$ \x01(\x0b\x32\x45.temporal.api.history.v1.ChildWorkflowExecutionStartedEventAttributesH\x00\x12\x86\x01\n3child_workflow_execution_completed_event_attributes\x18% \x01(\x0b\x32G.temporal.api.history.v1.ChildWorkflowExecutionCompletedEventAttributesH\x00\x12\x80\x01\n0child_workflow_execution_failed_event_attributes\x18& \x01(\x0b\x32\x44.temporal.api.history.v1.ChildWorkflowExecutionFailedEventAttributesH\x00\x12\x84\x01\n2child_workflow_execution_canceled_event_attributes\x18\' \x01(\x0b\x32\x46.temporal.api.history.v1.ChildWorkflowExecutionCanceledEventAttributesH\x00\x12\x85\x01\n3child_workflow_execution_timed_out_event_attributes\x18( \x01(\x0b\x32\x46.temporal.api.history.v1.ChildWorkflowExecutionTimedOutEventAttributesH\x00\x12\x88\x01\n4child_workflow_execution_terminated_event_attributes\x18) \x01(\x0b\x32H.temporal.api.history.v1.ChildWorkflowExecutionTerminatedEventAttributesH\x00\x12\x99\x01\n=signal_external_workflow_execution_initiated_event_attributes\x18* \x01(\x0b\x32P.temporal.api.history.v1.SignalExternalWorkflowExecutionInitiatedEventAttributesH\x00\x12\x93\x01\n:signal_external_workflow_execution_failed_event_attributes\x18+ \x01(\x0b\x32M.temporal.api.history.v1.SignalExternalWorkflowExecutionFailedEventAttributesH\x00\x12\x8a\x01\n5external_workflow_execution_signaled_event_attributes\x18, \x01(\x0b\x32I.temporal.api.history.v1.ExternalWorkflowExecutionSignaledEventAttributesH\x00\x12\x84\x01\n2upsert_workflow_search_attributes_event_attributes\x18- \x01(\x0b\x32\x46.temporal.api.history.v1.UpsertWorkflowSearchAttributesEventAttributesH\x00\x12\x86\x01\n3workflow_execution_update_accepted_event_attributes\x18. \x01(\x0b\x32G.temporal.api.history.v1.WorkflowExecutionUpdateAcceptedEventAttributesH\x00\x12\x86\x01\n3workflow_execution_update_rejected_event_attributes\x18/ \x01(\x0b\x32G.temporal.api.history.v1.WorkflowExecutionUpdateRejectedEventAttributesH\x00\x12\x88\x01\n4workflow_execution_update_completed_event_attributes\x18\x30 \x01(\x0b\x32H.temporal.api.history.v1.WorkflowExecutionUpdateCompletedEventAttributesH\x00\x12\x90\x01\n8workflow_properties_modified_externally_event_attributes\x18\x31 \x01(\x0b\x32L.temporal.api.history.v1.WorkflowPropertiesModifiedExternallyEventAttributesH\x00\x12\x90\x01\n8activity_properties_modified_externally_event_attributes\x18\x32 \x01(\x0b\x32L.temporal.api.history.v1.ActivityPropertiesModifiedExternallyEventAttributesH\x00\x12{\n-workflow_properties_modified_event_attributes\x18\x33 \x01(\x0b\x32\x42.temporal.api.history.v1.WorkflowPropertiesModifiedEventAttributesH\x00\x12\x88\x01\n4workflow_execution_update_requested_event_attributes\x18\x34 \x01(\x0b\x32H.temporal.api.history.v1.WorkflowExecutionUpdateRequestedEventAttributesH\x00\x42\x0c\n\nattributes\"@\n\x07History\x12\x35\n\x06\x65vents\x18\x01 \x03(\x0b\x32%.temporal.api.history.v1.HistoryEventB\x8e\x01\n\x1aio.temporal.api.history.v1B\x0cMessageProtoP\x01Z%go.temporal.io/api/history/v1;history\xaa\x02\x19Temporalio.Api.History.V1\xea\x02\x1cTemporalio::Api::History::V1b\x06proto3" + +pool = Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Temporalio + module Api + module History + module V1 + WorkflowExecutionStartedEventAttributes = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("temporal.api.history.v1.WorkflowExecutionStartedEventAttributes").msgclass + WorkflowExecutionCompletedEventAttributes = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("temporal.api.history.v1.WorkflowExecutionCompletedEventAttributes").msgclass + WorkflowExecutionFailedEventAttributes = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("temporal.api.history.v1.WorkflowExecutionFailedEventAttributes").msgclass + WorkflowExecutionTimedOutEventAttributes = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("temporal.api.history.v1.WorkflowExecutionTimedOutEventAttributes").msgclass + WorkflowExecutionContinuedAsNewEventAttributes = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("temporal.api.history.v1.WorkflowExecutionContinuedAsNewEventAttributes").msgclass + WorkflowTaskScheduledEventAttributes = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("temporal.api.history.v1.WorkflowTaskScheduledEventAttributes").msgclass + WorkflowTaskStartedEventAttributes = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("temporal.api.history.v1.WorkflowTaskStartedEventAttributes").msgclass + WorkflowTaskCompletedEventAttributes = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("temporal.api.history.v1.WorkflowTaskCompletedEventAttributes").msgclass + WorkflowTaskTimedOutEventAttributes = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("temporal.api.history.v1.WorkflowTaskTimedOutEventAttributes").msgclass + WorkflowTaskFailedEventAttributes = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("temporal.api.history.v1.WorkflowTaskFailedEventAttributes").msgclass + ActivityTaskScheduledEventAttributes = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("temporal.api.history.v1.ActivityTaskScheduledEventAttributes").msgclass + ActivityTaskStartedEventAttributes = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("temporal.api.history.v1.ActivityTaskStartedEventAttributes").msgclass + ActivityTaskCompletedEventAttributes = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("temporal.api.history.v1.ActivityTaskCompletedEventAttributes").msgclass + ActivityTaskFailedEventAttributes = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("temporal.api.history.v1.ActivityTaskFailedEventAttributes").msgclass + ActivityTaskTimedOutEventAttributes = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("temporal.api.history.v1.ActivityTaskTimedOutEventAttributes").msgclass + ActivityTaskCancelRequestedEventAttributes = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("temporal.api.history.v1.ActivityTaskCancelRequestedEventAttributes").msgclass + ActivityTaskCanceledEventAttributes = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("temporal.api.history.v1.ActivityTaskCanceledEventAttributes").msgclass + TimerStartedEventAttributes = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("temporal.api.history.v1.TimerStartedEventAttributes").msgclass + TimerFiredEventAttributes = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("temporal.api.history.v1.TimerFiredEventAttributes").msgclass + TimerCanceledEventAttributes = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("temporal.api.history.v1.TimerCanceledEventAttributes").msgclass + WorkflowExecutionCancelRequestedEventAttributes = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("temporal.api.history.v1.WorkflowExecutionCancelRequestedEventAttributes").msgclass + WorkflowExecutionCanceledEventAttributes = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("temporal.api.history.v1.WorkflowExecutionCanceledEventAttributes").msgclass + MarkerRecordedEventAttributes = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("temporal.api.history.v1.MarkerRecordedEventAttributes").msgclass + WorkflowExecutionSignaledEventAttributes = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("temporal.api.history.v1.WorkflowExecutionSignaledEventAttributes").msgclass + WorkflowExecutionTerminatedEventAttributes = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("temporal.api.history.v1.WorkflowExecutionTerminatedEventAttributes").msgclass + RequestCancelExternalWorkflowExecutionInitiatedEventAttributes = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("temporal.api.history.v1.RequestCancelExternalWorkflowExecutionInitiatedEventAttributes").msgclass + RequestCancelExternalWorkflowExecutionFailedEventAttributes = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("temporal.api.history.v1.RequestCancelExternalWorkflowExecutionFailedEventAttributes").msgclass + ExternalWorkflowExecutionCancelRequestedEventAttributes = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("temporal.api.history.v1.ExternalWorkflowExecutionCancelRequestedEventAttributes").msgclass + SignalExternalWorkflowExecutionInitiatedEventAttributes = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("temporal.api.history.v1.SignalExternalWorkflowExecutionInitiatedEventAttributes").msgclass + SignalExternalWorkflowExecutionFailedEventAttributes = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("temporal.api.history.v1.SignalExternalWorkflowExecutionFailedEventAttributes").msgclass + ExternalWorkflowExecutionSignaledEventAttributes = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("temporal.api.history.v1.ExternalWorkflowExecutionSignaledEventAttributes").msgclass + UpsertWorkflowSearchAttributesEventAttributes = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("temporal.api.history.v1.UpsertWorkflowSearchAttributesEventAttributes").msgclass + WorkflowPropertiesModifiedEventAttributes = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("temporal.api.history.v1.WorkflowPropertiesModifiedEventAttributes").msgclass + StartChildWorkflowExecutionInitiatedEventAttributes = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("temporal.api.history.v1.StartChildWorkflowExecutionInitiatedEventAttributes").msgclass + StartChildWorkflowExecutionFailedEventAttributes = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("temporal.api.history.v1.StartChildWorkflowExecutionFailedEventAttributes").msgclass + ChildWorkflowExecutionStartedEventAttributes = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("temporal.api.history.v1.ChildWorkflowExecutionStartedEventAttributes").msgclass + ChildWorkflowExecutionCompletedEventAttributes = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("temporal.api.history.v1.ChildWorkflowExecutionCompletedEventAttributes").msgclass + ChildWorkflowExecutionFailedEventAttributes = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("temporal.api.history.v1.ChildWorkflowExecutionFailedEventAttributes").msgclass + ChildWorkflowExecutionCanceledEventAttributes = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("temporal.api.history.v1.ChildWorkflowExecutionCanceledEventAttributes").msgclass + ChildWorkflowExecutionTimedOutEventAttributes = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("temporal.api.history.v1.ChildWorkflowExecutionTimedOutEventAttributes").msgclass + ChildWorkflowExecutionTerminatedEventAttributes = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("temporal.api.history.v1.ChildWorkflowExecutionTerminatedEventAttributes").msgclass + WorkflowPropertiesModifiedExternallyEventAttributes = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("temporal.api.history.v1.WorkflowPropertiesModifiedExternallyEventAttributes").msgclass + ActivityPropertiesModifiedExternallyEventAttributes = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("temporal.api.history.v1.ActivityPropertiesModifiedExternallyEventAttributes").msgclass + WorkflowExecutionUpdateAcceptedEventAttributes = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("temporal.api.history.v1.WorkflowExecutionUpdateAcceptedEventAttributes").msgclass + WorkflowExecutionUpdateCompletedEventAttributes = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("temporal.api.history.v1.WorkflowExecutionUpdateCompletedEventAttributes").msgclass + WorkflowExecutionUpdateRejectedEventAttributes = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("temporal.api.history.v1.WorkflowExecutionUpdateRejectedEventAttributes").msgclass + WorkflowExecutionUpdateRequestedEventAttributes = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("temporal.api.history.v1.WorkflowExecutionUpdateRequestedEventAttributes").msgclass + HistoryEvent = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("temporal.api.history.v1.HistoryEvent").msgclass + History = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("temporal.api.history.v1.History").msgclass + end + end + end +end diff --git a/temporalio/lib/temporalio/api/namespace/v1/message.rb b/temporalio/lib/temporalio/api/namespace/v1/message.rb new file mode 100644 index 00000000..61f1d9af --- /dev/null +++ b/temporalio/lib/temporalio/api/namespace/v1/message.rb @@ -0,0 +1,30 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: temporal/api/namespace/v1/message.proto + +require 'google/protobuf' + +require 'google/protobuf/duration_pb' +require 'google/protobuf/timestamp_pb' +require 'temporalio/api/enums/v1/namespace' + + +descriptor_data = "\n\'temporal/api/namespace/v1/message.proto\x12\x19temporal.api.namespace.v1\x1a\x1egoogle/protobuf/duration.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a%temporal/api/enums/v1/namespace.proto\"\x94\x02\n\rNamespaceInfo\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x34\n\x05state\x18\x02 \x01(\x0e\x32%.temporal.api.enums.v1.NamespaceState\x12\x13\n\x0b\x64\x65scription\x18\x03 \x01(\t\x12\x13\n\x0bowner_email\x18\x04 \x01(\t\x12@\n\x04\x64\x61ta\x18\x05 \x03(\x0b\x32\x32.temporal.api.namespace.v1.NamespaceInfo.DataEntry\x12\n\n\x02id\x18\x06 \x01(\t\x12\x1a\n\x12supports_schedules\x18\x64 \x01(\x08\x1a+\n\tDataEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\x9e\x04\n\x0fNamespaceConfig\x12\x43\n workflow_execution_retention_ttl\x18\x01 \x01(\x0b\x32\x19.google.protobuf.Duration\x12<\n\x0c\x62\x61\x64_binaries\x18\x02 \x01(\x0b\x32&.temporal.api.namespace.v1.BadBinaries\x12\x44\n\x16history_archival_state\x18\x03 \x01(\x0e\x32$.temporal.api.enums.v1.ArchivalState\x12\x1c\n\x14history_archival_uri\x18\x04 \x01(\t\x12G\n\x19visibility_archival_state\x18\x05 \x01(\x0e\x32$.temporal.api.enums.v1.ArchivalState\x12\x1f\n\x17visibility_archival_uri\x18\x06 \x01(\t\x12u\n\x1f\x63ustom_search_attribute_aliases\x18\x07 \x03(\x0b\x32L.temporal.api.namespace.v1.NamespaceConfig.CustomSearchAttributeAliasesEntry\x1a\x43\n!CustomSearchAttributeAliasesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\xb0\x01\n\x0b\x42\x61\x64\x42inaries\x12\x46\n\x08\x62inaries\x18\x01 \x03(\x0b\x32\x34.temporal.api.namespace.v1.BadBinaries.BinariesEntry\x1aY\n\rBinariesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x37\n\x05value\x18\x02 \x01(\x0b\x32(.temporal.api.namespace.v1.BadBinaryInfo:\x02\x38\x01\"b\n\rBadBinaryInfo\x12\x0e\n\x06reason\x18\x01 \x01(\t\x12\x10\n\x08operator\x18\x02 \x01(\t\x12/\n\x0b\x63reate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\"\xea\x01\n\x13UpdateNamespaceInfo\x12\x13\n\x0b\x64\x65scription\x18\x01 \x01(\t\x12\x13\n\x0bowner_email\x18\x02 \x01(\t\x12\x46\n\x04\x64\x61ta\x18\x03 \x03(\x0b\x32\x38.temporal.api.namespace.v1.UpdateNamespaceInfo.DataEntry\x12\x34\n\x05state\x18\x04 \x01(\x0e\x32%.temporal.api.enums.v1.NamespaceState\x1a+\n\tDataEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"*\n\x0fNamespaceFilter\x12\x17\n\x0finclude_deleted\x18\x01 \x01(\x08\x42\x98\x01\n\x1cio.temporal.api.namespace.v1B\x0cMessageProtoP\x01Z)go.temporal.io/api/namespace/v1;namespace\xaa\x02\x1bTemporalio.Api.Namespace.V1\xea\x02\x1eTemporalio::Api::Namespace::V1b\x06proto3" + +pool = Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Temporalio + module Api + module Namespace + module V1 + NamespaceInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("temporal.api.namespace.v1.NamespaceInfo").msgclass + NamespaceConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("temporal.api.namespace.v1.NamespaceConfig").msgclass + BadBinaries = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("temporal.api.namespace.v1.BadBinaries").msgclass + BadBinaryInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("temporal.api.namespace.v1.BadBinaryInfo").msgclass + UpdateNamespaceInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("temporal.api.namespace.v1.UpdateNamespaceInfo").msgclass + NamespaceFilter = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("temporal.api.namespace.v1.NamespaceFilter").msgclass + end + end + end +end diff --git a/temporalio/lib/temporalio/api/operatorservice.rb b/temporalio/lib/temporalio/api/operatorservice.rb new file mode 100644 index 00000000..768e87b3 --- /dev/null +++ b/temporalio/lib/temporalio/api/operatorservice.rb @@ -0,0 +1,3 @@ +# frozen_string_literal: true + +require 'temporalio/api/operatorservice/v1/service' diff --git a/temporalio/lib/temporalio/api/operatorservice/v1/request_response.rb b/temporalio/lib/temporalio/api/operatorservice/v1/request_response.rb new file mode 100644 index 00000000..65a9c484 --- /dev/null +++ b/temporalio/lib/temporalio/api/operatorservice/v1/request_response.rb @@ -0,0 +1,37 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: temporal/api/operatorservice/v1/request_response.proto + +require 'google/protobuf' + +require 'temporalio/api/enums/v1/common' + + +descriptor_data = "\n6temporal/api/operatorservice/v1/request_response.proto\x12\x1ftemporal.api.operatorservice.v1\x1a\"temporal/api/enums/v1/common.proto\"\xff\x01\n\x1a\x41\x64\x64SearchAttributesRequest\x12l\n\x11search_attributes\x18\x01 \x03(\x0b\x32Q.temporal.api.operatorservice.v1.AddSearchAttributesRequest.SearchAttributesEntry\x12\x11\n\tnamespace\x18\x02 \x01(\t\x1a`\n\x15SearchAttributesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x36\n\x05value\x18\x02 \x01(\x0e\x32\'.temporal.api.enums.v1.IndexedValueType:\x02\x38\x01\"\x1d\n\x1b\x41\x64\x64SearchAttributesResponse\"M\n\x1dRemoveSearchAttributesRequest\x12\x19\n\x11search_attributes\x18\x01 \x03(\t\x12\x11\n\tnamespace\x18\x02 \x01(\t\" \n\x1eRemoveSearchAttributesResponse\"0\n\x1bListSearchAttributesRequest\x12\x11\n\tnamespace\x18\x01 \x01(\t\"\xe2\x04\n\x1cListSearchAttributesResponse\x12n\n\x11\x63ustom_attributes\x18\x01 \x03(\x0b\x32S.temporal.api.operatorservice.v1.ListSearchAttributesResponse.CustomAttributesEntry\x12n\n\x11system_attributes\x18\x02 \x03(\x0b\x32S.temporal.api.operatorservice.v1.ListSearchAttributesResponse.SystemAttributesEntry\x12h\n\x0estorage_schema\x18\x03 \x03(\x0b\x32P.temporal.api.operatorservice.v1.ListSearchAttributesResponse.StorageSchemaEntry\x1a`\n\x15\x43ustomAttributesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x36\n\x05value\x18\x02 \x01(\x0e\x32\'.temporal.api.enums.v1.IndexedValueType:\x02\x38\x01\x1a`\n\x15SystemAttributesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x36\n\x05value\x18\x02 \x01(\x0e\x32\'.temporal.api.enums.v1.IndexedValueType:\x02\x38\x01\x1a\x34\n\x12StorageSchemaEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"A\n\x16\x44\x65leteNamespaceRequest\x12\x11\n\tnamespace\x18\x01 \x01(\t\x12\x14\n\x0cnamespace_id\x18\x02 \x01(\t\"4\n\x17\x44\x65leteNamespaceResponse\x12\x19\n\x11\x64\x65leted_namespace\x18\x01 \x01(\t\"e\n\x1f\x41\x64\x64OrUpdateRemoteClusterRequest\x12\x18\n\x10\x66rontend_address\x18\x01 \x01(\t\x12(\n enable_remote_cluster_connection\x18\x02 \x01(\x08\"\"\n AddOrUpdateRemoteClusterResponse\"2\n\x1aRemoveRemoteClusterRequest\x12\x14\n\x0c\x63luster_name\x18\x01 \x01(\t\"\x1d\n\x1bRemoveRemoteClusterResponse\"A\n\x13ListClustersRequest\x12\x11\n\tpage_size\x18\x01 \x01(\x05\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\x0c\"s\n\x14ListClustersResponse\x12\x42\n\x08\x63lusters\x18\x01 \x03(\x0b\x32\x30.temporal.api.operatorservice.v1.ClusterMetadata\x12\x17\n\x0fnext_page_token\x18\x04 \x01(\x0c\"\xaa\x01\n\x0f\x43lusterMetadata\x12\x14\n\x0c\x63luster_name\x18\x01 \x01(\t\x12\x12\n\ncluster_id\x18\x02 \x01(\t\x12\x0f\n\x07\x61\x64\x64ress\x18\x03 \x01(\t\x12 \n\x18initial_failover_version\x18\x04 \x01(\x03\x12\x1b\n\x13history_shard_count\x18\x05 \x01(\x05\x12\x1d\n\x15is_connection_enabled\x18\x06 \x01(\x08\x42\xbe\x01\n\"io.temporal.api.operatorservice.v1B\x14RequestResponseProtoP\x01Z5go.temporal.io/api/operatorservice/v1;operatorservice\xaa\x02!Temporalio.Api.OperatorService.V1\xea\x02$Temporalio::Api::OperatorService::V1b\x06proto3" + +pool = Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Temporalio + module Api + module OperatorService + module V1 + AddSearchAttributesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("temporal.api.operatorservice.v1.AddSearchAttributesRequest").msgclass + AddSearchAttributesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("temporal.api.operatorservice.v1.AddSearchAttributesResponse").msgclass + RemoveSearchAttributesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("temporal.api.operatorservice.v1.RemoveSearchAttributesRequest").msgclass + RemoveSearchAttributesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("temporal.api.operatorservice.v1.RemoveSearchAttributesResponse").msgclass + ListSearchAttributesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("temporal.api.operatorservice.v1.ListSearchAttributesRequest").msgclass + ListSearchAttributesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("temporal.api.operatorservice.v1.ListSearchAttributesResponse").msgclass + DeleteNamespaceRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("temporal.api.operatorservice.v1.DeleteNamespaceRequest").msgclass + DeleteNamespaceResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("temporal.api.operatorservice.v1.DeleteNamespaceResponse").msgclass + AddOrUpdateRemoteClusterRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("temporal.api.operatorservice.v1.AddOrUpdateRemoteClusterRequest").msgclass + AddOrUpdateRemoteClusterResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("temporal.api.operatorservice.v1.AddOrUpdateRemoteClusterResponse").msgclass + RemoveRemoteClusterRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("temporal.api.operatorservice.v1.RemoveRemoteClusterRequest").msgclass + RemoveRemoteClusterResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("temporal.api.operatorservice.v1.RemoveRemoteClusterResponse").msgclass + ListClustersRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("temporal.api.operatorservice.v1.ListClustersRequest").msgclass + ListClustersResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("temporal.api.operatorservice.v1.ListClustersResponse").msgclass + ClusterMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("temporal.api.operatorservice.v1.ClusterMetadata").msgclass + end + end + end +end diff --git a/temporalio/lib/temporalio/api/operatorservice/v1/service.rb b/temporalio/lib/temporalio/api/operatorservice/v1/service.rb new file mode 100644 index 00000000..e071f220 --- /dev/null +++ b/temporalio/lib/temporalio/api/operatorservice/v1/service.rb @@ -0,0 +1,23 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: temporal/api/operatorservice/v1/service.proto + +require 'google/protobuf' + +require 'temporalio/api/operatorservice/v1/request_response' +require 'google/api/annotations_pb' + + +descriptor_data = "\n-temporal/api/operatorservice/v1/service.proto\x12\x1ftemporal.api.operatorservice.v1\x1a\x36temporal/api/operatorservice/v1/request_response.proto\x1a\x1cgoogle/api/annotations.proto2\xd5\x08\n\x0fOperatorService\x12\x92\x01\n\x13\x41\x64\x64SearchAttributes\x12;.temporal.api.operatorservice.v1.AddSearchAttributesRequest\x1a<.temporal.api.operatorservice.v1.AddSearchAttributesResponse\"\x00\x12\x9b\x01\n\x16RemoveSearchAttributes\x12>.temporal.api.operatorservice.v1.RemoveSearchAttributesRequest\x1a?.temporal.api.operatorservice.v1.RemoveSearchAttributesResponse\"\x00\x12\xcd\x01\n\x14ListSearchAttributes\x12<.temporal.api.operatorservice.v1.ListSearchAttributesRequest\x1a=.temporal.api.operatorservice.v1.ListSearchAttributesResponse\"8\x82\xd3\xe4\x93\x02\x32\x12\x30/api/v1/namespaces/{namespace}/search-attributes\x12\x86\x01\n\x0f\x44\x65leteNamespace\x12\x37.temporal.api.operatorservice.v1.DeleteNamespaceRequest\x1a\x38.temporal.api.operatorservice.v1.DeleteNamespaceResponse\"\x00\x12\xa1\x01\n\x18\x41\x64\x64OrUpdateRemoteCluster\x12@.temporal.api.operatorservice.v1.AddOrUpdateRemoteClusterRequest\x1a\x41.temporal.api.operatorservice.v1.AddOrUpdateRemoteClusterResponse\"\x00\x12\x92\x01\n\x13RemoveRemoteCluster\x12;.temporal.api.operatorservice.v1.RemoveRemoteClusterRequest\x1a<.temporal.api.operatorservice.v1.RemoveRemoteClusterResponse\"\x00\x12}\n\x0cListClusters\x12\x34.temporal.api.operatorservice.v1.ListClustersRequest\x1a\x35.temporal.api.operatorservice.v1.ListClustersResponse\"\x00\x42\xb6\x01\n\"io.temporal.api.operatorservice.v1B\x0cServiceProtoP\x01Z5go.temporal.io/api/operatorservice/v1;operatorservice\xaa\x02!Temporalio.Api.OperatorService.V1\xea\x02$Temporalio::Api::OperatorService::V1b\x06proto3" + +pool = Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Temporalio + module Api + module OperatorService + module V1 + end + end + end +end diff --git a/temporalio/lib/temporalio/api/protocol/v1/message.rb b/temporalio/lib/temporalio/api/protocol/v1/message.rb new file mode 100644 index 00000000..e38bf818 --- /dev/null +++ b/temporalio/lib/temporalio/api/protocol/v1/message.rb @@ -0,0 +1,23 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: temporal/api/protocol/v1/message.proto + +require 'google/protobuf' + +require 'google/protobuf/any_pb' + + +descriptor_data = "\n&temporal/api/protocol/v1/message.proto\x12\x18temporal.api.protocol.v1\x1a\x19google/protobuf/any.proto\"\x95\x01\n\x07Message\x12\n\n\x02id\x18\x01 \x01(\t\x12\x1c\n\x14protocol_instance_id\x18\x02 \x01(\t\x12\x12\n\x08\x65vent_id\x18\x03 \x01(\x03H\x00\x12\x17\n\rcommand_index\x18\x04 \x01(\x03H\x00\x12\"\n\x04\x62ody\x18\x05 \x01(\x0b\x32\x14.google.protobuf.AnyB\x0f\n\rsequencing_idB\x93\x01\n\x1bio.temporal.api.protocol.v1B\x0cMessageProtoP\x01Z\'go.temporal.io/api/protocol/v1;protocol\xaa\x02\x1aTemporalio.Api.Protocol.V1\xea\x02\x1dTemporalio::Api::Protocol::V1b\x06proto3" + +pool = Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Temporalio + module Api + module Protocol + module V1 + Message = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("temporal.api.protocol.v1.Message").msgclass + end + end + end +end diff --git a/temporalio/lib/temporalio/api/query/v1/message.rb b/temporalio/lib/temporalio/api/query/v1/message.rb new file mode 100644 index 00000000..5a57f60a --- /dev/null +++ b/temporalio/lib/temporalio/api/query/v1/message.rb @@ -0,0 +1,27 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: temporal/api/query/v1/message.proto + +require 'google/protobuf' + +require 'temporalio/api/enums/v1/query' +require 'temporalio/api/enums/v1/workflow' +require 'temporalio/api/common/v1/message' + + +descriptor_data = "\n#temporal/api/query/v1/message.proto\x12\x15temporal.api.query.v1\x1a!temporal/api/enums/v1/query.proto\x1a$temporal/api/enums/v1/workflow.proto\x1a$temporal/api/common/v1/message.proto\"\x89\x01\n\rWorkflowQuery\x12\x12\n\nquery_type\x18\x01 \x01(\t\x12\x34\n\nquery_args\x18\x02 \x01(\x0b\x32 .temporal.api.common.v1.Payloads\x12.\n\x06header\x18\x03 \x01(\x0b\x32\x1e.temporal.api.common.v1.Header\"\x9b\x01\n\x13WorkflowQueryResult\x12;\n\x0bresult_type\x18\x01 \x01(\x0e\x32&.temporal.api.enums.v1.QueryResultType\x12\x30\n\x06\x61nswer\x18\x02 \x01(\x0b\x32 .temporal.api.common.v1.Payloads\x12\x15\n\rerror_message\x18\x03 \x01(\t\"O\n\rQueryRejected\x12>\n\x06status\x18\x01 \x01(\x0e\x32..temporal.api.enums.v1.WorkflowExecutionStatusB\x84\x01\n\x18io.temporal.api.query.v1B\x0cMessageProtoP\x01Z!go.temporal.io/api/query/v1;query\xaa\x02\x17Temporalio.Api.Query.V1\xea\x02\x1aTemporalio::Api::Query::V1b\x06proto3" + +pool = Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Temporalio + module Api + module Query + module V1 + WorkflowQuery = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("temporal.api.query.v1.WorkflowQuery").msgclass + WorkflowQueryResult = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("temporal.api.query.v1.WorkflowQueryResult").msgclass + QueryRejected = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("temporal.api.query.v1.QueryRejected").msgclass + end + end + end +end diff --git a/temporalio/lib/temporalio/api/replication/v1/message.rb b/temporalio/lib/temporalio/api/replication/v1/message.rb new file mode 100644 index 00000000..6b117dd6 --- /dev/null +++ b/temporalio/lib/temporalio/api/replication/v1/message.rb @@ -0,0 +1,26 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: temporal/api/replication/v1/message.proto + +require 'google/protobuf' + +require 'google/protobuf/timestamp_pb' +require 'temporalio/api/enums/v1/namespace' + + +descriptor_data = "\n)temporal/api/replication/v1/message.proto\x12\x1btemporal.api.replication.v1\x1a\x1fgoogle/protobuf/timestamp.proto\x1a%temporal/api/enums/v1/namespace.proto\"0\n\x18\x43lusterReplicationConfig\x12\x14\n\x0c\x63luster_name\x18\x01 \x01(\t\"\xba\x01\n\x1aNamespaceReplicationConfig\x12\x1b\n\x13\x61\x63tive_cluster_name\x18\x01 \x01(\t\x12G\n\x08\x63lusters\x18\x02 \x03(\x0b\x32\x35.temporal.api.replication.v1.ClusterReplicationConfig\x12\x36\n\x05state\x18\x03 \x01(\x0e\x32\'.temporal.api.enums.v1.ReplicationState\"]\n\x0e\x46\x61iloverStatus\x12\x31\n\rfailover_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x18\n\x10\x66\x61ilover_version\x18\x02 \x01(\x03\x42\xa2\x01\n\x1eio.temporal.api.replication.v1B\x0cMessageProtoP\x01Z-go.temporal.io/api/replication/v1;replication\xaa\x02\x1dTemporalio.Api.Replication.V1\xea\x02 Temporalio::Api::Replication::V1b\x06proto3" + +pool = Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Temporalio + module Api + module Replication + module V1 + ClusterReplicationConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("temporal.api.replication.v1.ClusterReplicationConfig").msgclass + NamespaceReplicationConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("temporal.api.replication.v1.NamespaceReplicationConfig").msgclass + FailoverStatus = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("temporal.api.replication.v1.FailoverStatus").msgclass + end + end + end +end diff --git a/temporalio/lib/temporalio/api/schedule/v1/message.rb b/temporalio/lib/temporalio/api/schedule/v1/message.rb new file mode 100644 index 00000000..e78593f5 --- /dev/null +++ b/temporalio/lib/temporalio/api/schedule/v1/message.rb @@ -0,0 +1,42 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: temporal/api/schedule/v1/message.proto + +require 'google/protobuf' + +require 'google/protobuf/duration_pb' +require 'google/protobuf/timestamp_pb' +require 'temporalio/api/common/v1/message' +require 'temporalio/api/enums/v1/schedule' +require 'temporalio/api/workflow/v1/message' + + +descriptor_data = "\n&temporal/api/schedule/v1/message.proto\x12\x18temporal.api.schedule.v1\x1a\x1egoogle/protobuf/duration.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a$temporal/api/common/v1/message.proto\x1a$temporal/api/enums/v1/schedule.proto\x1a&temporal/api/workflow/v1/message.proto\"\x95\x01\n\x0c\x43\x61lendarSpec\x12\x0e\n\x06second\x18\x01 \x01(\t\x12\x0e\n\x06minute\x18\x02 \x01(\t\x12\x0c\n\x04hour\x18\x03 \x01(\t\x12\x14\n\x0c\x64\x61y_of_month\x18\x04 \x01(\t\x12\r\n\x05month\x18\x05 \x01(\t\x12\x0c\n\x04year\x18\x06 \x01(\t\x12\x13\n\x0b\x64\x61y_of_week\x18\x07 \x01(\t\x12\x0f\n\x07\x63omment\x18\x08 \x01(\t\"1\n\x05Range\x12\r\n\x05start\x18\x01 \x01(\x05\x12\x0b\n\x03\x65nd\x18\x02 \x01(\x05\x12\x0c\n\x04step\x18\x03 \x01(\x05\"\x86\x03\n\x16StructuredCalendarSpec\x12/\n\x06second\x18\x01 \x03(\x0b\x32\x1f.temporal.api.schedule.v1.Range\x12/\n\x06minute\x18\x02 \x03(\x0b\x32\x1f.temporal.api.schedule.v1.Range\x12-\n\x04hour\x18\x03 \x03(\x0b\x32\x1f.temporal.api.schedule.v1.Range\x12\x35\n\x0c\x64\x61y_of_month\x18\x04 \x03(\x0b\x32\x1f.temporal.api.schedule.v1.Range\x12.\n\x05month\x18\x05 \x03(\x0b\x32\x1f.temporal.api.schedule.v1.Range\x12-\n\x04year\x18\x06 \x03(\x0b\x32\x1f.temporal.api.schedule.v1.Range\x12\x34\n\x0b\x64\x61y_of_week\x18\x07 \x03(\x0b\x32\x1f.temporal.api.schedule.v1.Range\x12\x0f\n\x07\x63omment\x18\x08 \x01(\t\"e\n\x0cIntervalSpec\x12+\n\x08interval\x18\x01 \x01(\x0b\x32\x19.google.protobuf.Duration\x12(\n\x05phase\x18\x02 \x01(\x0b\x32\x19.google.protobuf.Duration\"\xba\x04\n\x0cScheduleSpec\x12M\n\x13structured_calendar\x18\x07 \x03(\x0b\x32\x30.temporal.api.schedule.v1.StructuredCalendarSpec\x12\x13\n\x0b\x63ron_string\x18\x08 \x03(\t\x12\x38\n\x08\x63\x61lendar\x18\x01 \x03(\x0b\x32&.temporal.api.schedule.v1.CalendarSpec\x12\x38\n\x08interval\x18\x02 \x03(\x0b\x32&.temporal.api.schedule.v1.IntervalSpec\x12\x44\n\x10\x65xclude_calendar\x18\x03 \x03(\x0b\x32&.temporal.api.schedule.v1.CalendarSpecB\x02\x18\x01\x12U\n\x1b\x65xclude_structured_calendar\x18\t \x03(\x0b\x32\x30.temporal.api.schedule.v1.StructuredCalendarSpec\x12.\n\nstart_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12,\n\x08\x65nd_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12)\n\x06jitter\x18\x06 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x15\n\rtimezone_name\x18\n \x01(\t\x12\x15\n\rtimezone_data\x18\x0b \x01(\x0c\"\xa5\x01\n\x10SchedulePolicies\x12\x44\n\x0eoverlap_policy\x18\x01 \x01(\x0e\x32,.temporal.api.enums.v1.ScheduleOverlapPolicy\x12\x31\n\x0e\x63\x61tchup_window\x18\x02 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x18\n\x10pause_on_failure\x18\x03 \x01(\x08\"h\n\x0eScheduleAction\x12L\n\x0estart_workflow\x18\x01 \x01(\x0b\x32\x32.temporal.api.workflow.v1.NewWorkflowExecutionInfoH\x00\x42\x08\n\x06\x61\x63tion\"\xc4\x01\n\x14ScheduleActionResult\x12\x31\n\rschedule_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12/\n\x0b\x61\x63tual_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12H\n\x15start_workflow_result\x18\x0b \x01(\x0b\x32).temporal.api.common.v1.WorkflowExecution\"b\n\rScheduleState\x12\r\n\x05notes\x18\x01 \x01(\t\x12\x0e\n\x06paused\x18\x02 \x01(\x08\x12\x17\n\x0flimited_actions\x18\x03 \x01(\x08\x12\x19\n\x11remaining_actions\x18\x04 \x01(\x03\"a\n\x19TriggerImmediatelyRequest\x12\x44\n\x0eoverlap_policy\x18\x01 \x01(\x0e\x32,.temporal.api.enums.v1.ScheduleOverlapPolicy\"\xb5\x01\n\x0f\x42\x61\x63kfillRequest\x12.\n\nstart_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12,\n\x08\x65nd_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x44\n\x0eoverlap_policy\x18\x03 \x01(\x0e\x32,.temporal.api.enums.v1.ScheduleOverlapPolicy\"\xc6\x01\n\rSchedulePatch\x12P\n\x13trigger_immediately\x18\x01 \x01(\x0b\x32\x33.temporal.api.schedule.v1.TriggerImmediatelyRequest\x12\x43\n\x10\x62\x61\x63kfill_request\x18\x02 \x03(\x0b\x32).temporal.api.schedule.v1.BackfillRequest\x12\r\n\x05pause\x18\x03 \x01(\t\x12\x0f\n\x07unpause\x18\x04 \x01(\t\"\xd6\x03\n\x0cScheduleInfo\x12\x14\n\x0c\x61\x63tion_count\x18\x01 \x01(\x03\x12\x1d\n\x15missed_catchup_window\x18\x02 \x01(\x03\x12\x17\n\x0foverlap_skipped\x18\x03 \x01(\x03\x12\x16\n\x0e\x62uffer_dropped\x18\n \x01(\x03\x12\x13\n\x0b\x62uffer_size\x18\x0b \x01(\x03\x12\x44\n\x11running_workflows\x18\t \x03(\x0b\x32).temporal.api.common.v1.WorkflowExecution\x12\x46\n\x0erecent_actions\x18\x04 \x03(\x0b\x32..temporal.api.schedule.v1.ScheduleActionResult\x12\x37\n\x13\x66uture_action_times\x18\x05 \x03(\x0b\x32\x1a.google.protobuf.Timestamp\x12/\n\x0b\x63reate_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12/\n\x0bupdate_time\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\"\n\x16invalid_schedule_error\x18\x08 \x01(\tB\x02\x18\x01\"\xf0\x01\n\x08Schedule\x12\x34\n\x04spec\x18\x01 \x01(\x0b\x32&.temporal.api.schedule.v1.ScheduleSpec\x12\x38\n\x06\x61\x63tion\x18\x02 \x01(\x0b\x32(.temporal.api.schedule.v1.ScheduleAction\x12<\n\x08policies\x18\x03 \x01(\x0b\x32*.temporal.api.schedule.v1.SchedulePolicies\x12\x36\n\x05state\x18\x04 \x01(\x0b\x32\'.temporal.api.schedule.v1.ScheduleState\"\xa5\x02\n\x10ScheduleListInfo\x12\x34\n\x04spec\x18\x01 \x01(\x0b\x32&.temporal.api.schedule.v1.ScheduleSpec\x12;\n\rworkflow_type\x18\x02 \x01(\x0b\x32$.temporal.api.common.v1.WorkflowType\x12\r\n\x05notes\x18\x03 \x01(\t\x12\x0e\n\x06paused\x18\x04 \x01(\x08\x12\x46\n\x0erecent_actions\x18\x05 \x03(\x0b\x32..temporal.api.schedule.v1.ScheduleActionResult\x12\x37\n\x13\x66uture_action_times\x18\x06 \x03(\x0b\x32\x1a.google.protobuf.Timestamp\"\xd3\x01\n\x11ScheduleListEntry\x12\x13\n\x0bschedule_id\x18\x01 \x01(\t\x12*\n\x04memo\x18\x02 \x01(\x0b\x32\x1c.temporal.api.common.v1.Memo\x12\x43\n\x11search_attributes\x18\x03 \x01(\x0b\x32(.temporal.api.common.v1.SearchAttributes\x12\x38\n\x04info\x18\x04 \x01(\x0b\x32*.temporal.api.schedule.v1.ScheduleListInfoB\x93\x01\n\x1bio.temporal.api.schedule.v1B\x0cMessageProtoP\x01Z\'go.temporal.io/api/schedule/v1;schedule\xaa\x02\x1aTemporalio.Api.Schedule.V1\xea\x02\x1dTemporalio::Api::Schedule::V1b\x06proto3" + +pool = Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Temporalio + module Api + module Schedule + module V1 + CalendarSpec = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("temporal.api.schedule.v1.CalendarSpec").msgclass + Range = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("temporal.api.schedule.v1.Range").msgclass + StructuredCalendarSpec = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("temporal.api.schedule.v1.StructuredCalendarSpec").msgclass + IntervalSpec = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("temporal.api.schedule.v1.IntervalSpec").msgclass + ScheduleSpec = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("temporal.api.schedule.v1.ScheduleSpec").msgclass + SchedulePolicies = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("temporal.api.schedule.v1.SchedulePolicies").msgclass + ScheduleAction = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("temporal.api.schedule.v1.ScheduleAction").msgclass + ScheduleActionResult = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("temporal.api.schedule.v1.ScheduleActionResult").msgclass + ScheduleState = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("temporal.api.schedule.v1.ScheduleState").msgclass + TriggerImmediatelyRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("temporal.api.schedule.v1.TriggerImmediatelyRequest").msgclass + BackfillRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("temporal.api.schedule.v1.BackfillRequest").msgclass + SchedulePatch = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("temporal.api.schedule.v1.SchedulePatch").msgclass + ScheduleInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("temporal.api.schedule.v1.ScheduleInfo").msgclass + Schedule = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("temporal.api.schedule.v1.Schedule").msgclass + ScheduleListInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("temporal.api.schedule.v1.ScheduleListInfo").msgclass + ScheduleListEntry = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("temporal.api.schedule.v1.ScheduleListEntry").msgclass + end + end + end +end diff --git a/temporalio/lib/temporalio/api/sdk/v1/task_complete_metadata.rb b/temporalio/lib/temporalio/api/sdk/v1/task_complete_metadata.rb new file mode 100644 index 00000000..fcb791a1 --- /dev/null +++ b/temporalio/lib/temporalio/api/sdk/v1/task_complete_metadata.rb @@ -0,0 +1,21 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: temporal/api/sdk/v1/task_complete_metadata.proto + +require 'google/protobuf' + + +descriptor_data = "\n0temporal/api/sdk/v1/task_complete_metadata.proto\x12\x13temporal.api.sdk.v1\"x\n\x1dWorkflowTaskCompletedMetadata\x12\x17\n\x0f\x63ore_used_flags\x18\x01 \x03(\r\x12\x17\n\x0flang_used_flags\x18\x02 \x03(\r\x12\x10\n\x08sdk_name\x18\x03 \x01(\t\x12\x13\n\x0bsdk_version\x18\x04 \x01(\tB\x87\x01\n\x16io.temporal.api.sdk.v1B\x19TaskCompleteMetadataProtoP\x01Z\x1dgo.temporal.io/api/sdk/v1;sdk\xaa\x02\x15Temporalio.Api.Sdk.V1\xea\x02\x18Temporalio::Api::Sdk::V1b\x06proto3" + +pool = Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Temporalio + module Api + module Sdk + module V1 + WorkflowTaskCompletedMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("temporal.api.sdk.v1.WorkflowTaskCompletedMetadata").msgclass + end + end + end +end diff --git a/temporalio/lib/temporalio/api/sdk/v1/workflow_metadata.rb b/temporalio/lib/temporalio/api/sdk/v1/workflow_metadata.rb new file mode 100644 index 00000000..77e073b3 --- /dev/null +++ b/temporalio/lib/temporalio/api/sdk/v1/workflow_metadata.rb @@ -0,0 +1,23 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: temporal/api/sdk/v1/workflow_metadata.proto + +require 'google/protobuf' + + +descriptor_data = "\n+temporal/api/sdk/v1/workflow_metadata.proto\x12\x13temporal.api.sdk.v1\"O\n\x10WorkflowMetadata\x12;\n\ndefinition\x18\x01 \x01(\x0b\x32\'.temporal.api.sdk.v1.WorkflowDefinition\"\xa6\x02\n\x12WorkflowDefinition\x12\x0c\n\x04type\x18\x01 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x02 \x01(\t\x12M\n\x11query_definitions\x18\x03 \x03(\x0b\x32\x32.temporal.api.sdk.v1.WorkflowInteractionDefinition\x12N\n\x12signal_definitions\x18\x04 \x03(\x0b\x32\x32.temporal.api.sdk.v1.WorkflowInteractionDefinition\x12N\n\x12update_definitions\x18\x05 \x03(\x0b\x32\x32.temporal.api.sdk.v1.WorkflowInteractionDefinition\"B\n\x1dWorkflowInteractionDefinition\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x02 \x01(\tB\x83\x01\n\x16io.temporal.api.sdk.v1B\x15WorkflowMetadataProtoP\x01Z\x1dgo.temporal.io/api/sdk/v1;sdk\xaa\x02\x15Temporalio.Api.Sdk.V1\xea\x02\x18Temporalio::Api::Sdk::V1b\x06proto3" + +pool = Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Temporalio + module Api + module Sdk + module V1 + WorkflowMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("temporal.api.sdk.v1.WorkflowMetadata").msgclass + WorkflowDefinition = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("temporal.api.sdk.v1.WorkflowDefinition").msgclass + WorkflowInteractionDefinition = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("temporal.api.sdk.v1.WorkflowInteractionDefinition").msgclass + end + end + end +end diff --git a/temporalio/lib/temporalio/api/taskqueue/v1/message.rb b/temporalio/lib/temporalio/api/taskqueue/v1/message.rb new file mode 100644 index 00000000..0bec0280 --- /dev/null +++ b/temporalio/lib/temporalio/api/taskqueue/v1/message.rb @@ -0,0 +1,36 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: temporal/api/taskqueue/v1/message.proto + +require 'google/protobuf' + +require 'google/protobuf/duration_pb' +require 'google/protobuf/timestamp_pb' +require 'google/protobuf/wrappers_pb' +require 'temporalio/api/enums/v1/task_queue' +require 'temporalio/api/common/v1/message' + + +descriptor_data = "\n\'temporal/api/taskqueue/v1/message.proto\x12\x19temporal.api.taskqueue.v1\x1a\x1egoogle/protobuf/duration.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x1egoogle/protobuf/wrappers.proto\x1a&temporal/api/enums/v1/task_queue.proto\x1a$temporal/api/common/v1/message.proto\"b\n\tTaskQueue\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x32\n\x04kind\x18\x02 \x01(\x0e\x32$.temporal.api.enums.v1.TaskQueueKind\x12\x13\n\x0bnormal_name\x18\x03 \x01(\t\"O\n\x11TaskQueueMetadata\x12:\n\x14max_tasks_per_second\x18\x01 \x01(\x0b\x32\x1c.google.protobuf.DoubleValue\"\xac\x01\n\x0fTaskQueueStatus\x12\x1a\n\x12\x62\x61\x63klog_count_hint\x18\x01 \x01(\x03\x12\x12\n\nread_level\x18\x02 \x01(\x03\x12\x11\n\tack_level\x18\x03 \x01(\x03\x12\x17\n\x0frate_per_second\x18\x04 \x01(\x01\x12=\n\rtask_id_block\x18\x05 \x01(\x0b\x32&.temporal.api.taskqueue.v1.TaskIdBlock\"/\n\x0bTaskIdBlock\x12\x10\n\x08start_id\x18\x01 \x01(\x03\x12\x0e\n\x06\x65nd_id\x18\x02 \x01(\x03\"B\n\x1aTaskQueuePartitionMetadata\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x17\n\x0fowner_host_name\x18\x02 \x01(\t\"\xc5\x01\n\nPollerInfo\x12\x34\n\x10last_access_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x10\n\x08identity\x18\x02 \x01(\t\x12\x17\n\x0frate_per_second\x18\x03 \x01(\x01\x12V\n\x1bworker_version_capabilities\x18\x04 \x01(\x0b\x32\x31.temporal.api.common.v1.WorkerVersionCapabilities\"\x9a\x01\n\x19StickyExecutionAttributes\x12?\n\x11worker_task_queue\x18\x01 \x01(\x0b\x32$.temporal.api.taskqueue.v1.TaskQueue\x12<\n\x19schedule_to_start_timeout\x18\x02 \x01(\x0b\x32\x19.google.protobuf.Duration\")\n\x14\x43ompatibleVersionSet\x12\x11\n\tbuild_ids\x18\x01 \x03(\t\"j\n\x15TaskQueueReachability\x12\x12\n\ntask_queue\x18\x01 \x01(\t\x12=\n\x0creachability\x18\x02 \x03(\x0e\x32\'.temporal.api.enums.v1.TaskReachability\"z\n\x13\x42uildIdReachability\x12\x10\n\x08\x62uild_id\x18\x01 \x01(\t\x12Q\n\x17task_queue_reachability\x18\x02 \x03(\x0b\x32\x30.temporal.api.taskqueue.v1.TaskQueueReachabilityB\x98\x01\n\x1cio.temporal.api.taskqueue.v1B\x0cMessageProtoP\x01Z)go.temporal.io/api/taskqueue/v1;taskqueue\xaa\x02\x1bTemporalio.Api.TaskQueue.V1\xea\x02\x1eTemporalio::Api::TaskQueue::V1b\x06proto3" + +pool = Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Temporalio + module Api + module TaskQueue + module V1 + TaskQueue = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("temporal.api.taskqueue.v1.TaskQueue").msgclass + TaskQueueMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("temporal.api.taskqueue.v1.TaskQueueMetadata").msgclass + TaskQueueStatus = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("temporal.api.taskqueue.v1.TaskQueueStatus").msgclass + TaskIdBlock = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("temporal.api.taskqueue.v1.TaskIdBlock").msgclass + TaskQueuePartitionMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("temporal.api.taskqueue.v1.TaskQueuePartitionMetadata").msgclass + PollerInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("temporal.api.taskqueue.v1.PollerInfo").msgclass + StickyExecutionAttributes = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("temporal.api.taskqueue.v1.StickyExecutionAttributes").msgclass + CompatibleVersionSet = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("temporal.api.taskqueue.v1.CompatibleVersionSet").msgclass + TaskQueueReachability = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("temporal.api.taskqueue.v1.TaskQueueReachability").msgclass + BuildIdReachability = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("temporal.api.taskqueue.v1.BuildIdReachability").msgclass + end + end + end +end diff --git a/temporalio/lib/temporalio/api/update/v1/message.rb b/temporalio/lib/temporalio/api/update/v1/message.rb new file mode 100644 index 00000000..394b33c1 --- /dev/null +++ b/temporalio/lib/temporalio/api/update/v1/message.rb @@ -0,0 +1,33 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: temporal/api/update/v1/message.proto + +require 'google/protobuf' + +require 'temporalio/api/common/v1/message' +require 'temporalio/api/enums/v1/update' +require 'temporalio/api/failure/v1/message' + + +descriptor_data = "\n$temporal/api/update/v1/message.proto\x12\x16temporal.api.update.v1\x1a$temporal/api/common/v1/message.proto\x1a\"temporal/api/enums/v1/update.proto\x1a%temporal/api/failure/v1/message.proto\"c\n\nWaitPolicy\x12U\n\x0flifecycle_stage\x18\x01 \x01(\x0e\x32<.temporal.api.enums.v1.UpdateWorkflowExecutionLifecycleStage\"e\n\tUpdateRef\x12\x45\n\x12workflow_execution\x18\x01 \x01(\x0b\x32).temporal.api.common.v1.WorkflowExecution\x12\x11\n\tupdate_id\x18\x02 \x01(\t\"|\n\x07Outcome\x12\x33\n\x07success\x18\x01 \x01(\x0b\x32 .temporal.api.common.v1.PayloadsH\x00\x12\x33\n\x07\x66\x61ilure\x18\x02 \x01(\x0b\x32 .temporal.api.failure.v1.FailureH\x00\x42\x07\n\x05value\"+\n\x04Meta\x12\x11\n\tupdate_id\x18\x01 \x01(\t\x12\x10\n\x08identity\x18\x02 \x01(\t\"u\n\x05Input\x12.\n\x06header\x18\x01 \x01(\x0b\x32\x1e.temporal.api.common.v1.Header\x12\x0c\n\x04name\x18\x02 \x01(\t\x12.\n\x04\x61rgs\x18\x03 \x01(\x0b\x32 .temporal.api.common.v1.Payloads\"c\n\x07Request\x12*\n\x04meta\x18\x01 \x01(\x0b\x32\x1c.temporal.api.update.v1.Meta\x12,\n\x05input\x18\x02 \x01(\x0b\x32\x1d.temporal.api.update.v1.Input\"\xcc\x01\n\tRejection\x12#\n\x1brejected_request_message_id\x18\x01 \x01(\t\x12,\n$rejected_request_sequencing_event_id\x18\x02 \x01(\x03\x12\x39\n\x10rejected_request\x18\x03 \x01(\x0b\x32\x1f.temporal.api.update.v1.Request\x12\x31\n\x07\x66\x61ilure\x18\x04 \x01(\x0b\x32 .temporal.api.failure.v1.Failure\"\x9a\x01\n\nAcceptance\x12#\n\x1b\x61\x63\x63\x65pted_request_message_id\x18\x01 \x01(\t\x12,\n$accepted_request_sequencing_event_id\x18\x02 \x01(\x03\x12\x39\n\x10\x61\x63\x63\x65pted_request\x18\x03 \x01(\x0b\x32\x1f.temporal.api.update.v1.Request\"h\n\x08Response\x12*\n\x04meta\x18\x01 \x01(\x0b\x32\x1c.temporal.api.update.v1.Meta\x12\x30\n\x07outcome\x18\x02 \x01(\x0b\x32\x1f.temporal.api.update.v1.OutcomeB\x89\x01\n\x19io.temporal.api.update.v1B\x0cMessageProtoP\x01Z#go.temporal.io/api/update/v1;update\xaa\x02\x18Temporalio.Api.Update.V1\xea\x02\x1bTemporalio::Api::Update::V1b\x06proto3" + +pool = Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Temporalio + module Api + module Update + module V1 + WaitPolicy = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("temporal.api.update.v1.WaitPolicy").msgclass + UpdateRef = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("temporal.api.update.v1.UpdateRef").msgclass + Outcome = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("temporal.api.update.v1.Outcome").msgclass + Meta = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("temporal.api.update.v1.Meta").msgclass + Input = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("temporal.api.update.v1.Input").msgclass + Request = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("temporal.api.update.v1.Request").msgclass + Rejection = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("temporal.api.update.v1.Rejection").msgclass + Acceptance = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("temporal.api.update.v1.Acceptance").msgclass + Response = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("temporal.api.update.v1.Response").msgclass + end + end + end +end diff --git a/temporalio/lib/temporalio/api/version/v1/message.rb b/temporalio/lib/temporalio/api/version/v1/message.rb new file mode 100644 index 00000000..95cc3c48 --- /dev/null +++ b/temporalio/lib/temporalio/api/version/v1/message.rb @@ -0,0 +1,26 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: temporal/api/version/v1/message.proto + +require 'google/protobuf' + +require 'google/protobuf/timestamp_pb' +require 'temporalio/api/enums/v1/common' + + +descriptor_data = "\n%temporal/api/version/v1/message.proto\x12\x17temporal.api.version.v1\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\"temporal/api/enums/v1/common.proto\"_\n\x0bReleaseInfo\x12\x0f\n\x07version\x18\x01 \x01(\t\x12\x30\n\x0crelease_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\r\n\x05notes\x18\x03 \x01(\t\"K\n\x05\x41lert\x12\x0f\n\x07message\x18\x01 \x01(\t\x12\x31\n\x08severity\x18\x02 \x01(\x0e\x32\x1f.temporal.api.enums.v1.Severity\"\xfb\x01\n\x0bVersionInfo\x12\x35\n\x07\x63urrent\x18\x01 \x01(\x0b\x32$.temporal.api.version.v1.ReleaseInfo\x12\x39\n\x0brecommended\x18\x02 \x01(\x0b\x32$.temporal.api.version.v1.ReleaseInfo\x12\x14\n\x0cinstructions\x18\x03 \x01(\t\x12.\n\x06\x61lerts\x18\x04 \x03(\x0b\x32\x1e.temporal.api.version.v1.Alert\x12\x34\n\x10last_update_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x8e\x01\n\x1aio.temporal.api.version.v1B\x0cMessageProtoP\x01Z%go.temporal.io/api/version/v1;version\xaa\x02\x19Temporalio.Api.Version.V1\xea\x02\x1cTemporalio::Api::Version::V1b\x06proto3" + +pool = Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Temporalio + module Api + module Version + module V1 + ReleaseInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("temporal.api.version.v1.ReleaseInfo").msgclass + Alert = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("temporal.api.version.v1.Alert").msgclass + VersionInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("temporal.api.version.v1.VersionInfo").msgclass + end + end + end +end diff --git a/temporalio/lib/temporalio/api/workflow/v1/message.rb b/temporalio/lib/temporalio/api/workflow/v1/message.rb new file mode 100644 index 00000000..5b9ede07 --- /dev/null +++ b/temporalio/lib/temporalio/api/workflow/v1/message.rb @@ -0,0 +1,35 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: temporal/api/workflow/v1/message.proto + +require 'google/protobuf' + +require 'google/protobuf/duration_pb' +require 'google/protobuf/timestamp_pb' +require 'temporalio/api/enums/v1/workflow' +require 'temporalio/api/common/v1/message' +require 'temporalio/api/failure/v1/message' +require 'temporalio/api/taskqueue/v1/message' + + +descriptor_data = "\n&temporal/api/workflow/v1/message.proto\x12\x18temporal.api.workflow.v1\x1a\x1egoogle/protobuf/duration.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a$temporal/api/enums/v1/workflow.proto\x1a$temporal/api/common/v1/message.proto\x1a%temporal/api/failure/v1/message.proto\x1a\'temporal/api/taskqueue/v1/message.proto\"\xb0\x06\n\x15WorkflowExecutionInfo\x12<\n\texecution\x18\x01 \x01(\x0b\x32).temporal.api.common.v1.WorkflowExecution\x12\x32\n\x04type\x18\x02 \x01(\x0b\x32$.temporal.api.common.v1.WorkflowType\x12.\n\nstart_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12.\n\nclose_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12>\n\x06status\x18\x05 \x01(\x0e\x32..temporal.api.enums.v1.WorkflowExecutionStatus\x12\x16\n\x0ehistory_length\x18\x06 \x01(\x03\x12\x1b\n\x13parent_namespace_id\x18\x07 \x01(\t\x12\x43\n\x10parent_execution\x18\x08 \x01(\x0b\x32).temporal.api.common.v1.WorkflowExecution\x12\x32\n\x0e\x65xecution_time\x18\t \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12*\n\x04memo\x18\n \x01(\x0b\x32\x1c.temporal.api.common.v1.Memo\x12\x43\n\x11search_attributes\x18\x0b \x01(\x0b\x32(.temporal.api.common.v1.SearchAttributes\x12@\n\x11\x61uto_reset_points\x18\x0c \x01(\x0b\x32%.temporal.api.workflow.v1.ResetPoints\x12\x12\n\ntask_queue\x18\r \x01(\t\x12\x1e\n\x16state_transition_count\x18\x0e \x01(\x03\x12\x1a\n\x12history_size_bytes\x18\x0f \x01(\x03\x12T\n most_recent_worker_version_stamp\x18\x10 \x01(\x0b\x32*.temporal.api.common.v1.WorkerVersionStamp\"\x8d\x02\n\x17WorkflowExecutionConfig\x12\x38\n\ntask_queue\x18\x01 \x01(\x0b\x32$.temporal.api.taskqueue.v1.TaskQueue\x12=\n\x1aworkflow_execution_timeout\x18\x02 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x37\n\x14workflow_run_timeout\x18\x03 \x01(\x0b\x32\x19.google.protobuf.Duration\x12@\n\x1d\x64\x65\x66\x61ult_workflow_task_timeout\x18\x04 \x01(\x0b\x32\x19.google.protobuf.Duration\"\xba\x04\n\x13PendingActivityInfo\x12\x13\n\x0b\x61\x63tivity_id\x18\x01 \x01(\t\x12;\n\ractivity_type\x18\x02 \x01(\x0b\x32$.temporal.api.common.v1.ActivityType\x12:\n\x05state\x18\x03 \x01(\x0e\x32+.temporal.api.enums.v1.PendingActivityState\x12;\n\x11heartbeat_details\x18\x04 \x01(\x0b\x32 .temporal.api.common.v1.Payloads\x12\x37\n\x13last_heartbeat_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x35\n\x11last_started_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x0f\n\x07\x61ttempt\x18\x07 \x01(\x05\x12\x18\n\x10maximum_attempts\x18\x08 \x01(\x05\x12\x32\n\x0escheduled_time\x18\t \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x33\n\x0f\x65xpiration_time\x18\n \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x36\n\x0clast_failure\x18\x0b \x01(\x0b\x32 .temporal.api.failure.v1.Failure\x12\x1c\n\x14last_worker_identity\x18\x0c \x01(\t\"\xb9\x01\n\x19PendingChildExecutionInfo\x12\x13\n\x0bworkflow_id\x18\x01 \x01(\t\x12\x0e\n\x06run_id\x18\x02 \x01(\t\x12\x1a\n\x12workflow_type_name\x18\x03 \x01(\t\x12\x14\n\x0cinitiated_id\x18\x04 \x01(\x03\x12\x45\n\x13parent_close_policy\x18\x05 \x01(\x0e\x32(.temporal.api.enums.v1.ParentClosePolicy\"\x8d\x02\n\x17PendingWorkflowTaskInfo\x12>\n\x05state\x18\x01 \x01(\x0e\x32/.temporal.api.enums.v1.PendingWorkflowTaskState\x12\x32\n\x0escheduled_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12;\n\x17original_scheduled_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x30\n\x0cstarted_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x0f\n\x07\x61ttempt\x18\x05 \x01(\x05\"G\n\x0bResetPoints\x12\x38\n\x06points\x18\x01 \x03(\x0b\x32(.temporal.api.workflow.v1.ResetPointInfo\"\xeb\x01\n\x0eResetPointInfo\x12\x10\n\x08\x62uild_id\x18\x07 \x01(\t\x12\x17\n\x0f\x62inary_checksum\x18\x01 \x01(\t\x12\x0e\n\x06run_id\x18\x02 \x01(\t\x12(\n first_workflow_task_completed_id\x18\x03 \x01(\x03\x12/\n\x0b\x63reate_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12/\n\x0b\x65xpire_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x12\n\nresettable\x18\x06 \x01(\x08\"\xcc\x05\n\x18NewWorkflowExecutionInfo\x12\x13\n\x0bworkflow_id\x18\x01 \x01(\t\x12;\n\rworkflow_type\x18\x02 \x01(\x0b\x32$.temporal.api.common.v1.WorkflowType\x12\x38\n\ntask_queue\x18\x03 \x01(\x0b\x32$.temporal.api.taskqueue.v1.TaskQueue\x12/\n\x05input\x18\x04 \x01(\x0b\x32 .temporal.api.common.v1.Payloads\x12=\n\x1aworkflow_execution_timeout\x18\x05 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x37\n\x14workflow_run_timeout\x18\x06 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x38\n\x15workflow_task_timeout\x18\x07 \x01(\x0b\x32\x19.google.protobuf.Duration\x12N\n\x18workflow_id_reuse_policy\x18\x08 \x01(\x0e\x32,.temporal.api.enums.v1.WorkflowIdReusePolicy\x12\x39\n\x0cretry_policy\x18\t \x01(\x0b\x32#.temporal.api.common.v1.RetryPolicy\x12\x15\n\rcron_schedule\x18\n \x01(\t\x12*\n\x04memo\x18\x0b \x01(\x0b\x32\x1c.temporal.api.common.v1.Memo\x12\x43\n\x11search_attributes\x18\x0c \x01(\x0b\x32(.temporal.api.common.v1.SearchAttributes\x12.\n\x06header\x18\r \x01(\x0b\x32\x1e.temporal.api.common.v1.HeaderB\x93\x01\n\x1bio.temporal.api.workflow.v1B\x0cMessageProtoP\x01Z\'go.temporal.io/api/workflow/v1;workflow\xaa\x02\x1aTemporalio.Api.Workflow.V1\xea\x02\x1dTemporalio::Api::Workflow::V1b\x06proto3" + +pool = Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Temporalio + module Api + module Workflow + module V1 + WorkflowExecutionInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("temporal.api.workflow.v1.WorkflowExecutionInfo").msgclass + WorkflowExecutionConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("temporal.api.workflow.v1.WorkflowExecutionConfig").msgclass + PendingActivityInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("temporal.api.workflow.v1.PendingActivityInfo").msgclass + PendingChildExecutionInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("temporal.api.workflow.v1.PendingChildExecutionInfo").msgclass + PendingWorkflowTaskInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("temporal.api.workflow.v1.PendingWorkflowTaskInfo").msgclass + ResetPoints = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("temporal.api.workflow.v1.ResetPoints").msgclass + ResetPointInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("temporal.api.workflow.v1.ResetPointInfo").msgclass + NewWorkflowExecutionInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("temporal.api.workflow.v1.NewWorkflowExecutionInfo").msgclass + end + end + end +end diff --git a/temporalio/lib/temporalio/api/workflowservice.rb b/temporalio/lib/temporalio/api/workflowservice.rb new file mode 100644 index 00000000..ca54754a --- /dev/null +++ b/temporalio/lib/temporalio/api/workflowservice.rb @@ -0,0 +1,3 @@ +# frozen_string_literal: true + +require 'temporalio/api/workflowservice/v1/service' diff --git a/temporalio/lib/temporalio/api/workflowservice/v1/request_response.rb b/temporalio/lib/temporalio/api/workflowservice/v1/request_response.rb new file mode 100644 index 00000000..49a24115 --- /dev/null +++ b/temporalio/lib/temporalio/api/workflowservice/v1/request_response.rb @@ -0,0 +1,166 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: temporal/api/workflowservice/v1/request_response.proto + +require 'google/protobuf' + +require 'temporalio/api/enums/v1/batch_operation' +require 'temporalio/api/enums/v1/workflow' +require 'temporalio/api/enums/v1/namespace' +require 'temporalio/api/enums/v1/failed_cause' +require 'temporalio/api/enums/v1/common' +require 'temporalio/api/enums/v1/query' +require 'temporalio/api/enums/v1/reset' +require 'temporalio/api/enums/v1/task_queue' +require 'temporalio/api/enums/v1/update' +require 'temporalio/api/common/v1/message' +require 'temporalio/api/history/v1/message' +require 'temporalio/api/workflow/v1/message' +require 'temporalio/api/command/v1/message' +require 'temporalio/api/failure/v1/message' +require 'temporalio/api/filter/v1/message' +require 'temporalio/api/protocol/v1/message' +require 'temporalio/api/namespace/v1/message' +require 'temporalio/api/query/v1/message' +require 'temporalio/api/replication/v1/message' +require 'temporalio/api/schedule/v1/message' +require 'temporalio/api/taskqueue/v1/message' +require 'temporalio/api/update/v1/message' +require 'temporalio/api/version/v1/message' +require 'temporalio/api/batch/v1/message' +require 'temporalio/api/sdk/v1/task_complete_metadata' +require 'google/protobuf/duration_pb' +require 'google/protobuf/timestamp_pb' + + +descriptor_data = "\n6temporal/api/workflowservice/v1/request_response.proto\x12\x1ftemporal.api.workflowservice.v1\x1a+temporal/api/enums/v1/batch_operation.proto\x1a$temporal/api/enums/v1/workflow.proto\x1a%temporal/api/enums/v1/namespace.proto\x1a(temporal/api/enums/v1/failed_cause.proto\x1a\"temporal/api/enums/v1/common.proto\x1a!temporal/api/enums/v1/query.proto\x1a!temporal/api/enums/v1/reset.proto\x1a&temporal/api/enums/v1/task_queue.proto\x1a\"temporal/api/enums/v1/update.proto\x1a$temporal/api/common/v1/message.proto\x1a%temporal/api/history/v1/message.proto\x1a&temporal/api/workflow/v1/message.proto\x1a%temporal/api/command/v1/message.proto\x1a%temporal/api/failure/v1/message.proto\x1a$temporal/api/filter/v1/message.proto\x1a&temporal/api/protocol/v1/message.proto\x1a\'temporal/api/namespace/v1/message.proto\x1a#temporal/api/query/v1/message.proto\x1a)temporal/api/replication/v1/message.proto\x1a&temporal/api/schedule/v1/message.proto\x1a\'temporal/api/taskqueue/v1/message.proto\x1a$temporal/api/update/v1/message.proto\x1a%temporal/api/version/v1/message.proto\x1a#temporal/api/batch/v1/message.proto\x1a\x30temporal/api/sdk/v1/task_complete_metadata.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\x88\x05\n\x18RegisterNamespaceRequest\x12\x11\n\tnamespace\x18\x01 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x02 \x01(\t\x12\x13\n\x0bowner_email\x18\x03 \x01(\t\x12\x46\n#workflow_execution_retention_period\x18\x04 \x01(\x0b\x32\x19.google.protobuf.Duration\x12G\n\x08\x63lusters\x18\x05 \x03(\x0b\x32\x35.temporal.api.replication.v1.ClusterReplicationConfig\x12\x1b\n\x13\x61\x63tive_cluster_name\x18\x06 \x01(\t\x12Q\n\x04\x64\x61ta\x18\x07 \x03(\x0b\x32\x43.temporal.api.workflowservice.v1.RegisterNamespaceRequest.DataEntry\x12\x16\n\x0esecurity_token\x18\x08 \x01(\t\x12\x1b\n\x13is_global_namespace\x18\t \x01(\x08\x12\x44\n\x16history_archival_state\x18\n \x01(\x0e\x32$.temporal.api.enums.v1.ArchivalState\x12\x1c\n\x14history_archival_uri\x18\x0b \x01(\t\x12G\n\x19visibility_archival_state\x18\x0c \x01(\x0e\x32$.temporal.api.enums.v1.ArchivalState\x12\x1f\n\x17visibility_archival_uri\x18\r \x01(\t\x1a+\n\tDataEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\x1b\n\x19RegisterNamespaceResponse\"\x89\x01\n\x15ListNamespacesRequest\x12\x11\n\tpage_size\x18\x01 \x01(\x05\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\x0c\x12\x44\n\x10namespace_filter\x18\x03 \x01(\x0b\x32*.temporal.api.namespace.v1.NamespaceFilter\"\x81\x01\n\x16ListNamespacesResponse\x12N\n\nnamespaces\x18\x01 \x03(\x0b\x32:.temporal.api.workflowservice.v1.DescribeNamespaceResponse\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\x0c\"9\n\x18\x44\x65scribeNamespaceRequest\x12\x11\n\tnamespace\x18\x01 \x01(\t\x12\n\n\x02id\x18\x02 \x01(\t\"\xec\x02\n\x19\x44\x65scribeNamespaceResponse\x12@\n\x0enamespace_info\x18\x01 \x01(\x0b\x32(.temporal.api.namespace.v1.NamespaceInfo\x12:\n\x06\x63onfig\x18\x02 \x01(\x0b\x32*.temporal.api.namespace.v1.NamespaceConfig\x12S\n\x12replication_config\x18\x03 \x01(\x0b\x32\x37.temporal.api.replication.v1.NamespaceReplicationConfig\x12\x18\n\x10\x66\x61ilover_version\x18\x04 \x01(\x03\x12\x1b\n\x13is_global_namespace\x18\x05 \x01(\x08\x12\x45\n\x10\x66\x61ilover_history\x18\x06 \x03(\x0b\x32+.temporal.api.replication.v1.FailoverStatus\"\xcf\x02\n\x16UpdateNamespaceRequest\x12\x11\n\tnamespace\x18\x01 \x01(\t\x12\x43\n\x0bupdate_info\x18\x02 \x01(\x0b\x32..temporal.api.namespace.v1.UpdateNamespaceInfo\x12:\n\x06\x63onfig\x18\x03 \x01(\x0b\x32*.temporal.api.namespace.v1.NamespaceConfig\x12S\n\x12replication_config\x18\x04 \x01(\x0b\x32\x37.temporal.api.replication.v1.NamespaceReplicationConfig\x12\x16\n\x0esecurity_token\x18\x05 \x01(\t\x12\x19\n\x11\x64\x65lete_bad_binary\x18\x06 \x01(\t\x12\x19\n\x11promote_namespace\x18\x07 \x01(\x08\"\xa3\x02\n\x17UpdateNamespaceResponse\x12@\n\x0enamespace_info\x18\x01 \x01(\x0b\x32(.temporal.api.namespace.v1.NamespaceInfo\x12:\n\x06\x63onfig\x18\x02 \x01(\x0b\x32*.temporal.api.namespace.v1.NamespaceConfig\x12S\n\x12replication_config\x18\x03 \x01(\x0b\x32\x37.temporal.api.replication.v1.NamespaceReplicationConfig\x12\x18\n\x10\x66\x61ilover_version\x18\x04 \x01(\x03\x12\x1b\n\x13is_global_namespace\x18\x05 \x01(\x08\"F\n\x19\x44\x65precateNamespaceRequest\x12\x11\n\tnamespace\x18\x01 \x01(\t\x12\x16\n\x0esecurity_token\x18\x02 \x01(\t\"\x1c\n\x1a\x44\x65precateNamespaceResponse\"\xe3\x07\n\x1dStartWorkflowExecutionRequest\x12\x11\n\tnamespace\x18\x01 \x01(\t\x12\x13\n\x0bworkflow_id\x18\x02 \x01(\t\x12;\n\rworkflow_type\x18\x03 \x01(\x0b\x32$.temporal.api.common.v1.WorkflowType\x12\x38\n\ntask_queue\x18\x04 \x01(\x0b\x32$.temporal.api.taskqueue.v1.TaskQueue\x12/\n\x05input\x18\x05 \x01(\x0b\x32 .temporal.api.common.v1.Payloads\x12=\n\x1aworkflow_execution_timeout\x18\x06 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x37\n\x14workflow_run_timeout\x18\x07 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x38\n\x15workflow_task_timeout\x18\x08 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x10\n\x08identity\x18\t \x01(\t\x12\x12\n\nrequest_id\x18\n \x01(\t\x12N\n\x18workflow_id_reuse_policy\x18\x0b \x01(\x0e\x32,.temporal.api.enums.v1.WorkflowIdReusePolicy\x12\x39\n\x0cretry_policy\x18\x0c \x01(\x0b\x32#.temporal.api.common.v1.RetryPolicy\x12\x15\n\rcron_schedule\x18\r \x01(\t\x12*\n\x04memo\x18\x0e \x01(\x0b\x32\x1c.temporal.api.common.v1.Memo\x12\x43\n\x11search_attributes\x18\x0f \x01(\x0b\x32(.temporal.api.common.v1.SearchAttributes\x12.\n\x06header\x18\x10 \x01(\x0b\x32\x1e.temporal.api.common.v1.Header\x12\x1f\n\x17request_eager_execution\x18\x11 \x01(\x08\x12;\n\x11\x63ontinued_failure\x18\x12 \x01(\x0b\x32 .temporal.api.failure.v1.Failure\x12@\n\x16last_completion_result\x18\x13 \x01(\x0b\x32 .temporal.api.common.v1.Payloads\x12\x37\n\x14workflow_start_delay\x18\x14 \x01(\x0b\x32\x19.google.protobuf.Duration\"\x8d\x01\n\x1eStartWorkflowExecutionResponse\x12\x0e\n\x06run_id\x18\x01 \x01(\t\x12[\n\x13\x65\x61ger_workflow_task\x18\x02 \x01(\x0b\x32>.temporal.api.workflowservice.v1.PollWorkflowTaskQueueResponse\"\xaa\x02\n\"GetWorkflowExecutionHistoryRequest\x12\x11\n\tnamespace\x18\x01 \x01(\t\x12<\n\texecution\x18\x02 \x01(\x0b\x32).temporal.api.common.v1.WorkflowExecution\x12\x19\n\x11maximum_page_size\x18\x03 \x01(\x05\x12\x17\n\x0fnext_page_token\x18\x04 \x01(\x0c\x12\x16\n\x0ewait_new_event\x18\x05 \x01(\x08\x12P\n\x19history_event_filter_type\x18\x06 \x01(\x0e\x32-.temporal.api.enums.v1.HistoryEventFilterType\x12\x15\n\rskip_archival\x18\x07 \x01(\x08\"\xba\x01\n#GetWorkflowExecutionHistoryResponse\x12\x31\n\x07history\x18\x01 \x01(\x0b\x32 .temporal.api.history.v1.History\x12\x35\n\x0braw_history\x18\x02 \x03(\x0b\x32 .temporal.api.common.v1.DataBlob\x12\x17\n\x0fnext_page_token\x18\x03 \x01(\x0c\x12\x10\n\x08\x61rchived\x18\x04 \x01(\x08\"\xb0\x01\n)GetWorkflowExecutionHistoryReverseRequest\x12\x11\n\tnamespace\x18\x01 \x01(\t\x12<\n\texecution\x18\x02 \x01(\x0b\x32).temporal.api.common.v1.WorkflowExecution\x12\x19\n\x11maximum_page_size\x18\x03 \x01(\x05\x12\x17\n\x0fnext_page_token\x18\x04 \x01(\x0c\"x\n*GetWorkflowExecutionHistoryReverseResponse\x12\x31\n\x07history\x18\x01 \x01(\x0b\x32 .temporal.api.history.v1.History\x12\x17\n\x0fnext_page_token\x18\x03 \x01(\x0c\"\xee\x01\n\x1cPollWorkflowTaskQueueRequest\x12\x11\n\tnamespace\x18\x01 \x01(\t\x12\x38\n\ntask_queue\x18\x02 \x01(\x0b\x32$.temporal.api.taskqueue.v1.TaskQueue\x12\x10\n\x08identity\x18\x03 \x01(\t\x12\x17\n\x0f\x62inary_checksum\x18\x04 \x01(\t\x12V\n\x1bworker_version_capabilities\x18\x05 \x01(\x0b\x32\x31.temporal.api.common.v1.WorkerVersionCapabilities\"\xbe\x06\n\x1dPollWorkflowTaskQueueResponse\x12\x12\n\ntask_token\x18\x01 \x01(\x0c\x12\x45\n\x12workflow_execution\x18\x02 \x01(\x0b\x32).temporal.api.common.v1.WorkflowExecution\x12;\n\rworkflow_type\x18\x03 \x01(\x0b\x32$.temporal.api.common.v1.WorkflowType\x12!\n\x19previous_started_event_id\x18\x04 \x01(\x03\x12\x18\n\x10started_event_id\x18\x05 \x01(\x03\x12\x0f\n\x07\x61ttempt\x18\x06 \x01(\x05\x12\x1a\n\x12\x62\x61\x63klog_count_hint\x18\x07 \x01(\x03\x12\x31\n\x07history\x18\x08 \x01(\x0b\x32 .temporal.api.history.v1.History\x12\x17\n\x0fnext_page_token\x18\t \x01(\x0c\x12\x33\n\x05query\x18\n \x01(\x0b\x32$.temporal.api.query.v1.WorkflowQuery\x12K\n\x1dworkflow_execution_task_queue\x18\x0b \x01(\x0b\x32$.temporal.api.taskqueue.v1.TaskQueue\x12\x32\n\x0escheduled_time\x18\x0c \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x30\n\x0cstarted_time\x18\r \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\\\n\x07queries\x18\x0e \x03(\x0b\x32K.temporal.api.workflowservice.v1.PollWorkflowTaskQueueResponse.QueriesEntry\x12\x33\n\x08messages\x18\x0f \x03(\x0b\x32!.temporal.api.protocol.v1.Message\x1aT\n\x0cQueriesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x33\n\x05value\x18\x02 \x01(\x0b\x32$.temporal.api.query.v1.WorkflowQuery:\x02\x38\x01\"\xa4\x06\n#RespondWorkflowTaskCompletedRequest\x12\x12\n\ntask_token\x18\x01 \x01(\x0c\x12\x32\n\x08\x63ommands\x18\x02 \x03(\x0b\x32 .temporal.api.command.v1.Command\x12\x10\n\x08identity\x18\x03 \x01(\t\x12O\n\x11sticky_attributes\x18\x04 \x01(\x0b\x32\x34.temporal.api.taskqueue.v1.StickyExecutionAttributes\x12 \n\x18return_new_workflow_task\x18\x05 \x01(\x08\x12&\n\x1e\x66orce_create_new_workflow_task\x18\x06 \x01(\x08\x12\x17\n\x0f\x62inary_checksum\x18\x07 \x01(\t\x12m\n\rquery_results\x18\x08 \x03(\x0b\x32V.temporal.api.workflowservice.v1.RespondWorkflowTaskCompletedRequest.QueryResultsEntry\x12\x11\n\tnamespace\x18\t \x01(\t\x12H\n\x14worker_version_stamp\x18\n \x01(\x0b\x32*.temporal.api.common.v1.WorkerVersionStamp\x12\x33\n\x08messages\x18\x0b \x03(\x0b\x32!.temporal.api.protocol.v1.Message\x12H\n\x0csdk_metadata\x18\x0c \x01(\x0b\x32\x32.temporal.api.sdk.v1.WorkflowTaskCompletedMetadata\x12\x43\n\x11metering_metadata\x18\r \x01(\x0b\x32(.temporal.api.common.v1.MeteringMetadata\x1a_\n\x11QueryResultsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x39\n\x05value\x18\x02 \x01(\x0b\x32*.temporal.api.query.v1.WorkflowQueryResult:\x02\x38\x01\"\xf5\x01\n$RespondWorkflowTaskCompletedResponse\x12U\n\rworkflow_task\x18\x01 \x01(\x0b\x32>.temporal.api.workflowservice.v1.PollWorkflowTaskQueueResponse\x12V\n\x0e\x61\x63tivity_tasks\x18\x02 \x03(\x0b\x32>.temporal.api.workflowservice.v1.PollActivityTaskQueueResponse\x12\x1e\n\x16reset_history_event_id\x18\x03 \x01(\x03\"\xdf\x02\n RespondWorkflowTaskFailedRequest\x12\x12\n\ntask_token\x18\x01 \x01(\x0c\x12=\n\x05\x63\x61use\x18\x02 \x01(\x0e\x32..temporal.api.enums.v1.WorkflowTaskFailedCause\x12\x31\n\x07\x66\x61ilure\x18\x03 \x01(\x0b\x32 .temporal.api.failure.v1.Failure\x12\x10\n\x08identity\x18\x04 \x01(\t\x12\x17\n\x0f\x62inary_checksum\x18\x05 \x01(\t\x12\x11\n\tnamespace\x18\x06 \x01(\t\x12\x33\n\x08messages\x18\x07 \x03(\x0b\x32!.temporal.api.protocol.v1.Message\x12\x42\n\x0eworker_version\x18\x08 \x01(\x0b\x32*.temporal.api.common.v1.WorkerVersionStamp\"#\n!RespondWorkflowTaskFailedResponse\"\xa0\x02\n\x1cPollActivityTaskQueueRequest\x12\x11\n\tnamespace\x18\x01 \x01(\t\x12\x38\n\ntask_queue\x18\x02 \x01(\x0b\x32$.temporal.api.taskqueue.v1.TaskQueue\x12\x10\n\x08identity\x18\x03 \x01(\t\x12I\n\x13task_queue_metadata\x18\x04 \x01(\x0b\x32,.temporal.api.taskqueue.v1.TaskQueueMetadata\x12V\n\x1bworker_version_capabilities\x18\x05 \x01(\x0b\x32\x31.temporal.api.common.v1.WorkerVersionCapabilities\"\xe8\x06\n\x1dPollActivityTaskQueueResponse\x12\x12\n\ntask_token\x18\x01 \x01(\x0c\x12\x1a\n\x12workflow_namespace\x18\x02 \x01(\t\x12;\n\rworkflow_type\x18\x03 \x01(\x0b\x32$.temporal.api.common.v1.WorkflowType\x12\x45\n\x12workflow_execution\x18\x04 \x01(\x0b\x32).temporal.api.common.v1.WorkflowExecution\x12;\n\ractivity_type\x18\x05 \x01(\x0b\x32$.temporal.api.common.v1.ActivityType\x12\x13\n\x0b\x61\x63tivity_id\x18\x06 \x01(\t\x12.\n\x06header\x18\x07 \x01(\x0b\x32\x1e.temporal.api.common.v1.Header\x12/\n\x05input\x18\x08 \x01(\x0b\x32 .temporal.api.common.v1.Payloads\x12;\n\x11heartbeat_details\x18\t \x01(\x0b\x32 .temporal.api.common.v1.Payloads\x12\x32\n\x0escheduled_time\x18\n \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x42\n\x1e\x63urrent_attempt_scheduled_time\x18\x0b \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x30\n\x0cstarted_time\x18\x0c \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x0f\n\x07\x61ttempt\x18\r \x01(\x05\x12<\n\x19schedule_to_close_timeout\x18\x0e \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x39\n\x16start_to_close_timeout\x18\x0f \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x34\n\x11heartbeat_timeout\x18\x10 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x39\n\x0cretry_policy\x18\x11 \x01(\x0b\x32#.temporal.api.common.v1.RetryPolicy\"\x90\x01\n\"RecordActivityTaskHeartbeatRequest\x12\x12\n\ntask_token\x18\x01 \x01(\x0c\x12\x31\n\x07\x64\x65tails\x18\x02 \x01(\x0b\x32 .temporal.api.common.v1.Payloads\x12\x10\n\x08identity\x18\x03 \x01(\t\x12\x11\n\tnamespace\x18\x04 \x01(\t\"?\n#RecordActivityTaskHeartbeatResponse\x12\x18\n\x10\x63\x61ncel_requested\x18\x01 \x01(\x08\"\xba\x01\n&RecordActivityTaskHeartbeatByIdRequest\x12\x11\n\tnamespace\x18\x01 \x01(\t\x12\x13\n\x0bworkflow_id\x18\x02 \x01(\t\x12\x0e\n\x06run_id\x18\x03 \x01(\t\x12\x13\n\x0b\x61\x63tivity_id\x18\x04 \x01(\t\x12\x31\n\x07\x64\x65tails\x18\x05 \x01(\x0b\x32 .temporal.api.common.v1.Payloads\x12\x10\n\x08identity\x18\x06 \x01(\t\"C\n\'RecordActivityTaskHeartbeatByIdResponse\x12\x18\n\x10\x63\x61ncel_requested\x18\x01 \x01(\x08\"\xd4\x01\n#RespondActivityTaskCompletedRequest\x12\x12\n\ntask_token\x18\x01 \x01(\x0c\x12\x30\n\x06result\x18\x02 \x01(\x0b\x32 .temporal.api.common.v1.Payloads\x12\x10\n\x08identity\x18\x03 \x01(\t\x12\x11\n\tnamespace\x18\x04 \x01(\t\x12\x42\n\x0eworker_version\x18\x05 \x01(\x0b\x32*.temporal.api.common.v1.WorkerVersionStamp\"&\n$RespondActivityTaskCompletedResponse\"\xba\x01\n\'RespondActivityTaskCompletedByIdRequest\x12\x11\n\tnamespace\x18\x01 \x01(\t\x12\x13\n\x0bworkflow_id\x18\x02 \x01(\t\x12\x0e\n\x06run_id\x18\x03 \x01(\t\x12\x13\n\x0b\x61\x63tivity_id\x18\x04 \x01(\t\x12\x30\n\x06result\x18\x05 \x01(\x0b\x32 .temporal.api.common.v1.Payloads\x12\x10\n\x08identity\x18\x06 \x01(\t\"*\n(RespondActivityTaskCompletedByIdResponse\"\x94\x02\n RespondActivityTaskFailedRequest\x12\x12\n\ntask_token\x18\x01 \x01(\x0c\x12\x31\n\x07\x66\x61ilure\x18\x02 \x01(\x0b\x32 .temporal.api.failure.v1.Failure\x12\x10\n\x08identity\x18\x03 \x01(\t\x12\x11\n\tnamespace\x18\x04 \x01(\t\x12@\n\x16last_heartbeat_details\x18\x05 \x01(\x0b\x32 .temporal.api.common.v1.Payloads\x12\x42\n\x0eworker_version\x18\x06 \x01(\x0b\x32*.temporal.api.common.v1.WorkerVersionStamp\"W\n!RespondActivityTaskFailedResponse\x12\x32\n\x08\x66\x61ilures\x18\x01 \x03(\x0b\x32 .temporal.api.failure.v1.Failure\"\xfa\x01\n$RespondActivityTaskFailedByIdRequest\x12\x11\n\tnamespace\x18\x01 \x01(\t\x12\x13\n\x0bworkflow_id\x18\x02 \x01(\t\x12\x0e\n\x06run_id\x18\x03 \x01(\t\x12\x13\n\x0b\x61\x63tivity_id\x18\x04 \x01(\t\x12\x31\n\x07\x66\x61ilure\x18\x05 \x01(\x0b\x32 .temporal.api.failure.v1.Failure\x12\x10\n\x08identity\x18\x06 \x01(\t\x12@\n\x16last_heartbeat_details\x18\x07 \x01(\x0b\x32 .temporal.api.common.v1.Payloads\"[\n%RespondActivityTaskFailedByIdResponse\x12\x32\n\x08\x66\x61ilures\x18\x01 \x03(\x0b\x32 .temporal.api.failure.v1.Failure\"\xd4\x01\n\"RespondActivityTaskCanceledRequest\x12\x12\n\ntask_token\x18\x01 \x01(\x0c\x12\x31\n\x07\x64\x65tails\x18\x02 \x01(\x0b\x32 .temporal.api.common.v1.Payloads\x12\x10\n\x08identity\x18\x03 \x01(\t\x12\x11\n\tnamespace\x18\x04 \x01(\t\x12\x42\n\x0eworker_version\x18\x05 \x01(\x0b\x32*.temporal.api.common.v1.WorkerVersionStamp\"%\n#RespondActivityTaskCanceledResponse\"\xba\x01\n&RespondActivityTaskCanceledByIdRequest\x12\x11\n\tnamespace\x18\x01 \x01(\t\x12\x13\n\x0bworkflow_id\x18\x02 \x01(\t\x12\x0e\n\x06run_id\x18\x03 \x01(\t\x12\x13\n\x0b\x61\x63tivity_id\x18\x04 \x01(\t\x12\x31\n\x07\x64\x65tails\x18\x05 \x01(\x0b\x32 .temporal.api.common.v1.Payloads\x12\x10\n\x08identity\x18\x06 \x01(\t\")\n\'RespondActivityTaskCanceledByIdResponse\"\xd7\x01\n%RequestCancelWorkflowExecutionRequest\x12\x11\n\tnamespace\x18\x01 \x01(\t\x12\x45\n\x12workflow_execution\x18\x02 \x01(\x0b\x32).temporal.api.common.v1.WorkflowExecution\x12\x10\n\x08identity\x18\x03 \x01(\t\x12\x12\n\nrequest_id\x18\x04 \x01(\t\x12\x1e\n\x16\x66irst_execution_run_id\x18\x05 \x01(\t\x12\x0e\n\x06reason\x18\x06 \x01(\t\"(\n&RequestCancelWorkflowExecutionResponse\"\xcc\x02\n\x1eSignalWorkflowExecutionRequest\x12\x11\n\tnamespace\x18\x01 \x01(\t\x12\x45\n\x12workflow_execution\x18\x02 \x01(\x0b\x32).temporal.api.common.v1.WorkflowExecution\x12\x13\n\x0bsignal_name\x18\x03 \x01(\t\x12/\n\x05input\x18\x04 \x01(\x0b\x32 .temporal.api.common.v1.Payloads\x12\x10\n\x08identity\x18\x05 \x01(\t\x12\x12\n\nrequest_id\x18\x06 \x01(\t\x12\x0f\n\x07\x63ontrol\x18\x07 \x01(\t\x12.\n\x06header\x18\x08 \x01(\x0b\x32\x1e.temporal.api.common.v1.Header\x12#\n\x1bskip_generate_workflow_task\x18\t \x01(\x08\"!\n\x1fSignalWorkflowExecutionResponse\"\xd0\x07\n\'SignalWithStartWorkflowExecutionRequest\x12\x11\n\tnamespace\x18\x01 \x01(\t\x12\x13\n\x0bworkflow_id\x18\x02 \x01(\t\x12;\n\rworkflow_type\x18\x03 \x01(\x0b\x32$.temporal.api.common.v1.WorkflowType\x12\x38\n\ntask_queue\x18\x04 \x01(\x0b\x32$.temporal.api.taskqueue.v1.TaskQueue\x12/\n\x05input\x18\x05 \x01(\x0b\x32 .temporal.api.common.v1.Payloads\x12=\n\x1aworkflow_execution_timeout\x18\x06 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x37\n\x14workflow_run_timeout\x18\x07 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x38\n\x15workflow_task_timeout\x18\x08 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x10\n\x08identity\x18\t \x01(\t\x12\x12\n\nrequest_id\x18\n \x01(\t\x12N\n\x18workflow_id_reuse_policy\x18\x0b \x01(\x0e\x32,.temporal.api.enums.v1.WorkflowIdReusePolicy\x12\x13\n\x0bsignal_name\x18\x0c \x01(\t\x12\x36\n\x0csignal_input\x18\r \x01(\x0b\x32 .temporal.api.common.v1.Payloads\x12\x0f\n\x07\x63ontrol\x18\x0e \x01(\t\x12\x39\n\x0cretry_policy\x18\x0f \x01(\x0b\x32#.temporal.api.common.v1.RetryPolicy\x12\x15\n\rcron_schedule\x18\x10 \x01(\t\x12*\n\x04memo\x18\x11 \x01(\x0b\x32\x1c.temporal.api.common.v1.Memo\x12\x43\n\x11search_attributes\x18\x12 \x01(\x0b\x32(.temporal.api.common.v1.SearchAttributes\x12.\n\x06header\x18\x13 \x01(\x0b\x32\x1e.temporal.api.common.v1.Header\x12\x37\n\x14workflow_start_delay\x18\x14 \x01(\x0b\x32\x19.google.protobuf.Duration\x12#\n\x1bskip_generate_workflow_task\x18\x15 \x01(\x08\":\n(SignalWithStartWorkflowExecutionResponse\x12\x0e\n\x06run_id\x18\x01 \x01(\t\"\xde\x02\n\x1dResetWorkflowExecutionRequest\x12\x11\n\tnamespace\x18\x01 \x01(\t\x12\x45\n\x12workflow_execution\x18\x02 \x01(\x0b\x32).temporal.api.common.v1.WorkflowExecution\x12\x0e\n\x06reason\x18\x03 \x01(\t\x12%\n\x1dworkflow_task_finish_event_id\x18\x04 \x01(\x03\x12\x12\n\nrequest_id\x18\x05 \x01(\t\x12\x43\n\x12reset_reapply_type\x18\x06 \x01(\x0e\x32\'.temporal.api.enums.v1.ResetReapplyType\x12S\n\x1breset_reapply_exclude_types\x18\x07 \x03(\x0e\x32..temporal.api.enums.v1.ResetReapplyExcludeType\"0\n\x1eResetWorkflowExecutionResponse\x12\x0e\n\x06run_id\x18\x01 \x01(\t\"\xf2\x01\n!TerminateWorkflowExecutionRequest\x12\x11\n\tnamespace\x18\x01 \x01(\t\x12\x45\n\x12workflow_execution\x18\x02 \x01(\x0b\x32).temporal.api.common.v1.WorkflowExecution\x12\x0e\n\x06reason\x18\x03 \x01(\t\x12\x31\n\x07\x64\x65tails\x18\x04 \x01(\x0b\x32 .temporal.api.common.v1.Payloads\x12\x10\n\x08identity\x18\x05 \x01(\t\x12\x1e\n\x16\x66irst_execution_run_id\x18\x06 \x01(\t\"$\n\"TerminateWorkflowExecutionResponse\"z\n\x1e\x44\x65leteWorkflowExecutionRequest\x12\x11\n\tnamespace\x18\x01 \x01(\t\x12\x45\n\x12workflow_execution\x18\x02 \x01(\x0b\x32).temporal.api.common.v1.WorkflowExecution\"!\n\x1f\x44\x65leteWorkflowExecutionResponse\"\xc9\x02\n!ListOpenWorkflowExecutionsRequest\x12\x11\n\tnamespace\x18\x01 \x01(\t\x12\x19\n\x11maximum_page_size\x18\x02 \x01(\x05\x12\x17\n\x0fnext_page_token\x18\x03 \x01(\x0c\x12\x42\n\x11start_time_filter\x18\x04 \x01(\x0b\x32\'.temporal.api.filter.v1.StartTimeFilter\x12K\n\x10\x65xecution_filter\x18\x05 \x01(\x0b\x32/.temporal.api.filter.v1.WorkflowExecutionFilterH\x00\x12\x41\n\x0btype_filter\x18\x06 \x01(\x0b\x32*.temporal.api.filter.v1.WorkflowTypeFilterH\x00\x42\t\n\x07\x66ilters\"\x82\x01\n\"ListOpenWorkflowExecutionsResponse\x12\x43\n\nexecutions\x18\x01 \x03(\x0b\x32/.temporal.api.workflow.v1.WorkflowExecutionInfo\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\x0c\"\x8a\x03\n#ListClosedWorkflowExecutionsRequest\x12\x11\n\tnamespace\x18\x01 \x01(\t\x12\x19\n\x11maximum_page_size\x18\x02 \x01(\x05\x12\x17\n\x0fnext_page_token\x18\x03 \x01(\x0c\x12\x42\n\x11start_time_filter\x18\x04 \x01(\x0b\x32\'.temporal.api.filter.v1.StartTimeFilter\x12K\n\x10\x65xecution_filter\x18\x05 \x01(\x0b\x32/.temporal.api.filter.v1.WorkflowExecutionFilterH\x00\x12\x41\n\x0btype_filter\x18\x06 \x01(\x0b\x32*.temporal.api.filter.v1.WorkflowTypeFilterH\x00\x12=\n\rstatus_filter\x18\x07 \x01(\x0b\x32$.temporal.api.filter.v1.StatusFilterH\x00\x42\t\n\x07\x66ilters\"\x84\x01\n$ListClosedWorkflowExecutionsResponse\x12\x43\n\nexecutions\x18\x01 \x03(\x0b\x32/.temporal.api.workflow.v1.WorkflowExecutionInfo\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\x0c\"m\n\x1dListWorkflowExecutionsRequest\x12\x11\n\tnamespace\x18\x01 \x01(\t\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x17\n\x0fnext_page_token\x18\x03 \x01(\x0c\x12\r\n\x05query\x18\x04 \x01(\t\"~\n\x1eListWorkflowExecutionsResponse\x12\x43\n\nexecutions\x18\x01 \x03(\x0b\x32/.temporal.api.workflow.v1.WorkflowExecutionInfo\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\x0c\"u\n%ListArchivedWorkflowExecutionsRequest\x12\x11\n\tnamespace\x18\x01 \x01(\t\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x17\n\x0fnext_page_token\x18\x03 \x01(\x0c\x12\r\n\x05query\x18\x04 \x01(\t\"\x86\x01\n&ListArchivedWorkflowExecutionsResponse\x12\x43\n\nexecutions\x18\x01 \x03(\x0b\x32/.temporal.api.workflow.v1.WorkflowExecutionInfo\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\x0c\"m\n\x1dScanWorkflowExecutionsRequest\x12\x11\n\tnamespace\x18\x01 \x01(\t\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x17\n\x0fnext_page_token\x18\x03 \x01(\x0c\x12\r\n\x05query\x18\x04 \x01(\t\"~\n\x1eScanWorkflowExecutionsResponse\x12\x43\n\nexecutions\x18\x01 \x03(\x0b\x32/.temporal.api.workflow.v1.WorkflowExecutionInfo\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\x0c\"B\n\x1e\x43ountWorkflowExecutionsRequest\x12\x11\n\tnamespace\x18\x01 \x01(\t\x12\r\n\x05query\x18\x02 \x01(\t\"\xed\x01\n\x1f\x43ountWorkflowExecutionsResponse\x12\r\n\x05\x63ount\x18\x01 \x01(\x03\x12\x61\n\x06groups\x18\x02 \x03(\x0b\x32Q.temporal.api.workflowservice.v1.CountWorkflowExecutionsResponse.AggregationGroup\x1aX\n\x10\x41ggregationGroup\x12\x35\n\x0cgroup_values\x18\x01 \x03(\x0b\x32\x1f.temporal.api.common.v1.Payload\x12\r\n\x05\x63ount\x18\x02 \x01(\x03\"\x1c\n\x1aGetSearchAttributesRequest\"\xc9\x01\n\x1bGetSearchAttributesResponse\x12T\n\x04keys\x18\x01 \x03(\x0b\x32\x46.temporal.api.workflowservice.v1.GetSearchAttributesResponse.KeysEntry\x1aT\n\tKeysEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x36\n\x05value\x18\x02 \x01(\x0e\x32\'.temporal.api.enums.v1.IndexedValueType:\x02\x38\x01\"\xde\x01\n RespondQueryTaskCompletedRequest\x12\x12\n\ntask_token\x18\x01 \x01(\x0c\x12>\n\x0e\x63ompleted_type\x18\x02 \x01(\x0e\x32&.temporal.api.enums.v1.QueryResultType\x12\x36\n\x0cquery_result\x18\x03 \x01(\x0b\x32 .temporal.api.common.v1.Payloads\x12\x15\n\rerror_message\x18\x04 \x01(\t\x12\x11\n\tnamespace\x18\x06 \x01(\tJ\x04\x08\x05\x10\x06\"#\n!RespondQueryTaskCompletedResponse\"n\n\x1bResetStickyTaskQueueRequest\x12\x11\n\tnamespace\x18\x01 \x01(\t\x12<\n\texecution\x18\x02 \x01(\x0b\x32).temporal.api.common.v1.WorkflowExecution\"\x1e\n\x1cResetStickyTaskQueueResponse\"\xe9\x01\n\x14QueryWorkflowRequest\x12\x11\n\tnamespace\x18\x01 \x01(\t\x12<\n\texecution\x18\x02 \x01(\x0b\x32).temporal.api.common.v1.WorkflowExecution\x12\x33\n\x05query\x18\x03 \x01(\x0b\x32$.temporal.api.query.v1.WorkflowQuery\x12K\n\x16query_reject_condition\x18\x04 \x01(\x0e\x32+.temporal.api.enums.v1.QueryRejectCondition\"\x8d\x01\n\x15QueryWorkflowResponse\x12\x36\n\x0cquery_result\x18\x01 \x01(\x0b\x32 .temporal.api.common.v1.Payloads\x12<\n\x0equery_rejected\x18\x02 \x01(\x0b\x32$.temporal.api.query.v1.QueryRejected\"s\n DescribeWorkflowExecutionRequest\x12\x11\n\tnamespace\x18\x01 \x01(\t\x12<\n\texecution\x18\x02 \x01(\x0b\x32).temporal.api.common.v1.WorkflowExecution\"\xae\x03\n!DescribeWorkflowExecutionResponse\x12K\n\x10\x65xecution_config\x18\x01 \x01(\x0b\x32\x31.temporal.api.workflow.v1.WorkflowExecutionConfig\x12P\n\x17workflow_execution_info\x18\x02 \x01(\x0b\x32/.temporal.api.workflow.v1.WorkflowExecutionInfo\x12I\n\x12pending_activities\x18\x03 \x03(\x0b\x32-.temporal.api.workflow.v1.PendingActivityInfo\x12M\n\x10pending_children\x18\x04 \x03(\x0b\x32\x33.temporal.api.workflow.v1.PendingChildExecutionInfo\x12P\n\x15pending_workflow_task\x18\x05 \x01(\x0b\x32\x31.temporal.api.workflow.v1.PendingWorkflowTaskInfo\"\xc9\x01\n\x18\x44\x65scribeTaskQueueRequest\x12\x11\n\tnamespace\x18\x01 \x01(\t\x12\x38\n\ntask_queue\x18\x02 \x01(\x0b\x32$.temporal.api.taskqueue.v1.TaskQueue\x12=\n\x0ftask_queue_type\x18\x03 \x01(\x0e\x32$.temporal.api.enums.v1.TaskQueueType\x12!\n\x19include_task_queue_status\x18\x04 \x01(\x08\"\x9a\x01\n\x19\x44\x65scribeTaskQueueResponse\x12\x36\n\x07pollers\x18\x01 \x03(\x0b\x32%.temporal.api.taskqueue.v1.PollerInfo\x12\x45\n\x11task_queue_status\x18\x02 \x01(\x0b\x32*.temporal.api.taskqueue.v1.TaskQueueStatus\"\x17\n\x15GetClusterInfoRequest\"\x8b\x03\n\x16GetClusterInfoResponse\x12h\n\x11supported_clients\x18\x01 \x03(\x0b\x32M.temporal.api.workflowservice.v1.GetClusterInfoResponse.SupportedClientsEntry\x12\x16\n\x0eserver_version\x18\x02 \x01(\t\x12\x12\n\ncluster_id\x18\x03 \x01(\t\x12:\n\x0cversion_info\x18\x04 \x01(\x0b\x32$.temporal.api.version.v1.VersionInfo\x12\x14\n\x0c\x63luster_name\x18\x05 \x01(\t\x12\x1b\n\x13history_shard_count\x18\x06 \x01(\x05\x12\x19\n\x11persistence_store\x18\x07 \x01(\t\x12\x18\n\x10visibility_store\x18\x08 \x01(\t\x1a\x37\n\x15SupportedClientsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\x16\n\x14GetSystemInfoRequest\"\xe5\x03\n\x15GetSystemInfoResponse\x12\x16\n\x0eserver_version\x18\x01 \x01(\t\x12Y\n\x0c\x63\x61pabilities\x18\x02 \x01(\x0b\x32\x43.temporal.api.workflowservice.v1.GetSystemInfoResponse.Capabilities\x1a\xd8\x02\n\x0c\x43\x61pabilities\x12\x1f\n\x17signal_and_query_header\x18\x01 \x01(\x08\x12&\n\x1einternal_error_differentiation\x18\x02 \x01(\x08\x12*\n\"activity_failure_include_heartbeat\x18\x03 \x01(\x08\x12\x1a\n\x12supports_schedules\x18\x04 \x01(\x08\x12\"\n\x1a\x65ncoded_failure_attributes\x18\x05 \x01(\x08\x12!\n\x19\x62uild_id_based_versioning\x18\x06 \x01(\x08\x12\x13\n\x0bupsert_memo\x18\x07 \x01(\x08\x12\x1c\n\x14\x65\x61ger_workflow_start\x18\x08 \x01(\x08\x12\x14\n\x0csdk_metadata\x18\t \x01(\x08\x12\'\n\x1f\x63ount_group_by_execution_status\x18\n \x01(\x08\"m\n\x1eListTaskQueuePartitionsRequest\x12\x11\n\tnamespace\x18\x01 \x01(\t\x12\x38\n\ntask_queue\x18\x02 \x01(\x0b\x32$.temporal.api.taskqueue.v1.TaskQueue\"\xdf\x01\n\x1fListTaskQueuePartitionsResponse\x12]\n\x1e\x61\x63tivity_task_queue_partitions\x18\x01 \x03(\x0b\x32\x35.temporal.api.taskqueue.v1.TaskQueuePartitionMetadata\x12]\n\x1eworkflow_task_queue_partitions\x18\x02 \x03(\x0b\x32\x35.temporal.api.taskqueue.v1.TaskQueuePartitionMetadata\"\xcc\x02\n\x15\x43reateScheduleRequest\x12\x11\n\tnamespace\x18\x01 \x01(\t\x12\x13\n\x0bschedule_id\x18\x02 \x01(\t\x12\x34\n\x08schedule\x18\x03 \x01(\x0b\x32\".temporal.api.schedule.v1.Schedule\x12>\n\rinitial_patch\x18\x04 \x01(\x0b\x32\'.temporal.api.schedule.v1.SchedulePatch\x12\x10\n\x08identity\x18\x05 \x01(\t\x12\x12\n\nrequest_id\x18\x06 \x01(\t\x12*\n\x04memo\x18\x07 \x01(\x0b\x32\x1c.temporal.api.common.v1.Memo\x12\x43\n\x11search_attributes\x18\x08 \x01(\x0b\x32(.temporal.api.common.v1.SearchAttributes\"0\n\x16\x43reateScheduleResponse\x12\x16\n\x0e\x63onflict_token\x18\x01 \x01(\x0c\"A\n\x17\x44\x65scribeScheduleRequest\x12\x11\n\tnamespace\x18\x01 \x01(\t\x12\x13\n\x0bschedule_id\x18\x02 \x01(\t\"\x8f\x02\n\x18\x44\x65scribeScheduleResponse\x12\x34\n\x08schedule\x18\x01 \x01(\x0b\x32\".temporal.api.schedule.v1.Schedule\x12\x34\n\x04info\x18\x02 \x01(\x0b\x32&.temporal.api.schedule.v1.ScheduleInfo\x12*\n\x04memo\x18\x03 \x01(\x0b\x32\x1c.temporal.api.common.v1.Memo\x12\x43\n\x11search_attributes\x18\x04 \x01(\x0b\x32(.temporal.api.common.v1.SearchAttributes\x12\x16\n\x0e\x63onflict_token\x18\x05 \x01(\x0c\"\xb3\x01\n\x15UpdateScheduleRequest\x12\x11\n\tnamespace\x18\x01 \x01(\t\x12\x13\n\x0bschedule_id\x18\x02 \x01(\t\x12\x34\n\x08schedule\x18\x03 \x01(\x0b\x32\".temporal.api.schedule.v1.Schedule\x12\x16\n\x0e\x63onflict_token\x18\x04 \x01(\x0c\x12\x10\n\x08identity\x18\x05 \x01(\t\x12\x12\n\nrequest_id\x18\x06 \x01(\t\"\x18\n\x16UpdateScheduleResponse\"\x9c\x01\n\x14PatchScheduleRequest\x12\x11\n\tnamespace\x18\x01 \x01(\t\x12\x13\n\x0bschedule_id\x18\x02 \x01(\t\x12\x36\n\x05patch\x18\x03 \x01(\x0b\x32\'.temporal.api.schedule.v1.SchedulePatch\x12\x10\n\x08identity\x18\x04 \x01(\t\x12\x12\n\nrequest_id\x18\x05 \x01(\t\"\x17\n\x15PatchScheduleResponse\"\xa8\x01\n ListScheduleMatchingTimesRequest\x12\x11\n\tnamespace\x18\x01 \x01(\t\x12\x13\n\x0bschedule_id\x18\x02 \x01(\t\x12.\n\nstart_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12,\n\x08\x65nd_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\"S\n!ListScheduleMatchingTimesResponse\x12.\n\nstart_time\x18\x01 \x03(\x0b\x32\x1a.google.protobuf.Timestamp\"Q\n\x15\x44\x65leteScheduleRequest\x12\x11\n\tnamespace\x18\x01 \x01(\t\x12\x13\n\x0bschedule_id\x18\x02 \x01(\t\x12\x10\n\x08identity\x18\x03 \x01(\t\"\x18\n\x16\x44\x65leteScheduleResponse\"]\n\x14ListSchedulesRequest\x12\x11\n\tnamespace\x18\x01 \x01(\t\x12\x19\n\x11maximum_page_size\x18\x02 \x01(\x05\x12\x17\n\x0fnext_page_token\x18\x03 \x01(\x0c\"p\n\x15ListSchedulesResponse\x12>\n\tschedules\x18\x01 \x03(\x0b\x32+.temporal.api.schedule.v1.ScheduleListEntry\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\x0c\"\x86\x05\n\'UpdateWorkerBuildIdCompatibilityRequest\x12\x11\n\tnamespace\x18\x01 \x01(\t\x12\x12\n\ntask_queue\x18\x02 \x01(\t\x12-\n#add_new_build_id_in_new_default_set\x18\x03 \x01(\tH\x00\x12\x87\x01\n\x1b\x61\x64\x64_new_compatible_build_id\x18\x04 \x01(\x0b\x32`.temporal.api.workflowservice.v1.UpdateWorkerBuildIdCompatibilityRequest.AddNewCompatibleVersionH\x00\x12!\n\x17promote_set_by_build_id\x18\x05 \x01(\tH\x00\x12%\n\x1bpromote_build_id_within_set\x18\x06 \x01(\tH\x00\x12h\n\nmerge_sets\x18\x07 \x01(\x0b\x32R.temporal.api.workflowservice.v1.UpdateWorkerBuildIdCompatibilityRequest.MergeSetsH\x00\x1ao\n\x17\x41\x64\x64NewCompatibleVersion\x12\x14\n\x0cnew_build_id\x18\x01 \x01(\t\x12$\n\x1c\x65xisting_compatible_build_id\x18\x02 \x01(\t\x12\x18\n\x10make_set_default\x18\x03 \x01(\x08\x1aI\n\tMergeSets\x12\x1c\n\x14primary_set_build_id\x18\x01 \x01(\t\x12\x1e\n\x16secondary_set_build_id\x18\x02 \x01(\tB\x0b\n\toperation\"@\n(UpdateWorkerBuildIdCompatibilityResponseJ\x04\x08\x01\x10\x02R\x0eversion_set_id\"_\n$GetWorkerBuildIdCompatibilityRequest\x12\x11\n\tnamespace\x18\x01 \x01(\t\x12\x12\n\ntask_queue\x18\x02 \x01(\t\x12\x10\n\x08max_sets\x18\x03 \x01(\x05\"t\n%GetWorkerBuildIdCompatibilityResponse\x12K\n\x12major_version_sets\x18\x01 \x03(\x0b\x32/.temporal.api.taskqueue.v1.CompatibleVersionSet\"\x9c\x01\n GetWorkerTaskReachabilityRequest\x12\x11\n\tnamespace\x18\x01 \x01(\t\x12\x11\n\tbuild_ids\x18\x02 \x03(\t\x12\x13\n\x0btask_queues\x18\x03 \x03(\t\x12=\n\x0creachability\x18\x04 \x01(\x0e\x32\'.temporal.api.enums.v1.TaskReachability\"r\n!GetWorkerTaskReachabilityResponse\x12M\n\x15\x62uild_id_reachability\x18\x01 \x03(\x0b\x32..temporal.api.taskqueue.v1.BuildIdReachability\"\x85\x02\n\x1eUpdateWorkflowExecutionRequest\x12\x11\n\tnamespace\x18\x01 \x01(\t\x12\x45\n\x12workflow_execution\x18\x02 \x01(\x0b\x32).temporal.api.common.v1.WorkflowExecution\x12\x1e\n\x16\x66irst_execution_run_id\x18\x03 \x01(\t\x12\x37\n\x0bwait_policy\x18\x04 \x01(\x0b\x32\".temporal.api.update.v1.WaitPolicy\x12\x30\n\x07request\x18\x05 \x01(\x0b\x32\x1f.temporal.api.update.v1.Request\"\xd7\x01\n\x1fUpdateWorkflowExecutionResponse\x12\x35\n\nupdate_ref\x18\x01 \x01(\x0b\x32!.temporal.api.update.v1.UpdateRef\x12\x30\n\x07outcome\x18\x02 \x01(\x0b\x32\x1f.temporal.api.update.v1.Outcome\x12K\n\x05stage\x18\x03 \x01(\x0e\x32<.temporal.api.enums.v1.UpdateWorkflowExecutionLifecycleStage\"\xdd\x04\n\x1aStartBatchOperationRequest\x12\x11\n\tnamespace\x18\x01 \x01(\t\x12\x18\n\x10visibility_query\x18\x02 \x01(\t\x12\x0e\n\x06job_id\x18\x03 \x01(\t\x12\x0e\n\x06reason\x18\x04 \x01(\t\x12=\n\nexecutions\x18\x05 \x03(\x0b\x32).temporal.api.common.v1.WorkflowExecution\x12!\n\x19max_operations_per_second\x18\x06 \x01(\x02\x12Q\n\x15termination_operation\x18\n \x01(\x0b\x32\x30.temporal.api.batch.v1.BatchOperationTerminationH\x00\x12G\n\x10signal_operation\x18\x0b \x01(\x0b\x32+.temporal.api.batch.v1.BatchOperationSignalH\x00\x12S\n\x16\x63\x61ncellation_operation\x18\x0c \x01(\x0b\x32\x31.temporal.api.batch.v1.BatchOperationCancellationH\x00\x12K\n\x12\x64\x65letion_operation\x18\r \x01(\x0b\x32-.temporal.api.batch.v1.BatchOperationDeletionH\x00\x12\x45\n\x0freset_operation\x18\x0e \x01(\x0b\x32*.temporal.api.batch.v1.BatchOperationResetH\x00\x42\x0b\n\toperation\"\x1d\n\x1bStartBatchOperationResponse\"`\n\x19StopBatchOperationRequest\x12\x11\n\tnamespace\x18\x01 \x01(\t\x12\x0e\n\x06job_id\x18\x02 \x01(\t\x12\x0e\n\x06reason\x18\x03 \x01(\t\x12\x10\n\x08identity\x18\x04 \x01(\t\"\x1c\n\x1aStopBatchOperationResponse\"B\n\x1d\x44\x65scribeBatchOperationRequest\x12\x11\n\tnamespace\x18\x01 \x01(\t\x12\x0e\n\x06job_id\x18\x02 \x01(\t\"\x92\x03\n\x1e\x44\x65scribeBatchOperationResponse\x12\x41\n\x0eoperation_type\x18\x01 \x01(\x0e\x32).temporal.api.enums.v1.BatchOperationType\x12\x0e\n\x06job_id\x18\x02 \x01(\t\x12\x39\n\x05state\x18\x03 \x01(\x0e\x32*.temporal.api.enums.v1.BatchOperationState\x12.\n\nstart_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12.\n\nclose_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x1d\n\x15total_operation_count\x18\x06 \x01(\x03\x12 \n\x18\x63omplete_operation_count\x18\x07 \x01(\x03\x12\x1f\n\x17\x66\x61ilure_operation_count\x18\x08 \x01(\x03\x12\x10\n\x08identity\x18\t \x01(\t\x12\x0e\n\x06reason\x18\n \x01(\t\"[\n\x1aListBatchOperationsRequest\x12\x11\n\tnamespace\x18\x01 \x01(\t\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x17\n\x0fnext_page_token\x18\x03 \x01(\x0c\"y\n\x1bListBatchOperationsResponse\x12\x41\n\x0eoperation_info\x18\x01 \x03(\x0b\x32).temporal.api.batch.v1.BatchOperationInfo\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\x0c\"\xb9\x01\n\"PollWorkflowExecutionUpdateRequest\x12\x11\n\tnamespace\x18\x01 \x01(\t\x12\x35\n\nupdate_ref\x18\x02 \x01(\x0b\x32!.temporal.api.update.v1.UpdateRef\x12\x10\n\x08identity\x18\x03 \x01(\t\x12\x37\n\x0bwait_policy\x18\x04 \x01(\x0b\x32\".temporal.api.update.v1.WaitPolicy\"\xdb\x01\n#PollWorkflowExecutionUpdateResponse\x12\x30\n\x07outcome\x18\x01 \x01(\x0b\x32\x1f.temporal.api.update.v1.Outcome\x12K\n\x05stage\x18\x02 \x01(\x0e\x32<.temporal.api.enums.v1.UpdateWorkflowExecutionLifecycleStage\x12\x35\n\nupdate_ref\x18\x03 \x01(\x0b\x32!.temporal.api.update.v1.UpdateRefB\xbe\x01\n\"io.temporal.api.workflowservice.v1B\x14RequestResponseProtoP\x01Z5go.temporal.io/api/workflowservice/v1;workflowservice\xaa\x02!Temporalio.Api.WorkflowService.V1\xea\x02$Temporalio::Api::WorkflowService::V1b\x06proto3" + +pool = Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Temporalio + module Api + module WorkflowService + module V1 + RegisterNamespaceRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("temporal.api.workflowservice.v1.RegisterNamespaceRequest").msgclass + RegisterNamespaceResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("temporal.api.workflowservice.v1.RegisterNamespaceResponse").msgclass + ListNamespacesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("temporal.api.workflowservice.v1.ListNamespacesRequest").msgclass + ListNamespacesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("temporal.api.workflowservice.v1.ListNamespacesResponse").msgclass + DescribeNamespaceRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("temporal.api.workflowservice.v1.DescribeNamespaceRequest").msgclass + DescribeNamespaceResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("temporal.api.workflowservice.v1.DescribeNamespaceResponse").msgclass + UpdateNamespaceRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("temporal.api.workflowservice.v1.UpdateNamespaceRequest").msgclass + UpdateNamespaceResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("temporal.api.workflowservice.v1.UpdateNamespaceResponse").msgclass + DeprecateNamespaceRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("temporal.api.workflowservice.v1.DeprecateNamespaceRequest").msgclass + DeprecateNamespaceResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("temporal.api.workflowservice.v1.DeprecateNamespaceResponse").msgclass + StartWorkflowExecutionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("temporal.api.workflowservice.v1.StartWorkflowExecutionRequest").msgclass + StartWorkflowExecutionResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("temporal.api.workflowservice.v1.StartWorkflowExecutionResponse").msgclass + GetWorkflowExecutionHistoryRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("temporal.api.workflowservice.v1.GetWorkflowExecutionHistoryRequest").msgclass + GetWorkflowExecutionHistoryResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("temporal.api.workflowservice.v1.GetWorkflowExecutionHistoryResponse").msgclass + GetWorkflowExecutionHistoryReverseRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("temporal.api.workflowservice.v1.GetWorkflowExecutionHistoryReverseRequest").msgclass + GetWorkflowExecutionHistoryReverseResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("temporal.api.workflowservice.v1.GetWorkflowExecutionHistoryReverseResponse").msgclass + PollWorkflowTaskQueueRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("temporal.api.workflowservice.v1.PollWorkflowTaskQueueRequest").msgclass + PollWorkflowTaskQueueResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("temporal.api.workflowservice.v1.PollWorkflowTaskQueueResponse").msgclass + RespondWorkflowTaskCompletedRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("temporal.api.workflowservice.v1.RespondWorkflowTaskCompletedRequest").msgclass + RespondWorkflowTaskCompletedResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("temporal.api.workflowservice.v1.RespondWorkflowTaskCompletedResponse").msgclass + RespondWorkflowTaskFailedRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("temporal.api.workflowservice.v1.RespondWorkflowTaskFailedRequest").msgclass + RespondWorkflowTaskFailedResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("temporal.api.workflowservice.v1.RespondWorkflowTaskFailedResponse").msgclass + PollActivityTaskQueueRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("temporal.api.workflowservice.v1.PollActivityTaskQueueRequest").msgclass + PollActivityTaskQueueResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("temporal.api.workflowservice.v1.PollActivityTaskQueueResponse").msgclass + RecordActivityTaskHeartbeatRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("temporal.api.workflowservice.v1.RecordActivityTaskHeartbeatRequest").msgclass + RecordActivityTaskHeartbeatResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("temporal.api.workflowservice.v1.RecordActivityTaskHeartbeatResponse").msgclass + RecordActivityTaskHeartbeatByIdRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("temporal.api.workflowservice.v1.RecordActivityTaskHeartbeatByIdRequest").msgclass + RecordActivityTaskHeartbeatByIdResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("temporal.api.workflowservice.v1.RecordActivityTaskHeartbeatByIdResponse").msgclass + RespondActivityTaskCompletedRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("temporal.api.workflowservice.v1.RespondActivityTaskCompletedRequest").msgclass + RespondActivityTaskCompletedResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("temporal.api.workflowservice.v1.RespondActivityTaskCompletedResponse").msgclass + RespondActivityTaskCompletedByIdRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("temporal.api.workflowservice.v1.RespondActivityTaskCompletedByIdRequest").msgclass + RespondActivityTaskCompletedByIdResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("temporal.api.workflowservice.v1.RespondActivityTaskCompletedByIdResponse").msgclass + RespondActivityTaskFailedRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("temporal.api.workflowservice.v1.RespondActivityTaskFailedRequest").msgclass + RespondActivityTaskFailedResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("temporal.api.workflowservice.v1.RespondActivityTaskFailedResponse").msgclass + RespondActivityTaskFailedByIdRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("temporal.api.workflowservice.v1.RespondActivityTaskFailedByIdRequest").msgclass + RespondActivityTaskFailedByIdResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("temporal.api.workflowservice.v1.RespondActivityTaskFailedByIdResponse").msgclass + RespondActivityTaskCanceledRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("temporal.api.workflowservice.v1.RespondActivityTaskCanceledRequest").msgclass + RespondActivityTaskCanceledResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("temporal.api.workflowservice.v1.RespondActivityTaskCanceledResponse").msgclass + RespondActivityTaskCanceledByIdRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("temporal.api.workflowservice.v1.RespondActivityTaskCanceledByIdRequest").msgclass + RespondActivityTaskCanceledByIdResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("temporal.api.workflowservice.v1.RespondActivityTaskCanceledByIdResponse").msgclass + RequestCancelWorkflowExecutionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("temporal.api.workflowservice.v1.RequestCancelWorkflowExecutionRequest").msgclass + RequestCancelWorkflowExecutionResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("temporal.api.workflowservice.v1.RequestCancelWorkflowExecutionResponse").msgclass + SignalWorkflowExecutionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("temporal.api.workflowservice.v1.SignalWorkflowExecutionRequest").msgclass + SignalWorkflowExecutionResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("temporal.api.workflowservice.v1.SignalWorkflowExecutionResponse").msgclass + SignalWithStartWorkflowExecutionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("temporal.api.workflowservice.v1.SignalWithStartWorkflowExecutionRequest").msgclass + SignalWithStartWorkflowExecutionResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("temporal.api.workflowservice.v1.SignalWithStartWorkflowExecutionResponse").msgclass + ResetWorkflowExecutionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("temporal.api.workflowservice.v1.ResetWorkflowExecutionRequest").msgclass + ResetWorkflowExecutionResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("temporal.api.workflowservice.v1.ResetWorkflowExecutionResponse").msgclass + TerminateWorkflowExecutionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("temporal.api.workflowservice.v1.TerminateWorkflowExecutionRequest").msgclass + TerminateWorkflowExecutionResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("temporal.api.workflowservice.v1.TerminateWorkflowExecutionResponse").msgclass + DeleteWorkflowExecutionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("temporal.api.workflowservice.v1.DeleteWorkflowExecutionRequest").msgclass + DeleteWorkflowExecutionResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("temporal.api.workflowservice.v1.DeleteWorkflowExecutionResponse").msgclass + ListOpenWorkflowExecutionsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("temporal.api.workflowservice.v1.ListOpenWorkflowExecutionsRequest").msgclass + ListOpenWorkflowExecutionsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("temporal.api.workflowservice.v1.ListOpenWorkflowExecutionsResponse").msgclass + ListClosedWorkflowExecutionsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("temporal.api.workflowservice.v1.ListClosedWorkflowExecutionsRequest").msgclass + ListClosedWorkflowExecutionsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("temporal.api.workflowservice.v1.ListClosedWorkflowExecutionsResponse").msgclass + ListWorkflowExecutionsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("temporal.api.workflowservice.v1.ListWorkflowExecutionsRequest").msgclass + ListWorkflowExecutionsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("temporal.api.workflowservice.v1.ListWorkflowExecutionsResponse").msgclass + ListArchivedWorkflowExecutionsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("temporal.api.workflowservice.v1.ListArchivedWorkflowExecutionsRequest").msgclass + ListArchivedWorkflowExecutionsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("temporal.api.workflowservice.v1.ListArchivedWorkflowExecutionsResponse").msgclass + ScanWorkflowExecutionsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("temporal.api.workflowservice.v1.ScanWorkflowExecutionsRequest").msgclass + ScanWorkflowExecutionsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("temporal.api.workflowservice.v1.ScanWorkflowExecutionsResponse").msgclass + CountWorkflowExecutionsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("temporal.api.workflowservice.v1.CountWorkflowExecutionsRequest").msgclass + CountWorkflowExecutionsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("temporal.api.workflowservice.v1.CountWorkflowExecutionsResponse").msgclass + CountWorkflowExecutionsResponse::AggregationGroup = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("temporal.api.workflowservice.v1.CountWorkflowExecutionsResponse.AggregationGroup").msgclass + GetSearchAttributesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("temporal.api.workflowservice.v1.GetSearchAttributesRequest").msgclass + GetSearchAttributesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("temporal.api.workflowservice.v1.GetSearchAttributesResponse").msgclass + RespondQueryTaskCompletedRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("temporal.api.workflowservice.v1.RespondQueryTaskCompletedRequest").msgclass + RespondQueryTaskCompletedResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("temporal.api.workflowservice.v1.RespondQueryTaskCompletedResponse").msgclass + ResetStickyTaskQueueRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("temporal.api.workflowservice.v1.ResetStickyTaskQueueRequest").msgclass + ResetStickyTaskQueueResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("temporal.api.workflowservice.v1.ResetStickyTaskQueueResponse").msgclass + QueryWorkflowRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("temporal.api.workflowservice.v1.QueryWorkflowRequest").msgclass + QueryWorkflowResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("temporal.api.workflowservice.v1.QueryWorkflowResponse").msgclass + DescribeWorkflowExecutionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("temporal.api.workflowservice.v1.DescribeWorkflowExecutionRequest").msgclass + DescribeWorkflowExecutionResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("temporal.api.workflowservice.v1.DescribeWorkflowExecutionResponse").msgclass + DescribeTaskQueueRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("temporal.api.workflowservice.v1.DescribeTaskQueueRequest").msgclass + DescribeTaskQueueResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("temporal.api.workflowservice.v1.DescribeTaskQueueResponse").msgclass + GetClusterInfoRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("temporal.api.workflowservice.v1.GetClusterInfoRequest").msgclass + GetClusterInfoResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("temporal.api.workflowservice.v1.GetClusterInfoResponse").msgclass + GetSystemInfoRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("temporal.api.workflowservice.v1.GetSystemInfoRequest").msgclass + GetSystemInfoResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("temporal.api.workflowservice.v1.GetSystemInfoResponse").msgclass + GetSystemInfoResponse::Capabilities = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("temporal.api.workflowservice.v1.GetSystemInfoResponse.Capabilities").msgclass + ListTaskQueuePartitionsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("temporal.api.workflowservice.v1.ListTaskQueuePartitionsRequest").msgclass + ListTaskQueuePartitionsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("temporal.api.workflowservice.v1.ListTaskQueuePartitionsResponse").msgclass + CreateScheduleRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("temporal.api.workflowservice.v1.CreateScheduleRequest").msgclass + CreateScheduleResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("temporal.api.workflowservice.v1.CreateScheduleResponse").msgclass + DescribeScheduleRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("temporal.api.workflowservice.v1.DescribeScheduleRequest").msgclass + DescribeScheduleResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("temporal.api.workflowservice.v1.DescribeScheduleResponse").msgclass + UpdateScheduleRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("temporal.api.workflowservice.v1.UpdateScheduleRequest").msgclass + UpdateScheduleResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("temporal.api.workflowservice.v1.UpdateScheduleResponse").msgclass + PatchScheduleRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("temporal.api.workflowservice.v1.PatchScheduleRequest").msgclass + PatchScheduleResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("temporal.api.workflowservice.v1.PatchScheduleResponse").msgclass + ListScheduleMatchingTimesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("temporal.api.workflowservice.v1.ListScheduleMatchingTimesRequest").msgclass + ListScheduleMatchingTimesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("temporal.api.workflowservice.v1.ListScheduleMatchingTimesResponse").msgclass + DeleteScheduleRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("temporal.api.workflowservice.v1.DeleteScheduleRequest").msgclass + DeleteScheduleResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("temporal.api.workflowservice.v1.DeleteScheduleResponse").msgclass + ListSchedulesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("temporal.api.workflowservice.v1.ListSchedulesRequest").msgclass + ListSchedulesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("temporal.api.workflowservice.v1.ListSchedulesResponse").msgclass + UpdateWorkerBuildIdCompatibilityRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("temporal.api.workflowservice.v1.UpdateWorkerBuildIdCompatibilityRequest").msgclass + UpdateWorkerBuildIdCompatibilityRequest::AddNewCompatibleVersion = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("temporal.api.workflowservice.v1.UpdateWorkerBuildIdCompatibilityRequest.AddNewCompatibleVersion").msgclass + UpdateWorkerBuildIdCompatibilityRequest::MergeSets = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("temporal.api.workflowservice.v1.UpdateWorkerBuildIdCompatibilityRequest.MergeSets").msgclass + UpdateWorkerBuildIdCompatibilityResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("temporal.api.workflowservice.v1.UpdateWorkerBuildIdCompatibilityResponse").msgclass + GetWorkerBuildIdCompatibilityRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("temporal.api.workflowservice.v1.GetWorkerBuildIdCompatibilityRequest").msgclass + GetWorkerBuildIdCompatibilityResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("temporal.api.workflowservice.v1.GetWorkerBuildIdCompatibilityResponse").msgclass + GetWorkerTaskReachabilityRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("temporal.api.workflowservice.v1.GetWorkerTaskReachabilityRequest").msgclass + GetWorkerTaskReachabilityResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("temporal.api.workflowservice.v1.GetWorkerTaskReachabilityResponse").msgclass + UpdateWorkflowExecutionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("temporal.api.workflowservice.v1.UpdateWorkflowExecutionRequest").msgclass + UpdateWorkflowExecutionResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("temporal.api.workflowservice.v1.UpdateWorkflowExecutionResponse").msgclass + StartBatchOperationRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("temporal.api.workflowservice.v1.StartBatchOperationRequest").msgclass + StartBatchOperationResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("temporal.api.workflowservice.v1.StartBatchOperationResponse").msgclass + StopBatchOperationRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("temporal.api.workflowservice.v1.StopBatchOperationRequest").msgclass + StopBatchOperationResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("temporal.api.workflowservice.v1.StopBatchOperationResponse").msgclass + DescribeBatchOperationRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("temporal.api.workflowservice.v1.DescribeBatchOperationRequest").msgclass + DescribeBatchOperationResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("temporal.api.workflowservice.v1.DescribeBatchOperationResponse").msgclass + ListBatchOperationsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("temporal.api.workflowservice.v1.ListBatchOperationsRequest").msgclass + ListBatchOperationsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("temporal.api.workflowservice.v1.ListBatchOperationsResponse").msgclass + PollWorkflowExecutionUpdateRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("temporal.api.workflowservice.v1.PollWorkflowExecutionUpdateRequest").msgclass + PollWorkflowExecutionUpdateResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("temporal.api.workflowservice.v1.PollWorkflowExecutionUpdateResponse").msgclass + end + end + end +end diff --git a/temporalio/lib/temporalio/api/workflowservice/v1/service.rb b/temporalio/lib/temporalio/api/workflowservice/v1/service.rb new file mode 100644 index 00000000..fb9e2d48 --- /dev/null +++ b/temporalio/lib/temporalio/api/workflowservice/v1/service.rb @@ -0,0 +1,23 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: temporal/api/workflowservice/v1/service.proto + +require 'google/protobuf' + +require 'temporalio/api/workflowservice/v1/request_response' +require 'google/api/annotations_pb' + + +descriptor_data = "\n-temporal/api/workflowservice/v1/service.proto\x12\x1ftemporal.api.workflowservice.v1\x1a\x36temporal/api/workflowservice/v1/request_response.proto\x1a\x1cgoogle/api/annotations.proto2\x8a]\n\x0fWorkflowService\x12\xa9\x01\n\x11RegisterNamespace\x12\x39.temporal.api.workflowservice.v1.RegisterNamespaceRequest\x1a:.temporal.api.workflowservice.v1.RegisterNamespaceResponse\"\x1d\x82\xd3\xe4\x93\x02\x17\"\x12/api/v1/namespaces:\x01*\x12\xb2\x01\n\x11\x44\x65scribeNamespace\x12\x39.temporal.api.workflowservice.v1.DescribeNamespaceRequest\x1a:.temporal.api.workflowservice.v1.DescribeNamespaceResponse\"&\x82\xd3\xe4\x93\x02 \x12\x1e/api/v1/namespaces/{namespace}\x12\x9d\x01\n\x0eListNamespaces\x12\x36.temporal.api.workflowservice.v1.ListNamespacesRequest\x1a\x37.temporal.api.workflowservice.v1.ListNamespacesResponse\"\x1a\x82\xd3\xe4\x93\x02\x14\x12\x12/api/v1/namespaces\x12\xb6\x01\n\x0fUpdateNamespace\x12\x37.temporal.api.workflowservice.v1.UpdateNamespaceRequest\x1a\x38.temporal.api.workflowservice.v1.UpdateNamespaceResponse\"0\x82\xd3\xe4\x93\x02*\"%/api/v1/namespaces/{namespace}/update:\x01*\x12\x8f\x01\n\x12\x44\x65precateNamespace\x12:.temporal.api.workflowservice.v1.DeprecateNamespaceRequest\x1a;.temporal.api.workflowservice.v1.DeprecateNamespaceResponse\"\x00\x12\xdc\x01\n\x16StartWorkflowExecution\x12>.temporal.api.workflowservice.v1.StartWorkflowExecutionRequest\x1a?.temporal.api.workflowservice.v1.StartWorkflowExecutionResponse\"A\x82\xd3\xe4\x93\x02;\"6/api/v1/namespaces/{namespace}/workflows/{workflow_id}:\x01*\x12\xfa\x01\n\x1bGetWorkflowExecutionHistory\x12\x43.temporal.api.workflowservice.v1.GetWorkflowExecutionHistoryRequest\x1a\x44.temporal.api.workflowservice.v1.GetWorkflowExecutionHistoryResponse\"P\x82\xd3\xe4\x93\x02J\x12H/api/v1/namespaces/{namespace}/workflows/{execution.workflow_id}/history\x12\x97\x02\n\"GetWorkflowExecutionHistoryReverse\x12J.temporal.api.workflowservice.v1.GetWorkflowExecutionHistoryReverseRequest\x1aK.temporal.api.workflowservice.v1.GetWorkflowExecutionHistoryReverseResponse\"X\x82\xd3\xe4\x93\x02R\x12P/api/v1/namespaces/{namespace}/workflows/{execution.workflow_id}/history-reverse\x12\x98\x01\n\x15PollWorkflowTaskQueue\x12=.temporal.api.workflowservice.v1.PollWorkflowTaskQueueRequest\x1a>.temporal.api.workflowservice.v1.PollWorkflowTaskQueueResponse\"\x00\x12\xad\x01\n\x1cRespondWorkflowTaskCompleted\x12\x44.temporal.api.workflowservice.v1.RespondWorkflowTaskCompletedRequest\x1a\x45.temporal.api.workflowservice.v1.RespondWorkflowTaskCompletedResponse\"\x00\x12\xa4\x01\n\x19RespondWorkflowTaskFailed\x12\x41.temporal.api.workflowservice.v1.RespondWorkflowTaskFailedRequest\x1a\x42.temporal.api.workflowservice.v1.RespondWorkflowTaskFailedResponse\"\x00\x12\x98\x01\n\x15PollActivityTaskQueue\x12=.temporal.api.workflowservice.v1.PollActivityTaskQueueRequest\x1a>.temporal.api.workflowservice.v1.PollActivityTaskQueueResponse\"\x00\x12\xe8\x01\n\x1bRecordActivityTaskHeartbeat\x12\x43.temporal.api.workflowservice.v1.RecordActivityTaskHeartbeatRequest\x1a\x44.temporal.api.workflowservice.v1.RecordActivityTaskHeartbeatResponse\">\x82\xd3\xe4\x93\x02\x38\"3/api/v1/namespaces/{namespace}/activities/heartbeat:\x01*\x12\xfa\x01\n\x1fRecordActivityTaskHeartbeatById\x12G.temporal.api.workflowservice.v1.RecordActivityTaskHeartbeatByIdRequest\x1aH.temporal.api.workflowservice.v1.RecordActivityTaskHeartbeatByIdResponse\"D\x82\xd3\xe4\x93\x02>\"9/api/v1/namespaces/{namespace}/activities/heartbeat-by-id:\x01*\x12\xea\x01\n\x1cRespondActivityTaskCompleted\x12\x44.temporal.api.workflowservice.v1.RespondActivityTaskCompletedRequest\x1a\x45.temporal.api.workflowservice.v1.RespondActivityTaskCompletedResponse\"=\x82\xd3\xe4\x93\x02\x37\"2/api/v1/namespaces/{namespace}/activities/complete:\x01*\x12\xfc\x01\n RespondActivityTaskCompletedById\x12H.temporal.api.workflowservice.v1.RespondActivityTaskCompletedByIdRequest\x1aI.temporal.api.workflowservice.v1.RespondActivityTaskCompletedByIdResponse\"C\x82\xd3\xe4\x93\x02=\"8/api/v1/namespaces/{namespace}/activities/complete-by-id:\x01*\x12\xdd\x01\n\x19RespondActivityTaskFailed\x12\x41.temporal.api.workflowservice.v1.RespondActivityTaskFailedRequest\x1a\x42.temporal.api.workflowservice.v1.RespondActivityTaskFailedResponse\"9\x82\xd3\xe4\x93\x02\x33\"./api/v1/namespaces/{namespace}/activities/fail:\x01*\x12\xef\x01\n\x1dRespondActivityTaskFailedById\x12\x45.temporal.api.workflowservice.v1.RespondActivityTaskFailedByIdRequest\x1a\x46.temporal.api.workflowservice.v1.RespondActivityTaskFailedByIdResponse\"?\x82\xd3\xe4\x93\x02\x39\"4/api/v1/namespaces/{namespace}/activities/fail-by-id:\x01*\x12\xe5\x01\n\x1bRespondActivityTaskCanceled\x12\x43.temporal.api.workflowservice.v1.RespondActivityTaskCanceledRequest\x1a\x44.temporal.api.workflowservice.v1.RespondActivityTaskCanceledResponse\";\x82\xd3\xe4\x93\x02\x35\"0/api/v1/namespaces/{namespace}/activities/cancel:\x01*\x12\xf7\x01\n\x1fRespondActivityTaskCanceledById\x12G.temporal.api.workflowservice.v1.RespondActivityTaskCanceledByIdRequest\x1aH.temporal.api.workflowservice.v1.RespondActivityTaskCanceledByIdResponse\"A\x82\xd3\xe4\x93\x02;\"6/api/v1/namespaces/{namespace}/activities/cancel-by-id:\x01*\x12\x8e\x02\n\x1eRequestCancelWorkflowExecution\x12\x46.temporal.api.workflowservice.v1.RequestCancelWorkflowExecutionRequest\x1aG.temporal.api.workflowservice.v1.RequestCancelWorkflowExecutionResponse\"[\x82\xd3\xe4\x93\x02U\"P/api/v1/namespaces/{namespace}/workflows/{workflow_execution.workflow_id}/cancel:\x01*\x12\x87\x02\n\x17SignalWorkflowExecution\x12?.temporal.api.workflowservice.v1.SignalWorkflowExecutionRequest\x1a@.temporal.api.workflowservice.v1.SignalWorkflowExecutionResponse\"i\x82\xd3\xe4\x93\x02\x63\"^/api/v1/namespaces/{namespace}/workflows/{workflow_execution.workflow_id}/signal/{signal_name}:\x01*\x12\x9a\x02\n SignalWithStartWorkflowExecution\x12H.temporal.api.workflowservice.v1.SignalWithStartWorkflowExecutionRequest\x1aI.temporal.api.workflowservice.v1.SignalWithStartWorkflowExecutionResponse\"a\x82\xd3\xe4\x93\x02[\"V/api/v1/namespaces/{namespace}/workflows/{workflow_id}/signal-with-start/{signal_name}:\x01*\x12\xf5\x01\n\x16ResetWorkflowExecution\x12>.temporal.api.workflowservice.v1.ResetWorkflowExecutionRequest\x1a?.temporal.api.workflowservice.v1.ResetWorkflowExecutionResponse\"Z\x82\xd3\xe4\x93\x02T\"O/api/v1/namespaces/{namespace}/workflows/{workflow_execution.workflow_id}/reset:\x01*\x12\x85\x02\n\x1aTerminateWorkflowExecution\x12\x42.temporal.api.workflowservice.v1.TerminateWorkflowExecutionRequest\x1a\x43.temporal.api.workflowservice.v1.TerminateWorkflowExecutionResponse\"^\x82\xd3\xe4\x93\x02X\"S/api/v1/namespaces/{namespace}/workflows/{workflow_execution.workflow_id}/terminate:\x01*\x12\x9e\x01\n\x17\x44\x65leteWorkflowExecution\x12?.temporal.api.workflowservice.v1.DeleteWorkflowExecutionRequest\x1a@.temporal.api.workflowservice.v1.DeleteWorkflowExecutionResponse\"\x00\x12\xa7\x01\n\x1aListOpenWorkflowExecutions\x12\x42.temporal.api.workflowservice.v1.ListOpenWorkflowExecutionsRequest\x1a\x43.temporal.api.workflowservice.v1.ListOpenWorkflowExecutionsResponse\"\x00\x12\xad\x01\n\x1cListClosedWorkflowExecutions\x12\x44.temporal.api.workflowservice.v1.ListClosedWorkflowExecutionsRequest\x1a\x45.temporal.api.workflowservice.v1.ListClosedWorkflowExecutionsResponse\"\x00\x12\xcb\x01\n\x16ListWorkflowExecutions\x12>.temporal.api.workflowservice.v1.ListWorkflowExecutionsRequest\x1a?.temporal.api.workflowservice.v1.ListWorkflowExecutionsResponse\"0\x82\xd3\xe4\x93\x02*\x12(/api/v1/namespaces/{namespace}/workflows\x12\xec\x01\n\x1eListArchivedWorkflowExecutions\x12\x46.temporal.api.workflowservice.v1.ListArchivedWorkflowExecutionsRequest\x1aG.temporal.api.workflowservice.v1.ListArchivedWorkflowExecutionsResponse\"9\x82\xd3\xe4\x93\x02\x33\x12\x31/api/v1/namespaces/{namespace}/archived-workflows\x12\x9b\x01\n\x16ScanWorkflowExecutions\x12>.temporal.api.workflowservice.v1.ScanWorkflowExecutionsRequest\x1a?.temporal.api.workflowservice.v1.ScanWorkflowExecutionsResponse\"\x00\x12\xd3\x01\n\x17\x43ountWorkflowExecutions\x12?.temporal.api.workflowservice.v1.CountWorkflowExecutionsRequest\x1a@.temporal.api.workflowservice.v1.CountWorkflowExecutionsResponse\"5\x82\xd3\xe4\x93\x02/\x12-/api/v1/namespaces/{namespace}/workflow-count\x12\x92\x01\n\x13GetSearchAttributes\x12;.temporal.api.workflowservice.v1.GetSearchAttributesRequest\x1a<.temporal.api.workflowservice.v1.GetSearchAttributesResponse\"\x00\x12\xa4\x01\n\x19RespondQueryTaskCompleted\x12\x41.temporal.api.workflowservice.v1.RespondQueryTaskCompletedRequest\x1a\x42.temporal.api.workflowservice.v1.RespondQueryTaskCompletedResponse\"\x00\x12\x95\x01\n\x14ResetStickyTaskQueue\x12<.temporal.api.workflowservice.v1.ResetStickyTaskQueueRequest\x1a=.temporal.api.workflowservice.v1.ResetStickyTaskQueueResponse\"\x00\x12\xe4\x01\n\rQueryWorkflow\x12\x35.temporal.api.workflowservice.v1.QueryWorkflowRequest\x1a\x36.temporal.api.workflowservice.v1.QueryWorkflowResponse\"d\x82\xd3\xe4\x93\x02^\"Y/api/v1/namespaces/{namespace}/workflows/{execution.workflow_id}/query/{query.query_type}:\x01*\x12\xec\x01\n\x19\x44\x65scribeWorkflowExecution\x12\x41.temporal.api.workflowservice.v1.DescribeWorkflowExecutionRequest\x1a\x42.temporal.api.workflowservice.v1.DescribeWorkflowExecutionResponse\"H\x82\xd3\xe4\x93\x02\x42\x12@/api/v1/namespaces/{namespace}/workflows/{execution.workflow_id}\x12\xd0\x01\n\x11\x44\x65scribeTaskQueue\x12\x39.temporal.api.workflowservice.v1.DescribeTaskQueueRequest\x1a:.temporal.api.workflowservice.v1.DescribeTaskQueueResponse\"D\x82\xd3\xe4\x93\x02>\x12\x82\xd3\xe4\x93\x02\x38\x12\x36/api/v1/namespaces/{namespace}/schedules/{schedule_id}\x12\xcb\x01\n\x0eUpdateSchedule\x12\x36.temporal.api.workflowservice.v1.UpdateScheduleRequest\x1a\x37.temporal.api.workflowservice.v1.UpdateScheduleResponse\"H\x82\xd3\xe4\x93\x02\x42\"=/api/v1/namespaces/{namespace}/schedules/{schedule_id}/update:\x01*\x12\xc7\x01\n\rPatchSchedule\x12\x35.temporal.api.workflowservice.v1.PatchScheduleRequest\x1a\x36.temporal.api.workflowservice.v1.PatchScheduleResponse\"G\x82\xd3\xe4\x93\x02\x41\"\x82\xd3\xe4\x93\x02\x38*6/api/v1/namespaces/{namespace}/schedules/{schedule_id}\x12\xb0\x01\n\rListSchedules\x12\x35.temporal.api.workflowservice.v1.ListSchedulesRequest\x1a\x36.temporal.api.workflowservice.v1.ListSchedulesResponse\"0\x82\xd3\xe4\x93\x02*\x12(/api/v1/namespaces/{namespace}/schedules\x12\xb9\x01\n UpdateWorkerBuildIdCompatibility\x12H.temporal.api.workflowservice.v1.UpdateWorkerBuildIdCompatibilityRequest\x1aI.temporal.api.workflowservice.v1.UpdateWorkerBuildIdCompatibilityResponse\"\x00\x12\x8d\x02\n\x1dGetWorkerBuildIdCompatibility\x12\x45.temporal.api.workflowservice.v1.GetWorkerBuildIdCompatibilityRequest\x1a\x46.temporal.api.workflowservice.v1.GetWorkerBuildIdCompatibilityResponse\"]\x82\xd3\xe4\x93\x02W\x12U/api/v1/namespaces/{namespace}/task-queues/{task_queue}/worker-build-id-compatibility\x12\xe3\x01\n\x19GetWorkerTaskReachability\x12\x41.temporal.api.workflowservice.v1.GetWorkerTaskReachabilityRequest\x1a\x42.temporal.api.workflowservice.v1.GetWorkerTaskReachabilityResponse\"?\x82\xd3\xe4\x93\x02\x39\x12\x37/api/v1/namespaces/{namespace}/worker-task-reachability\x12\x8e\x02\n\x17UpdateWorkflowExecution\x12?.temporal.api.workflowservice.v1.UpdateWorkflowExecutionRequest\x1a@.temporal.api.workflowservice.v1.UpdateWorkflowExecutionResponse\"p\x82\xd3\xe4\x93\x02j\"e/api/v1/namespaces/{namespace}/workflows/{workflow_execution.workflow_id}/update/{request.input.name}:\x01*\x12\xaa\x01\n\x1bPollWorkflowExecutionUpdate\x12\x43.temporal.api.workflowservice.v1.PollWorkflowExecutionUpdateRequest\x1a\x44.temporal.api.workflowservice.v1.PollWorkflowExecutionUpdateResponse\"\x00\x12\xd5\x01\n\x13StartBatchOperation\x12;.temporal.api.workflowservice.v1.StartBatchOperationRequest\x1a<.temporal.api.workflowservice.v1.StartBatchOperationResponse\"C\x82\xd3\xe4\x93\x02=\"8/api/v1/namespaces/{namespace}/batch-operations/{job_id}:\x01*\x12\xd7\x01\n\x12StopBatchOperation\x12:.temporal.api.workflowservice.v1.StopBatchOperationRequest\x1a;.temporal.api.workflowservice.v1.StopBatchOperationResponse\"H\x82\xd3\xe4\x93\x02\x42\"=/api/v1/namespaces/{namespace}/batch-operations/{job_id}/stop:\x01*\x12\xdb\x01\n\x16\x44\x65scribeBatchOperation\x12>.temporal.api.workflowservice.v1.DescribeBatchOperationRequest\x1a?.temporal.api.workflowservice.v1.DescribeBatchOperationResponse\"@\x82\xd3\xe4\x93\x02:\x12\x38/api/v1/namespaces/{namespace}/batch-operations/{job_id}\x12\xc9\x01\n\x13ListBatchOperations\x12;.temporal.api.workflowservice.v1.ListBatchOperationsRequest\x1a<.temporal.api.workflowservice.v1.ListBatchOperationsResponse\"7\x82\xd3\xe4\x93\x02\x31\x12//api/v1/namespaces/{namespace}/batch-operationsB\xb6\x01\n\"io.temporal.api.workflowservice.v1B\x0cServiceProtoP\x01Z5go.temporal.io/api/workflowservice/v1;workflowservice\xaa\x02!Temporalio.Api.WorkflowService.V1\xea\x02$Temporalio::Api::WorkflowService::V1b\x06proto3" + +pool = Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Temporalio + module Api + module WorkflowService + module V1 + end + end + end +end diff --git a/temporalio/lib/temporalio/client.rb b/temporalio/lib/temporalio/client.rb new file mode 100644 index 00000000..55df03fa --- /dev/null +++ b/temporalio/lib/temporalio/client.rb @@ -0,0 +1,282 @@ +# frozen_string_literal: true + +require 'temporalio/api' +require 'temporalio/client/connection' +require 'temporalio/client/interceptor' +require 'temporalio/client/workflow_handle' +require 'temporalio/converters' +require 'temporalio/runtime' + +module Temporalio + # Client for accessing Temporal. + # + # Most users will use {connect} to connect a client. The {workflow_service} method provides access to a raw gRPC + # client. To create another client on the same connection, like for a different namespace, {dup_options} may be + # used to get the options as a struct which can then be altered and splatted as kwargs to the constructor (e.g. + # +Client.new(**my_options.to_h)+). + # + # Clients are thread-safe and are meant to be reused for the life of the application. They are built to work in both + # synchronous and asynchronous contexts. Internally they use callbacks based on {Queue} which means they are + # Fiber-compatible. + class Client + # Options as returned from {dup_options} for +**to_h+ splat use in {initialize}. See {initialize} for details. + Options = Struct.new( + :connection, + :namespace, + :data_converter, + :interceptors, + :default_workflow_query_reject_condition, + keyword_init: true + ) + + # Connect to Temporal server. This is a shortcut for +Connection.new+ followed by +Client.new+. + # + # @param target_host [String] +host:port+ for the Temporal server. For local development, this is often + # +localhost:7233+. + # @param namespace [String] Namespace to use for client calls. + # @param api_key [String, nil] API key for Temporal. This becomes the +Authorization+ HTTP header with +"Bearer "+ + # prepended. This is only set if RPC metadata doesn't already have an +authorization+ key. + # @param tls [Boolean, Connection::TLSOptions] If false, do not use TLS. If true, use system default TLS options. If + # TLS options are present, those TLS options will be used. + # @param data_converter [Converters::DataConverter] Data converter to use for all data conversions to/from payloads. + # @param interceptors [Array] Set of interceptors that are chained together to allow intercepting of + # client calls. The earlier interceptors wrap the later ones. Any interceptors that also implement + # {Worker::Interceptor} will be used as worker interceptors too so they should not be given separately when + # creating a worker. + # @param default_workflow_query_reject_condition [Api::Enums::V1::QueryRejectCondition, nil] Default rejection + # condition for workflow queries if not set during query. See {WorkflowHandle.query} for details on the + # rejection condition. + # @param rpc_metadata [Hash{String=>String}] Headers to use for all calls to the server. Keys here can be overriden + # by per-call RPC metadata keys. + # @param rpc_retry [Connection::RPCRetryOptions] Retry options for direct service calls (when opted in) or all + # high-level calls made by this client (which all opt-in to retries by default). + # @param identity [String] Identity for this client. + # @param keep_alive [Connection::KeepAliveOptions] Keep-alive options for the client connection. Can be set to +nil+ + # to disable. + # @param http_connect_proxy [Connection::HTTPConnectProxyOptions] Options for HTTP CONNECT proxy. + # @param runtime [Runtime] Runtime for this client. + # @param lazy_connect [Boolean] If true, the client will not connect until the first call is attempted or a worker + # is created with it. Lazy clients cannot be used for workers if they have not performed a connection. + # + # @return [Client] Connected client. + # + # @see Connection.initialize + # @see initialize + def self.connect( + target_host, + namespace, + api_key: nil, + tls: false, + data_converter: Converters::DataConverter.default, + interceptors: [], + default_workflow_query_reject_condition: nil, + rpc_metadata: {}, + rpc_retry: Connection::RPCRetryOptions.new, + identity: "#{Process.pid}@#{Socket.gethostname}", + keep_alive: Connection::KeepAliveOptions.new, # Set to nil to disable + http_connect_proxy: nil, + runtime: Runtime.default, + lazy_connect: false + ) + Client.new( + connection: Connection.new( + target_host:, + api_key:, + tls:, + rpc_metadata:, + rpc_retry:, + identity:, + keep_alive:, + http_connect_proxy:, + runtime:, + lazy_connect: + ), + namespace:, + data_converter:, + interceptors:, + default_workflow_query_reject_condition: + ) + end + + # Create a client from an existing connection. Most users will prefer {connect} instead. Parameters here match + # {Options} returned from {dup_options} by intention so options can be altered and splatted to create a new client. + # + # @param connection [Connection] Existing connection to create a client from. + # @param namespace [String] Namespace to use for client calls. + # @param data_converter [Converters::DataConverter] Data converter to use for all data conversions to/from payloads. + # @param interceptors [Array] Set of interceptors that are chained together to allow intercepting of + # client calls. The earlier interceptors wrap the later ones. + # + # Any interceptors that also implement {Worker::Interceptor} will be used as worker interceptors too so they + # should not be given separately when creating a worker. + # @param default_workflow_query_reject_condition [Api::Enums::V1::QueryRejectCondition, nil] Default rejection + # condition for workflow queries if not set during query. See {WorkflowHandle.query} for details on the + # rejection condition. + # + # @see connect + def initialize( + connection:, + namespace:, + data_converter: DataConverter.default, + interceptors: [], + default_workflow_query_reject_condition: nil + ) + @options = Options.new( + connection:, + namespace:, + data_converter:, + interceptors:, + default_workflow_query_reject_condition: + ) + # Initialize interceptors + @impl = interceptors.reverse_each.reduce(Implementation.new(self)) do |acc, int| + int.intercept_client(acc) + end + end + + # @return [Connection] Underlying connection for this client. + def connection + @options.connection + end + + # @return [String] Namespace used in calls by this client. + def namespace + @options.namespace + end + + # @return [DataConverter] Data converter used by this client. + def data_converter + @options.data_converter + end + + # @return [Connection::WorkflowService] Raw gRPC workflow service. + def workflow_service + connection.workflow_service + end + + # @return [Options] Shallow duplication of options for potential use in {initialize}. Note, this is shallow, so + # attributes like {Options.interceptors} are not duplicated, but no mutations will apply. + def dup_options + @options.dup + end + + # Start a workflow and return its handle. + # + # @param workflow [Workflow, String] Name of the workflow + # @param args [Array] Arguments to the workflow. + # @param id [String] Unique identifier for the workflow execution. + # @param task_queue [String] Task queue to run the workflow on. + # + # @return [WorkflowHandle] A workflow handle to the started workflow. + # @raise [Error::RPCError] RPC error from call. + def start_workflow( + workflow, + *args, + id:, + task_queue: + # TODO(cretz): More + ) + @impl.start_workflow(Interceptor::StartWorkflowInput.new( + workflow:, + args:, + id:, + task_queue: + )) + end + + # Start a workflow and wait for its result. This is a shortcut for {start_workflow} + {WorkflowHandle.result}. + # + # @param workflow [Workflow, String] Name of the workflow + # @param args [Array] Arguments to the workflow. + # @param id [String] Unique identifier for the workflow execution. + # @param task_queue [String] Task queue to run the workflow on. + # + # @return [Object] Successful result of the workflow. + # @raise [Error::WorkflowFailureError] Workflow failed with {Error::WorkflowFailureError.cause} as cause. + # @raise [Error::RPCError] RPC error from call. + def execute_workflow( + workflow, + *args, + id:, + task_queue: + # TODO(cretz): More + ) + start_workflow(workflow, *args, id:, task_queue:).result + end + + # Get a workflow handle to an existing workflow by its ID. + # + # @param workflow_id [String] Workflow ID to get a handle to. + # @param run_id [String, nil] Run ID that will be used for all calls. Many choose to leave this unset which ensures + # interactions occur on the latest of the workflow ID. + # @param first_execution_run_id [String, nil] First execution run ID used for some calls like cancellation and + # termination to ensure the affected workflow is only within the same chain as this given run ID. + # + # @return [WorkflowHandle] The workflow handle. + def workflow_handle( + workflow_id, + run_id: nil, + first_execution_run_id: nil + ) + WorkflowHandle.new(self, workflow_id, run_id:, result_run_id: run_id, first_execution_run_id:) + end + + # @!visibility private + def _impl + @impl + end + + # @!visibility private + class Implementation < Interceptor::Outbound + def initialize(client) + super(nil) + @client = client + end + + # @!visibility private + def start_workflow(input) + # TODO(cretz): Signal with start + req = Api::WorkflowService::V1::StartWorkflowExecutionRequest.new( + request_id: SecureRandom.uuid, + namespace: @client.namespace, + workflow_type: Api::Common::V1::WorkflowType.new(name: input.workflow.to_s), + workflow_id: input.id, + task_queue: Api::TaskQueue::V1::TaskQueue.new(name: input.task_queue.to_s), + input: @client.data_converter.to_payloads(input.args) + # TODO(cretz): More things + ) + # TODO(cretz): RPC params, error handling, etc + resp = @client.workflow_service.start_workflow_execution(req) + WorkflowHandle.new( + @client, + input.id, + result_run_id: resp.run_id, + first_execution_run_id: resp.run_id + ) + end + + # @!visibility private + def fetch_workflow_history_event_page(input) + req = Api::WorkflowService::V1::GetWorkflowExecutionHistoryRequest.new( + namespace: @client.namespace, + execution: Api::Common::V1::WorkflowExecution.new( + workflow_id: input.id, + run_id: input.run_id || '' + ), + maximum_page_size: input.page_size || 0, + next_page_token: input.next_page_token, + wait_new_event: input.wait_new_event, + history_event_filter_type: input.event_filter_type, + skip_archival: input.skip_archival + # TODO(cretz): More things + ) + # TODO(cretz): RPC params + resp = @client.workflow_service.get_workflow_execution_history(req) + Interceptor::FetchWorkflowHistoryEventPage.new( + events: resp.history&.events || [], + next_page_token: resp.next_page_token.empty? ? nil : resp.next_page_token + ) + end + end + end +end diff --git a/temporalio/lib/temporalio/client/connection.rb b/temporalio/lib/temporalio/client/connection.rb new file mode 100644 index 00000000..f33be934 --- /dev/null +++ b/temporalio/lib/temporalio/client/connection.rb @@ -0,0 +1,247 @@ +# frozen_string_literal: true + +require 'socket' +require 'temporalio/client/connection/workflow_service' +require 'temporalio/internal/bridge/client' +require 'temporalio/runtime' +require 'temporalio/version' + +module Temporalio + class Client + # Connection to Temporal server that is not namespace specific. Most users will use {Client.connect} instead of this + # directly. + class Connection + # Options as returned from {dup_options} for +**to_h+ splat use in {initialize}. See {initialize} for details. + Options = Struct.new( + :target_host, + :api_key, + :tls, + :rpc_metadata, + :rpc_retry, + :identity, + :keep_alive, + :http_connect_proxy, + :runtime, + :lazy_connect, + keyword_init: true + ) + + # TLS options. All attributes are optional, and an empty options set just enables default TLS. + # + # @!attribute client_cert + # @return [String, nil] Client certificate for mTLS. Must be combined with {client_private_key}. + # @!attribute client_private_key + # @return [String, nil] Client private key for mTLS. Must be combined with {client_cert}. + # @!attribute server_root_ca_cert + # @return [String, nil] Root CA certificate to validate the server certificate against. This is only needed for + # self-hosted servers with self-signed server certificates. + # @!attribute domain + # @return [String, nil] SNI override. This is only needed for self-hosted servers with certificates that do not + # match the hostname being connected to. + TLSOptions = Struct.new( + :client_cert, + :client_private_key, + :server_root_ca_cert, + :domain, + keyword_init: true + ) + + # Retry options for server calls when retry is enabled (which it is by default on all high-level {Client} calls). + # For most users, the default is preferred. + # + # @!attribute initial_interval_ms + # @return [Integer] Initial backoff interval, default 100. + # @!attribute randomization_factor + # @return [Float] Randomization jitter to add, default 0.2. + # @!attribute multiplier + # @return [Float] Backoff multiplier, default 1.5. + # @!attribute max_interval_ms + # @return [Integer] Maximum backoff interval, default 5000. + # @!attribute max_elapsed_time_ms + # @return [Integer] Maximum total time, default 10000. + # @!attribute max_retries + # @return [Integer] Maximum number of retries, default 10. + RPCRetryOptions = Struct.new( + :initial_interval_ms, + :randomization_factor, + :multiplier, + :max_interval_ms, + :max_elapsed_time_ms, # Can use 0 for none + :max_retries, + keyword_init: true + ) do + def initialize(*, **kwargs) + kwargs[:initial_interval_ms] = 100 unless kwargs.key?(:initial_interval_ms) + kwargs[:randomization_factor] = 0.2 unless kwargs.key?(:randomization_factor) + kwargs[:multiplier] = 1.5 unless kwargs.key?(:multiplier) + kwargs[:max_interval_ms] = 5000 unless kwargs.key?(:max_interval_ms) + kwargs[:max_elapsed_time_ms] = 10_000 unless kwargs.key?(:max_elapsed_time_ms) + kwargs[:max_retries] = 10 unless kwargs.key?(:max_retries) + super + end + end + + # Keep-alive options for client connections. For most users, the default is preferred. + # + # @!attribute interval_ms + # @return [Integer] Interval to send HTTP2 keep alive pings, default 30000. + # @!attribute timeout_ms + # @return [Integer] Timeout that the keep alive must be responded to within or the connection will be closed, + # default 15000. + KeepAliveOptions = Struct.new( + :interval_ms, + :timeout_ms, + keyword_init: true + ) do + def initialize(*, **kwargs) + kwargs[:interval_ms] = 30_000 unless kwargs.key?(:interval_ms) + kwargs[:timeout_ms] = 15_000 unless kwargs.key?(:timeout_ms) + super + end + end + + # Options for HTTP CONNECT proxy for client connections. + # + # @!attribute target_host + # @return [String] Target host:port for the HTTP CONNECT proxy. + # @!attribute basic_auth_user + # @return [String, nil] User for HTTP basic auth for the proxy, must be combined with {basic_auth_pass}. + # @!attribute basic_auth_pass + # @return [String, nil] Pass for HTTP basic auth for the proxy, must be combined with {basic_auth_user}. + HTTPConnectProxyOptions = Struct.new( + :target_host, + :basic_auth_user, # Optional + :basic_auth_pass, # Optional, + keyword_init: true + ) + + # @return [WorkflowService] Raw gRPC workflow service. + attr_reader :workflow_service + + # Connect to Temporal server. Most users will use {Client.connect} instead of this directly. Parameters here match + # {Options} returned from {dup_options} by intention so options can be altered and splatted to create a new + # connection. + # + # @param target_host [String] +host:port+ for the Temporal server. For local development, this is often + # +localhost:7233+. + # @param api_key [String, nil] API key for Temporal. This becomes the +Authorization+ HTTP header with +"Bearer "+ + # prepended. This is only set if RPC metadata doesn't already have an +authorization+ key. + # @param tls [Boolean, TLSOptions] If false, do not use TLS. If true, use system default TLS options. If TLS + # options are present, those TLS options will be used. + # @param rpc_metadata [Hash{String=>String}] Headers to use for all calls to the server. Keys here can be + # overriden by per-call RPC metadata keys. + # @param rpc_retry [RPCRetryOptions] Retry options for direct service calls (when opted in) or all high-level + # calls made by this client (which all opt-in to retries by default). + # @param identity [String] Identity for this client. + # @param keep_alive [KeepAliveOptions] Keep-alive options for the client connection. Can be set to +nil+ to + # disable. + # @param http_connect_proxy [HTTPConnectProxyOptions] Options for HTTP CONNECT proxy. + # @param runtime [Runtime] Runtime for this client. + # @param lazy_connect [Boolean] If true, there is no connection until the first call is attempted or a worker + # is created with it. Clients from lazy connections cannot be used for workers if they have not performed a + # connection. + # + # @see Client.connect + def initialize( + target_host:, + api_key: nil, + tls: false, + rpc_metadata: {}, + rpc_retry: RPCRetryOptions.new, + identity: "#{Process.pid}@#{Socket.gethostname}", + keep_alive: KeepAliveOptions.new, + http_connect_proxy: nil, + runtime: Runtime.default, + lazy_connect: false + ) + @options = Options.new( + target_host:, + api_key:, + tls:, + rpc_metadata:, + rpc_retry:, + identity:, + keep_alive:, + http_connect_proxy:, + runtime:, + lazy_connect: + ) + # Create core client now if not lazy + _core_client unless lazy_connect + # Create service instances + @workflow_service = WorkflowService.new(self) + end + + # @return [String] Target host this connection is connected to. + def target_host + @options.target_host + end + + # @return [Options] Shallow duplication of options for potential use in {initialize}. Note, this is shallow, so + # attributes like {Options.rpc_metadata} are not duplicated, but no mutations will apply. + def dup_options + @options.dup + end + + # @!visibility private + def _core_client + # If lazy, this needs to be done under mutex + if @options.lazy_connect + @core_client_mutex ||= Mutex.new + @core_client_mutex.synchronize do + @core_client ||= new_core_client + end + else + @core_client ||= new_core_client + end + end + + private + + def new_core_client + options = Internal::Bridge::Client::Options.new( + target_host: @options.target_host, + client_name: 'temporal-ruby', + client_version: VERSION, + rpc_metadata: @options.rpc_metadata, + api_key: @options.api_key, + rpc_retry: Internal::Bridge::Client::RPCRetryOptions.new( + initial_interval_ms: @options.rpc_retry.initial_interval_ms, + randomization_factor: @options.rpc_retry.randomization_factor, + multiplier: @options.rpc_retry.multiplier, + max_interval_ms: @options.rpc_retry.max_interval_ms, + max_elapsed_time_ms: @options.rpc_retry.max_elapsed_time_ms, + max_retries: @options.rpc_retry.max_retries + ), + identity: @options.identity || "#{Process.pid}@#{Socket.gethostname}" + ) + if @options.tls + options.tls = if @options.tls.is_a?(TLSOptions) + Internal::Bridge::Client::TLSOptions.new( + client_cert: @options.tls.client_cert, + client_private_key: @options.tls.client_private_key, + server_root_ca_cert: @options.tls.server_root_ca_cert, + domain: @options.tls.domain + ) + else + Internal::Bridge::Client::TLSOptions.new + end + end + if @options.keep_alive + options.keep_alive = Internal::Bridge::Client::KeepAliveOptions.new( + interval_ms: @options.keep_alive.interval_ms, + timeout_ms: @options.keep_alive.timeout_ms + ) + end + if @options.http_connect_proxy + options.http_connect_proxy = Internal::Bridge::Client::HTTPConnectProxyOptions.new( + target_host: @options.http_connect_proxy.target_host, + basic_auth_user: @options.http_connect_proxy.basic_auth_user, + basic_auth_pass: @options.http_connect_proxy.basic_auth_pass + ) + end + Internal::Bridge::Client.new(@options.runtime._core_runtime, options) + end + end + end +end diff --git a/temporalio/lib/temporalio/client/connection/service.rb b/temporalio/lib/temporalio/client/connection/service.rb new file mode 100644 index 00000000..c44d38dc --- /dev/null +++ b/temporalio/lib/temporalio/client/connection/service.rb @@ -0,0 +1,46 @@ +# frozen_string_literal: true + +require 'google/protobuf' +require 'temporalio/api' + +module Temporalio + class Client + class Connection + # Base class for raw gRPC services. + class Service + # @!visibility private + def self.rpc_methods(service, service_name) + # Do service lookup + desc = Google::Protobuf::DescriptorPool.generated_pool.lookup(service_name) + raise 'Failed finding service descriptor' unless desc + + # Create an RPC call for each method + desc.each do |method| + # Camel case to snake case + rpc = method.name.gsub(/([A-Z])/, '_\1').downcase.delete_prefix('_') + define_method(rpc.to_sym) do |request, rpc_retry: false, rpc_metadata: {}, rpc_timeout_ms: 0| + raise 'Invalid request type' unless request.is_a?(method.input_type.msgclass) + + @connection._core_client._invoke_rpc( + service:, + rpc:, + request:, + response_class: method.output_type.msgclass, + rpc_retry:, + rpc_metadata:, + rpc_timeout_ms: + ) + end + end + end + + private_class_method :rpc_methods + + # @!visibility private + def initialize(connection) + @connection = connection + end + end + end + end +end diff --git a/temporalio/lib/temporalio/client/connection/workflow_service.rb b/temporalio/lib/temporalio/client/connection/workflow_service.rb new file mode 100644 index 00000000..aa5c2579 --- /dev/null +++ b/temporalio/lib/temporalio/client/connection/workflow_service.rb @@ -0,0 +1,20 @@ +# frozen_string_literal: true + +require 'temporalio/api' +require 'temporalio/client/connection/service' +require 'temporalio/internal/bridge/client' + +module Temporalio + class Client + class Connection + # Raw gRPC workflow service as defined at + # https://github.com/temporalio/api/blob/master/temporal/api/workflowservice/v1/service.proto. + class WorkflowService < Service + rpc_methods( + Internal::Bridge::Client::SERVICE_WORKFLOW, + 'temporal.api.workflowservice.v1.WorkflowService' + ) + end + end + end +end diff --git a/temporalio/lib/temporalio/client/interceptor.rb b/temporalio/lib/temporalio/client/interceptor.rb new file mode 100644 index 00000000..28d30192 --- /dev/null +++ b/temporalio/lib/temporalio/client/interceptor.rb @@ -0,0 +1,78 @@ +# frozen_string_literal: true + +module Temporalio + class Client + # Mixin for intercepting clients. Classes that +include+ this should implement their own {intercept_client} that + # returns their own instance of {Outbound}. + module Interceptor + # Method called when intercepting a client. This is called upon client creation. + # + # @param next_interceptor [Outbound] Next interceptor in the chain that should be called. This is usually passed + # to {Outbound} constructor. + # @return [Outbound] Interceptor to be called for client calls. + def intercept_client(next_interceptor) + next_interceptor + end + + # Input for {Outbound.start_workflow}. + StartWorkflowInput = Struct.new( + :workflow, + :args, + :id, + :task_queue, + # TODO(cretz): more + keyword_init: true + ) + + # Input for {Outbound.fetch_workflow_history_event_page}. + FetchWorkflowHistoryEventPageInput = Struct.new( + :id, + :run_id, + :page_size, + :next_page_token, + :wait_new_event, + :event_filter_type, + :skip_archival, + # TODO(cretz): more + keyword_init: true + ) + + # Output for {Outbound.fetch_workflow_history_event_page}. + FetchWorkflowHistoryEventPage = Struct.new( + :events, + :next_page_token, + keyword_init: true + ) + + # Outbound interceptor for intercepting client calls. This should be extended by users needing to intercept client + # actions. + class Outbound + # @return [Outbound] Next interceptor in the chain. + attr_reader :next_interceptor + + # Initialize outbound with the next interceptor in the chain. + # + # @param next_interceptor [Outbound] Next interceptor in the chain. + def initialize(next_interceptor) + @next_interceptor = next_interceptor + end + + # Called for every {Client.start_workflow} and {Client.execute_workflow} call. + # + # @param input [StartWorkflowInput] Input. + # @return [WorkflowHandle] Workflow handle. + def start_workflow(input) + next_interceptor.start_workflow(input) + end + + # Called everytime the client needs a page of workflow history. This includes getting the result. + # + # @param input [FetchWorkflowHistoryEventPageInput] Input. + # @return [FetchWorkflowHistoryEventPage] Event page. + def fetch_workflow_history_event_page(input) + next_interceptor.fetch_workflow_history_event_page(input) + end + end + end + end +end diff --git a/temporalio/lib/temporalio/client/workflow_handle.rb b/temporalio/lib/temporalio/client/workflow_handle.rb new file mode 100644 index 00000000..cb65fa8b --- /dev/null +++ b/temporalio/lib/temporalio/client/workflow_handle.rb @@ -0,0 +1,194 @@ +# frozen_string_literal: true + +require 'temporalio/api' +require 'temporalio/client/interceptor' +require 'temporalio/error' + +module Temporalio + class Client + # Handle for interacting with a workflow. This is usually created via {Client.start_workflow} or + # {Client.workflow_handle}. + class WorkflowHandle + # @return [String] ID for the workflow. + attr_reader :id + + # Run ID used for {signal}, {query}, and {update} calls if present to ensure the signal/query/update happen on + # this exact run. + # + # This is only created via {Client.workflow_handle}. {Client.start_workflow} will not set this value. + # + # This cannot be mutated. If a different run ID is needed, {Client.workflow_handle} must be used instead. + # + # @return [String, nil] Run ID. + attr_reader :run_id + + # Run ID used for {result} calls if present to ensure result is for a workflow starting from this run. + # + # When this handle is created via {Client.workflow_handle}, this is the same as {run_id}. When this handle is + # created via {Client.start_workflow}, this value will be the resulting run ID. + # + # This cannot be mutated. If a different run ID is needed, {Client.workflow_handle} must be used instead. + # + # @return [String, nil] Result run ID. + attr_reader :result_run_id + + # Run ID used for some calls like {cancel} and {terminate} to ensure the cancel and terminate happen for a + # workflow ID on a chain started with this run ID. + # + # This can be set when using {Client.workflow_handle}. When {Client.start_workflow} is called without a start + # signal, this is set to the resulting run. + # + # This cannot be mutated. If a different first execution run ID is needed, {Client.workflow_handle} must be used + # instead. + # + # @return [String, nil] First execution run ID. + attr_reader :first_execution_run_id + + # Create a workflow handle. {Client.workflow_handle} is preferred over instantiating this directly. + def initialize(client, id, run_id: nil, result_run_id: nil, first_execution_run_id: nil) + @client = client + @id = id + @run_id = run_id + @result_run_id = result_run_id + @first_execution_run_id = first_execution_run_id + end + + # Wait for the result of the workflow. + # + # This will use {result_run_id} if present to base the result on. To use another run ID, a new handle must be + # created via {Client.workflow_handle}. + # + # @param follow_runs [Boolean] If +true+, workflow runs will be continually fetched across retries and continue as + # new until the latest one is found. If +false+, the first result is used. + # + # @return [Object] Result of the workflow after being converted by the data converter. + # + # @raise [Error::WorkflowFailureError] Workflow failed with {Error::WorkflowFailureError.cause} as cause. + # @raise [Error::WorkflowContinuedAsNewError] Workflow continued as new and +follow_runs+ is +false+. + # @raise [Error::RPCError] RPC error from call. + def result(follow_runs: true) + # Wait on the close event, following as needed + hist_run_id = result_run_id + loop do + # Get close event + event = fetch_history_events_for_run( + hist_run_id, + page_size: nil, + wait_new_event: true, + event_filter_type: Api::Enums::V1::HistoryEventFilterType::HISTORY_EVENT_FILTER_TYPE_CLOSE_EVENT, + skip_archival: true + ).next + + # Check each close type' + case event.event_type + when :EVENT_TYPE_WORKFLOW_EXECUTION_COMPLETED + attrs = event.workflow_execution_completed_event_attributes + hist_run_id = attrs.new_execution_run_id + next if follow_runs && !hist_run_id.empty? + + return @client.data_converter.from_payloads(attrs.result).first + when :EVENT_TYPE_WORKFLOW_EXECUTION_FAILED + attrs = event.workflow_execution_failed_event_attributes + hist_run_id = attrs.new_execution_run_id + next if follow_runs && !hist_run_id.empty? + + raise Error::WorkflowFailureError.new(cause: @client.data_converter.from_failure(attrs.failure)) + when :EVENT_TYPE_WORKFLOW_EXECUTION_CANCELED + attrs = event.workflow_execution_canceled_event_attributes + raise Error::WorkflowFailureError.new( + cause: Error::CancelledError.new( + 'Workflow execution cancelled', + details: @client.data_converter.from_payloads(attrs&.details) + ) + ) + when :EVENT_TYPE_WORKFLOW_EXECUTION_TERMINATED + attrs = event.workflow_execution_terminated_event_attributes + raise Error::WorkflowFailureError.new( + cause: Error::TerminatedError.new( + attrs.reason.empty? ? 'Workflow execution cancelled' : attrs.reason, + details: @client.data_converter.from_payloads(attrs&.details) + ) + ) + when :EVENT_TYPE_WORKFLOW_EXECUTION_TIMED_OUT + attrs = event.workflow_execution_timed_out_event_attributes + hist_run_id = attrs.new_execution_run_id + next if follow_runs && !hist_run_id.empty? + + raise Error::WorkflowFailureError.new( + cause: Error::TimeoutError.new( + 'Workflow execution timed out', + type: Api::Enums::V1::TimeoutType::TIMEOUT_TYPE_START_TO_CLOSE + ) + ) + when :EVENT_TYPE_WORKFLOW_EXECUTION_CONTINUED_AS_NEW + attrs = event.workflow_execution_continued_as_new_event_attributes + hist_run_id = attrs.new_execution_run_id + next if follow_runs && !hist_run_id.empty? + + # TODO: Use more specific error and decode failure + raise Error::WorkflowContinuedAsNewError.new(new_run_id: attrs.new_execution_run_id) + else + raise Error, "Unknown close event type: #{event.event_type}" + end + end + end + + # Fetch an enumerable of history events for this workflow. Internally this is done in paginated form, but it is + # presented as an enumerable. + # + # @param page_size [Integer, nil] Page size for each internal page fetch. Most users will not need to set this + # since the enumerable hides pagination. + # @param wait_new_event [Boolean] If +true+, when the end of the current set of events is reached but the workflow + # is not complete, this will wait for the next event. If +false+, the enumerable completes at the end of current + # history. + # @param event_filter_type [Api::Enums::V1::HistoryEventFilterType] Types of events to fetch. + # @param skip_archival [Boolean] Whether to skip archival. + # + # @return [Enumerable] Enumerable events. + def fetch_history_events( + page_size: nil, + wait_new_event: false, + event_filter_type: Api::Enums::V1::HistoryEventFilterType::HISTORY_EVENT_FILTER_TYPE_ALL_EVENT, + skip_archival: false + ) + fetch_history_events_for_run( + run_id, + page_size:, + wait_new_event:, + event_filter_type:, + skip_archival: + ) + end + + private + + def fetch_history_events_for_run( + run_id, + page_size:, + wait_new_event:, + event_filter_type:, + skip_archival: + # TODO(cretz): RPC stuff + ) + Enumerator.new do |yielder| + input = Interceptor::FetchWorkflowHistoryEventPageInput.new( + id:, + run_id:, + page_size:, + next_page_token: nil, + wait_new_event:, + event_filter_type:, + skip_archival: + ) + loop do + page = @client._impl.fetch_workflow_history_event_page(input) + page.events.each { |event| yielder << event } + break unless page.next_page_token + + input.next_page_token = page.next_page_token + end + end + end + end + end +end diff --git a/temporalio/lib/temporalio/converters.rb b/temporalio/lib/temporalio/converters.rb new file mode 100644 index 00000000..ba21be0b --- /dev/null +++ b/temporalio/lib/temporalio/converters.rb @@ -0,0 +1,9 @@ +# frozen_string_literal: true + +require 'temporalio/converters/data_converter' + +module Temporalio + # Module for data conversion. + module Converters + end +end diff --git a/temporalio/lib/temporalio/converters/data_converter.rb b/temporalio/lib/temporalio/converters/data_converter.rb new file mode 100644 index 00000000..df2e005c --- /dev/null +++ b/temporalio/lib/temporalio/converters/data_converter.rb @@ -0,0 +1,105 @@ +# frozen_string_literal: true + +require 'temporalio/api' +require 'temporalio/converters/failure_converter' +require 'temporalio/converters/payload_converter' + +module Temporalio + module Converters + # Data converter for converting/encoding payloads to/from Ruby values. + class DataConverter + # @return [PayloadConverter] Payload converter. This must be Ractor shareable. + attr_reader :payload_converter + + # @return [FailureConverter] Failure converter. This must be Ractor shareable. + attr_reader :failure_converter + + # @return [PayloadCodec, nil] Optional codec for encoding/decoding payload bytes such as for encryption. + attr_reader :payload_codec + + # @return [DataConverter] Default data converter. + def self.default + @default ||= DataConverter.new + end + + # Create data converter. + # + # @param payload_converter [PayloadConverter] Payload converter to use. This must be Ractor shareable. + # @param failure_converter [FailureConverter] Failure converter to use. This must be Ractor shareable. + # @param payload_codec [PayloadCodec, nil] Payload codec to use. + def initialize( + payload_converter: PayloadConverter.default, + failure_converter: FailureConverter.default, + payload_codec: nil + ) + raise 'Payload converter not shareable' unless Ractor.shareable?(payload_converter) + raise 'Failure converter not shareable' unless Ractor.shareable?(failure_converter) + + @payload_converter = payload_converter + @failure_converter = failure_converter + @payload_codec = payload_codec + end + + # Convert a Ruby value to a payload and encode it. + # + # @param value [Object] Ruby value. + # @return [Api::Common::V1::Payload] Converted and encoded payload. + def to_payload(value) + payload_converter.to_payload(value) + # TODO(cretz): + # payload = payload_codec.encode_payload(payload) if payload_codec + end + + # Convert multiple Ruby values to a payload set and encode it. + # + # @param value [Object] Ruby values, converted to array via {Kernel.Array}. + # @return [Api::Common::V1::Payloads] Converted and encoded payload set. + def to_payloads(values) + payloads = Array(values).map { |value| payload_converter.to_payload(value) } + # TODO(cretz): + # payloads = payload_codec.encode_payloads(payloads) if payload_codec + Api::Common::V1::Payloads.new(payloads:) + end + + # Decode and convert a payload to a Ruby value. + # + # @param payload [Api::Common::V1::Payload] Encoded payload. + # @return [Object] Decoded and converted Ruby value. + def from_payload(payload) + # TODO(cretz): + # payload = payload_codec.decode_payload(payload) if payload_codec + payload_converter.from_payload(payload) + end + + # Decode and convert a payload set to Ruby values. + # + # @param payloads [Api::Common::V1::Payloads] Encoded payload set. + # @return [Array] Decoded and converted Ruby values. + def from_payloads(payloads) + # TODO(cretz): + # payloads = payload_codec.decode_payloads(payloads) if payload_codec + payloads.payloads.map { |payload| payload_converter.from_payload(payload) } + end + + # Convert a Ruby error to a Temporal failure and encode it. + # + # @param error [Exception] Ruby error. + # @return [Api::Failure::V1::Failure] Converted and encoded failure. + def to_failure(error) + failure_converter.to_failure(error, payload_converter) + # TODO(cretz): + # failure = payload_codec.encode_failure(failure) if payload_codec + end + + # Decode and convert a Temporal failure to a Ruby error. + # + # @param failure [Api::Failure::V1::Failure] Encoded failure. + # @return [Exception] Decoded and converted Ruby error. + def from_failure(failure) + # TODO(cretz): + # failure = payload_codec.decode_failure(failure) if payload_codec + failure_converter.from_failure(failure, payload_converter) + end + end + end +end diff --git a/temporalio/lib/temporalio/converters/failure_converter.rb b/temporalio/lib/temporalio/converters/failure_converter.rb new file mode 100644 index 00000000..853bc6b1 --- /dev/null +++ b/temporalio/lib/temporalio/converters/failure_converter.rb @@ -0,0 +1,39 @@ +# frozen_string_literal: true + +module Temporalio + module Converters + # Base class for converting Ruby errors to/from Temporal failures. + class FailureConverter + # @return [FailureConverter] Default failure converter. + def self.default + @default ||= Ractor.make_shareable(FailureConverter.new) + end + + # Create failure converter. + # + # @param encode_common_attributes [Boolean] If +true+, the message and stack trace of the failure will be moved + # into the encoded attribute section of the failure which can be encoded with a codec. + def initialize(encode_common_attributes: false) + @encode_common_attributes = encode_common_attributes + end + + # Convert a Ruby error to a Temporal failure. + # + # @param error [Exception] Ruby error. + # @param payload_converter [PayloadConverter] Payload converter. + # @return [Api::Failure::V1::Failure] Converted failure. + def to_failure(_error, _payload_converter) + raise 'TODO' + end + + # Convert a Temporal failure to a Ruby error. + # + # @param failure [Api::Failure::V1::Failure] Failure. + # @param payload_converter [PayloadConverter] Payload converter. + # @return [Exception] Converted Ruby error. + def from_failure(_failure, _payload_converter) + raise 'TODO' + end + end + end +end diff --git a/temporalio/lib/temporalio/converters/payload_converter.rb b/temporalio/lib/temporalio/converters/payload_converter.rb new file mode 100644 index 00000000..dfb00f3d --- /dev/null +++ b/temporalio/lib/temporalio/converters/payload_converter.rb @@ -0,0 +1,52 @@ +# frozen_string_literal: true + +require 'temporalio/converters/payload_converter/binary_null' +require 'temporalio/converters/payload_converter/binary_plain' +require 'temporalio/converters/payload_converter/binary_protobuf' +require 'temporalio/converters/payload_converter/composite' +require 'temporalio/converters/payload_converter/json_plain' +require 'temporalio/converters/payload_converter/json_protobuf' + +module Temporalio + module Converters + # Base class for converting Ruby values to/from Temporal payloads. + class PayloadConverter + # @return [FailureConverter] Default payload converter. + def self.default + @default ||= new_with_defaults + end + + # Create a new payload converter with the default set of encoding converters. + # + # @param json_parse_options [Hash] Options for {JSON.parse}. + # @param json_generate_options [Hash] Options for {JSON.generate}. + def self.new_with_defaults(json_parse_options: { create_additions: true }, json_generate_options: {}) + Ractor.make_shareable( + PayloadConverter::Composite.new( + PayloadConverter::BinaryNull.new, + PayloadConverter::BinaryPlain.new, + PayloadConverter::JSONProtobuf.new, + PayloadConverter::BinaryProtobuf.new, + PayloadConverter::JSONPlain.new(parse_options: json_parse_options, generate_options: json_generate_options) + ) + ) + end + + # Convert a Ruby value to a payload. + # + # @param value [Object] Ruby value. + # @return [Api::Common::V1::Payload] Converted payload. + def to_payload(value) + raise NotImplementedError + end + + # Convert a payload to a Ruby value. + # + # @param payload [Api::Common::V1::Payload] Payload. + # @return [Object] Converted Ruby value. + def from_payload(payload) + raise NotImplementedError + end + end + end +end diff --git a/temporalio/lib/temporalio/converters/payload_converter/binary_null.rb b/temporalio/lib/temporalio/converters/payload_converter/binary_null.rb new file mode 100644 index 00000000..7cda6422 --- /dev/null +++ b/temporalio/lib/temporalio/converters/payload_converter/binary_null.rb @@ -0,0 +1,34 @@ +# frozen_string_literal: true + +require 'temporalio/api' +require 'temporalio/converters/payload_converter/encoding' + +module Temporalio + module Converters + class PayloadConverter + # Encoding for +nil+ values for +binary/null+ encoding. + class BinaryNull < Encoding + ENCODING = 'binary/null' + + # (see Encoding.encoding) + def encoding + ENCODING + end + + # (see Encoding.to_payload) + def to_payload(value) + return nil unless value.nil? + + Api::Common::V1::Payload.new( + metadata: { 'encoding' => ENCODING } + ) + end + + # (see Encoding.from_payload) + def from_payload(_payload) + nil + end + end + end + end +end diff --git a/temporalio/lib/temporalio/converters/payload_converter/binary_plain.rb b/temporalio/lib/temporalio/converters/payload_converter/binary_plain.rb new file mode 100644 index 00000000..c6f77296 --- /dev/null +++ b/temporalio/lib/temporalio/converters/payload_converter/binary_plain.rb @@ -0,0 +1,35 @@ +# frozen_string_literal: true + +require 'temporalio/api' +require 'temporalio/converters/payload_converter/encoding' + +module Temporalio + module Converters + class PayloadConverter + # Encoding for +ASCII_8BIT+ string values for +binary/plain+ encoding. + class BinaryPlain < Encoding + ENCODING = 'binary/plain' + + # (see Encoding.encoding) + def encoding + ENCODING + end + + # (see Encoding.to_payload) + def to_payload(value) + return nil unless value.is_a?(String) && value.encoding == ::Encoding::ASCII_8BIT + + Temporalio::Api::Common::V1::Payload.new( + metadata: { 'encoding' => ENCODING }, + data: value + ) + end + + # (see Encoding.from_payload) + def from_payload(payload) + payload.data + end + end + end + end +end diff --git a/temporalio/lib/temporalio/converters/payload_converter/binary_protobuf.rb b/temporalio/lib/temporalio/converters/payload_converter/binary_protobuf.rb new file mode 100644 index 00000000..43580f17 --- /dev/null +++ b/temporalio/lib/temporalio/converters/payload_converter/binary_protobuf.rb @@ -0,0 +1,40 @@ +# frozen_string_literal: true + +require 'google/protobuf' +require 'temporalio/api' +require 'temporalio/converters/payload_converter/encoding' + +module Temporalio + module Converters + class PayloadConverter + # Encoding for Protobuf values for +binary/protobuf+ encoding. + class BinaryProtobuf < Encoding + ENCODING = 'binary/protobuf' + + # (see Encoding.encoding) + def encoding + ENCODING + end + + # (see Encoding.to_payload) + def to_payload(value) + return nil unless value.is_a?(Google::Protobuf::MessageExts) + + Api::Common::V1::Payload.new( + metadata: { 'encoding' => ENCODING, 'messageType' => value.class.descriptor.name }, + data: value.to_proto + ) + end + + # (see Encoding.from_payload) + def from_payload(payload) + type = payload.metadata['messageType'] + desc = Google::Protobuf::DescriptorPool.generated_pool.lookup(type) + raise "No protobuf message found in global pool for message type #{type}" unless desc + + desc.msgclass.decode(payload.data) + end + end + end + end +end diff --git a/temporalio/lib/temporalio/converters/payload_converter/composite.rb b/temporalio/lib/temporalio/converters/payload_converter/composite.rb new file mode 100644 index 00000000..a9b23379 --- /dev/null +++ b/temporalio/lib/temporalio/converters/payload_converter/composite.rb @@ -0,0 +1,62 @@ +# frozen_string_literal: true + +require 'temporalio/api' +require 'temporalio/converters/payload_converter' + +module Temporalio + module Converters + class PayloadConverter + # Payload converter that is a collection of {EncodingConverter}s. When converting to a payload, it tries each + # encoding converter in order until one works. The encoding converter is expected to set the +encoding+ metadata + # which is then used to match to the proper encoding converter when converting back to a Ruby value. + class Composite < PayloadConverter + class ConverterNotFound < Error; end + class EncodingNotSet < Error; end + + # @return [Array] Encoding converters processed in order. + attr_reader :converters + + # Create a payload converter with the given encoding converters processed in order. + # + # @param converters [Array] Encoding converters. + def initialize(*converters) + super() + @converters = converters.each_with_object({}) do |converter, result| + result[converter.encoding] = converter + result + end + @converters.freeze + end + + # Convert Ruby value to a payload by going over each encoding converter in order until one can convert. + # + # @param value [Object] Ruby value to convert. + # @return [Api::Common::V1::Payload] Converted payload. + # @raise [ConverterNotFound] If no converters can process the value. + def to_payload(value) + converters.each_value do |converter| + payload = converter.to_payload(value) + return payload unless payload.nil? + end + raise ConverterNotFound, "Value of type #{value} has no known converter" + end + + # Convert payload to Ruby value based on its +encoding+ metadata on the payload. + # + # @param payload [Api::Common::V1::Payload] Payload to convert. + # @return [Object] Converted Ruby value. + # @raise [EncodingNotSet] If encoding not set on the metadata. + # @raise [ConverterNotFound] If no converter found for the encoding. + def from_payload(payload) + encoding = payload.metadata['encoding'] + raise EncodingNotSet, 'Missing payload encoding' unless encoding + + converter = converters[encoding] + raise ConverterNotFound, "No converter for encoding #{encoding}" unless converter + + converter.from_payload(payload) + end + end + end + end +end diff --git a/temporalio/lib/temporalio/converters/payload_converter/encoding.rb b/temporalio/lib/temporalio/converters/payload_converter/encoding.rb new file mode 100644 index 00000000..55ab5398 --- /dev/null +++ b/temporalio/lib/temporalio/converters/payload_converter/encoding.rb @@ -0,0 +1,35 @@ +# frozen_string_literal: true + +module Temporalio + module Converters + class PayloadConverter + # Base class for encoding converters that can be used for {Composite} converters. Each converter has an {encoding} + # that should be set on the Payload metadata for values it can process. Implementers must implement {encoding} + class Encoding + # @return [String] Encoding that will be put on the payload metadata if this encoding converter can handle the + # value. + def encoding + raise NotImplementedError + end + + # Convert value to payload if this encoding converter can handle it, or return +nil+. If the converter can + # handle it, the resulting payload must have +encoding+ metadata on the payload set to the value of {encoding}. + # + # @param value [Object] Ruby value to possibly convert. + # @return [Api::Common::V1::Payload, nil] Converted payload if it can handle it, +nil+ otherwise. + def to_payload(value) + raise NotImplementedError + end + + # Convert the payload to a Ruby value. The caller confirms the +encoding+ metadata matches {encoding}, so this + # will error if it cannot convert. + # + # @param payload [Api::Common::V1::Payload] Payload to convert. + # @return [Object] Converted Ruby value. + def from_payload(payload) + raise NotImplementedError + end + end + end + end +end diff --git a/temporalio/lib/temporalio/converters/payload_converter/json_plain.rb b/temporalio/lib/temporalio/converters/payload_converter/json_plain.rb new file mode 100644 index 00000000..5645c614 --- /dev/null +++ b/temporalio/lib/temporalio/converters/payload_converter/json_plain.rb @@ -0,0 +1,43 @@ +# frozen_string_literal: true + +require 'temporalio/api' +require 'temporalio/converters/payload_converter/encoding' + +module Temporalio + module Converters + class PayloadConverter + # Encoding for all values for +json/plain+ encoding. + class JSONPlain < Encoding + ENCODING = 'json/plain' + + # Create JSONPlain converter. + # + # @param parse_options [Hash] Options for {JSON.parse}. + # @param generate_options [Hash] Options for {JSON.generate}. + def initialize(parse_options: { create_additions: true }, generate_options: {}) + super() + @parse_options = parse_options + @generate_options = generate_options + end + + # (see Encoding.encoding) + def encoding + ENCODING + end + + # (see Encoding.to_payload) + def to_payload(value) + Api::Common::V1::Payload.new( + metadata: { 'encoding' => ENCODING }, + data: JSON.generate(value, @generate_options).b + ) + end + + # (see Encoding.from_payload) + def from_payload(payload) + JSON.parse(payload.data, @parse_options) + end + end + end + end +end diff --git a/temporalio/lib/temporalio/converters/payload_converter/json_protobuf.rb b/temporalio/lib/temporalio/converters/payload_converter/json_protobuf.rb new file mode 100644 index 00000000..89f8fb79 --- /dev/null +++ b/temporalio/lib/temporalio/converters/payload_converter/json_protobuf.rb @@ -0,0 +1,40 @@ +# frozen_string_literal: true + +require 'google/protobuf' +require 'temporalio/api' +require 'temporalio/converters/payload_converter/encoding' + +module Temporalio + module Converters + class PayloadConverter + # Encoding for Protobuf values for +json/protobuf+ encoding. + class JSONProtobuf < Encoding + ENCODING = 'json/protobuf' + + # (see Encoding.encoding) + def encoding + ENCODING + end + + # (see Encoding.to_payload) + def to_payload(value) + return nil unless value.is_a?(Google::Protobuf::MessageExts) + + Api::Common::V1::Payload.new( + metadata: { 'encoding' => ENCODING, 'messageType' => value.class.descriptor.name }, + data: value.to_json + ) + end + + # (see Encoding.from_payload) + def from_payload(payload) + type = payload.metadata['messageType'] + desc = Google::Protobuf::DescriptorPool.generated_pool.lookup(type) + raise "No protobuf message found in global pool for message type #{type}" unless desc + + desc.msgclass.decode_json(payload.data) + end + end + end + end +end diff --git a/temporalio/lib/temporalio/error.rb b/temporalio/lib/temporalio/error.rb new file mode 100644 index 00000000..c50e0b76 --- /dev/null +++ b/temporalio/lib/temporalio/error.rb @@ -0,0 +1,37 @@ +# frozen_string_literal: true + +module Temporalio + # Superclass for all Temporal errors + class Error < StandardError + # Error that is returned from when a workflow is unsuccessful. + class WorkflowFailureError < Error + # @return [Exception] Cause of the failure. + attr_reader :cause + + # @param cause [Exception] Cause of the failure. + def initialize(cause:) + super + + @cause = cause + end + end + + # Error that occurs when a workflow was continued as new. + class WorkflowContinuedAsNewError < Error + # @return [String] New execution run ID the workflow continued to. + attr_reader :new_run_id + + # @param [String] New execution run ID the workflow continued to. + def initialize(new_run_id:) + super('Workflow execution continued as new') + @new_run_id = new_run_id + end + end + + class RPCError < Error + # TODO + end + end +end + +require 'temporalio/error/failure' diff --git a/temporalio/lib/temporalio/error/failure.rb b/temporalio/lib/temporalio/error/failure.rb new file mode 100644 index 00000000..adac59d3 --- /dev/null +++ b/temporalio/lib/temporalio/error/failure.rb @@ -0,0 +1,30 @@ +# frozen_string_literal: true + +require 'temporalio/error' + +module Temporalio + class Error + # Base class for all Temporal serializable failures. + class Failure < Error + # @return [Api::Failure::V1::Failure, nil] Raw gRPC failure if this was converted from one. + attr_reader :raw + + # Create failure. + # + # @param message [String] Message string. + # @param cause [Exception, nil] Cause of this exception. + # @param raw [Api::Failure::V1::Failure, nil] Raw gRPC value if any. + def initialize(message, cause: nil, raw: nil) + super(message) + + @cause = cause + @raw = raw + end + + # @return [Exception, nil] Cause of the failure. + def cause + @cause || super + end + end + end +end diff --git a/temporalio/lib/temporalio/internal.rb b/temporalio/lib/temporalio/internal.rb new file mode 100644 index 00000000..84826440 --- /dev/null +++ b/temporalio/lib/temporalio/internal.rb @@ -0,0 +1,7 @@ +# frozen_string_literal: true + +module Temporalio + # @!visibility private + module Internal + end +end diff --git a/temporalio/lib/temporalio/internal/bridge.rb b/temporalio/lib/temporalio/internal/bridge.rb new file mode 100644 index 00000000..8b532299 --- /dev/null +++ b/temporalio/lib/temporalio/internal/bridge.rb @@ -0,0 +1,18 @@ +# frozen_string_literal: true + +module Temporalio + module Internal + # @!visibility private + module Bridge + # @!visibility private + def self.async_call + queue = Queue.new + yield queue + result = queue.pop + raise result if result.is_a?(Exception) + + result + end + end + end +end diff --git a/temporalio/lib/temporalio/internal/bridge/client.rb b/temporalio/lib/temporalio/internal/bridge/client.rb new file mode 100644 index 00000000..139d048f --- /dev/null +++ b/temporalio/lib/temporalio/internal/bridge/client.rb @@ -0,0 +1,96 @@ +# frozen_string_literal: true + +require 'temporalio/internal/bridge' +require 'temporalio/temporalio_bridge' + +module Temporalio + module Internal + module Bridge + # @!visibility private + class Client + Options = Struct.new( + :target_host, + :client_name, + :client_version, + :rpc_metadata, + :api_key, # Optional + :identity, + :tls, # Optional + :rpc_retry, + :keep_alive, # Optional + :http_connect_proxy, # Optional + keyword_init: true + ) + + # @!visibility private + TLSOptions = Struct.new( + :client_cert, # Optional + :client_private_key, # Optional + :server_root_ca_cert, # Optional + :domain, # Optional + keyword_init: true + ) + + # @!visibility private + RPCRetryOptions = Struct.new( + :initial_interval_ms, + :randomization_factor, + :multiplier, + :max_interval_ms, + :max_elapsed_time_ms, # Can use 0 for none + :max_retries, + keyword_init: true + ) + + # @!visibility private + KeepAliveOptions = Struct.new( + :interval_ms, + :timeout_ms, + keyword_init: true + ) + + # @!visibility private + HTTPConnectProxyOptions = Struct.new( + :target_host, + :basic_auth_user, # Optional + :basic_auth_pass, # Optional, + keyword_init: true + ) + + # @!visibility private + def self.new(runtime, options) + Bridge.async_call do |queue| + async_new(runtime, options) do |val| + queue.push(val) + end + end + end + + # @!visibility private + def _invoke_rpc( + service:, + rpc:, + request:, + response_class:, + rpc_retry:, + rpc_metadata:, + rpc_timeout_ms: + ) + response_bytes = Bridge.async_call do |queue| + async_invoke_rpc( + service:, + rpc:, + request: request.to_proto, + rpc_retry:, + rpc_metadata:, + rpc_timeout_ms: + ) do |val| + queue.push(val) + end + end + response_class.decode(response_bytes) + end + end + end + end +end diff --git a/temporalio/lib/temporalio/internal/bridge/runtime.rb b/temporalio/lib/temporalio/internal/bridge/runtime.rb new file mode 100644 index 00000000..697c15fa --- /dev/null +++ b/temporalio/lib/temporalio/internal/bridge/runtime.rb @@ -0,0 +1,60 @@ +# frozen_string_literal: true + +module Temporalio + module Internal + module Bridge + # @!visibility private + class Runtime + # @!visibility private + Options = Struct.new( + :telemetry, + keyword_init: true + ) + + # @!visibility private + TelemetryOptions = Struct.new( + :logging, # Optional + :metrics, # Optional + keyword_init: true + ) + + # @!visibility private + LoggingOptions = Struct.new( + :log_filter, + :forward_to, # Optional + keyword_init: true + ) + + # @!visibility private + MetricsOptions = Struct.new( + :opentelemetry, # Optional + :prometheus, # Optional + :buffered_with_size, # Optional + :attach_service_name, + :global_tags, # Optional + :metric_prefix, # Optional + keyword_init: true + ) + + # @!visibility private + OpenTelemetryMetricsOptions = Struct.new( + :url, + :headers, # Optional + :metric_periodicity_ms, # Optional + :metric_temporality_delta, + :durations_as_seconds, + keyword_init: true + ) + + # @!visibility private + PrometheusOptions = Struct.new( + :bind_address, + :counters_total_suffix, + :unit_suffix, + :durations_as_seconds, + keyword_init: true + ) + end + end + end +end diff --git a/temporalio/lib/temporalio/internal/bridge/testing.rb b/temporalio/lib/temporalio/internal/bridge/testing.rb new file mode 100644 index 00000000..0c78ac1d --- /dev/null +++ b/temporalio/lib/temporalio/internal/bridge/testing.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +require 'temporalio/internal/bridge' +require 'temporalio/temporalio_bridge' + +module Temporalio + module Internal + module Bridge + module Testing + # @!visibility private + class EphemeralServer + # @!visibility private + StartDevServerOptions = Struct.new( + :existing_path, # Optional + :sdk_name, + :sdk_version, + :download_version, + :download_dest_dir, # Optional + :namespace, + :ip, + :port, # Optional + :database_filename, # Optional + :ui, + :log_format, + :log_level, + :extra_args, + keyword_init: true + ) + + # @!visibility private + def self.start_dev_server(runtime, options) + Bridge.async_call do |queue| + async_start_dev_server(runtime, options) do |val| + queue.push(val) + end + end + end + + # @!visibility private + def shutdown + Bridge.async_call do |queue| + async_shutdown do |val| + queue.push(val) + end + end + end + end + end + end + end +end diff --git a/temporalio/lib/temporalio/runtime.rb b/temporalio/lib/temporalio/runtime.rb new file mode 100644 index 00000000..367aed6e --- /dev/null +++ b/temporalio/lib/temporalio/runtime.rb @@ -0,0 +1,259 @@ +# frozen_string_literal: true + +require 'temporalio/internal/bridge/runtime' + +module Temporalio + # Runtime for Temporal Ruby SDK. + # + # Only one global {Runtime} needs to exist. Users are encouraged to use {default}. To configure it, create a runtime + # before any clients are created, and set it via {default=}. Every time a new runtime is created, a new internal Rust + # thread pool is created. + class Runtime + # Telemetry options for the runtime. + # + # @!attribute logging + # @return [LoggingOptions, nil] Logging options, default is new {LoggingOptions} with no parameters. Can be set + # to nil to disable logging. + # @!attribute metrics + # @return [MetricsOptions, nil] Metrics options. + TelemetryOptions = Struct.new( + :logging, + :metrics, + keyword_init: true + ) do + # @!visibility private + def initialize(*, **kwargs) + kwargs[:logging] = LoggingOptions.new unless kwargs.key?(:logging) + super + end + + # @!visibility private + def _to_bridge + Internal::Bridge::Runtime::TelemetryOptions.new( + logging: @logging&._to_bridge, + metrics: @metrics&._to_bridge + ) + end + end + + # Logging options for runtime telemetry. + # + # @!attribute log_filter + # @return [LoggingFilterOptions, String] Logging filter for Core, default is new {LoggingFilterOptions} with no + # parameters. + LoggingOptions = Struct.new( + :log_filter, + # TODO(cretz): forward_to + keyword_init: true + ) do + # @!visibility private + def initialize(*, **kwargs) + kwargs[:log_filter] = LoggingFilterOptions.new unless kwargs.key?(:log_filter) + super + end + + # @!visibility private + def _to_bridge + Internal::Bridge::Runtime::LoggingOptions.new( + log_filter: if @log_filter.is_a?(String) + @log_filter + elsif @log_filter.is_a?(LoggingFilterOptions) + @log_filter._to_bridge + else + raise 'Log filter must be string or LoggingFilterOptions' + end + ) + end + end + + # Logging filter options for Core. + # + # @!attribute core_level + # @return ['TRACE', 'DEBUG', 'INFO', 'WARN', 'ERROR'] Log level for Core log messages, default is +'WARN'+. + # @!attribute other_level + # @return ['TRACE', 'DEBUG', 'INFO', 'WARN', 'ERROR'] Log level for other Rust log messages, default is +'WARN'+. + LoggingFilterOptions = Struct.new( + :core_level, + :other_level, + keyword_init: true + ) do + # @!visibility private + def initialize(*, **kwargs) + kwargs[:core_level] = 'WARN' unless kwargs.key?(:core_level) + kwargs[:other_level] = 'ERROR' unless kwargs.key?(:other_level) + super + end + + # @!visibility private + def _to_bridge + "#{@other_level},temporal_sdk_core=#{@core_level},temporal_client=#{@core_level},temporal_sdk=#{@core_level}" + end + end + + # Metrics options for runtime telemetry. Either {opentelemetry} or {prometheus} required, but not both. + # + # @!attribute opentelemetry + # @return [OpenTelemetryMetricsOptions, nil] OpenTelemetry options if using OpenTelemetry. This is mutually + # exclusive with +prometheus+. + # @!attribute prometheus + # @return [PrometheusMetricsOptions, nil] Prometheus options if using Prometheus. This is mutually exclusive with + # +opentelemetry+. + # @!attribute attach_service_name + # @return [Boolean] Whether to put the service_name on every metric, default +true+. + # @!attribute global_tags + # @return [Hash{String=>String}, nil] Resource tags to be applied to all metrics. + # @!attribute metric_prefix + # @return [String, nil] Prefix to put on every Temporal metric. If unset, defaults to +temporal_+. + MetricsOptions = Struct.new( + :opentelemetry, + :prometheus, + :attach_service_name, + :global_tags, + :metric_prefix, + keyword_init: true + ) do + # @!visibility private + def initialize(*, **kwargs) + kwargs[:attach_service_name] = true unless kwargs.key?(:attach_service_name) + super + end + + # @!visibility private + def _to_bridge + Internal::Bridge::Runtime::MetricsOptions.new( + opentelemetry: @opentelemetry&._to_bridge, + prometheus: @prometheus&._to_bridge, + attach_service_name: @attach_service_name, + global_tags: @global_tags, + metric_prefix: @metric_prefix + ) + end + end + + # Options for exporting metrics to OpenTelemetry. + # + # @!attribute url + # @return [String] URL for OpenTelemetry endpoint. + # @!attribute headers + # @return [Hash{String=>String}, nil] Headers for OpenTelemetry endpoint. + # @!attribute metric_periodicity_ms + # @return [Integer, nil] How frequently metrics should be exported, unset uses internal default. + # @!attribute metric_temporality + # @return [MetricTemporality] How frequently metrics should be exported, default is + # {MetricTemporality::CUMULATIVE}. + # @!attribute durations_as_seconds + # @return [Boolean] Whether to use float seconds instead of integer milliseconds for durations, default is + # +false+. + OpenTelemetryMetricsOptions = Struct.new( + :url, + :headers, + :metric_periodicity_ms, + :metric_temporality, + :durations_as_seconds, + keyword_init: true + ) do + # OpenTelemetry metric temporality. + module MetricTemporality # rubocop:disable Lint/ConstantDefinitionInBlock + CUMULATIVE = 1 + DELTA = 2 + end + + # @!visibility private + def initialize(*, **kwargs) + kwargs[:metric_temporality] = MetricTemporality::CUMULATIVE unless kwargs.key?(:metric_temporality) + kwargs[:durations_as_seconds] = false unless kwargs.key?(:durations_as_seconds) + super + end + + # @!visibility private + def _to_bridge + Internal::Bridge::Runtime::OpenTelemetryMetricsOptions.new( + url: @url, + headers: @headers, + metric_periodicity_ms: @metric_periodicity_ms, + metric_temporality_delta: case @metric_temporality + when MetricTemporality::CUMULATIVE then false + when MetricTemporality::DELTA then true + else raise 'Unrecognized metric temporality' + end, + durations_as_seconds: @durations_as_seconds + ) + end + end + + # Options for exporting metrics to Prometheus. + # + # @!attribute bind_address + # @return [String] Address to bind to for Prometheus endpoint. + # @!attribute counters_total_suffix + # @return [Boolean] If +true+, all counters will include a +_total+ suffix, default is +false+. + # @!attribute unit_suffix + # @return [String] If +true+, all histograms will include the unit in their name as a suffix, default is +false+. + # @!attribute durations_as_seconds + # @return [Boolean] Whether to use float seconds instead of integer milliseconds for durations, default is + # +false+. + PrometheusOptions = Struct.new( + :bind_address, + :counters_total_suffix, + :unit_suffix, + :durations_as_seconds, + keyword_init: true + ) do + # @!visibility private + def initialize(*, **kwargs) + kwargs[:counters_total_suffix] = false unless kwargs.key?(:counters_total_suffix) + kwargs[:unit_suffix] = false unless kwargs.key?(:unit_suffix) + kwargs[:durations_as_seconds] = false unless kwargs.key?(:durations_as_seconds) + super + end + + # @!visibility private + def _to_bridge + Internal::Bridge::Runtime::PrometheusOptions.new( + bind_address: @bind_address, + counters_total_suffix: @counters_total_suffix, + unit_suffix: @unit_suffix, + durations_as_seconds: @durations_as_seconds + ) + end + end + + # Default runtime, lazily created upon first access. If needing a different default, make sure it is updated via + # {default=} before this is called (either directly or as a parameter to something like {Client}). + # + # @return [Runtime] Default runtime. + def self.default + @default ||= Runtime.new + end + + # Set the default runtime. Must be called before {default} accessed. + # + # @param runtime [Runtime] Runtime to set as default. + # @raise If default has already been accessed. + def self.default=(runtime) + raise 'Runtime already set or requested' unless @default.nil? + + @default = runtime + end + + # Create new Runtime. For most users, this should only be done once globally. In addition to creating a Rust thread + # pool, this also consumes a Ruby thread for its lifetime. + # + # @param telemetry [TelemetryOptions] Telemetry options to set. + def initialize(telemetry: TelemetryOptions.new) + @core_runtime = Internal::Bridge::Runtime.new( + Internal::Bridge::Runtime::Options.new(telemetry: telemetry._to_bridge) + ) + # We need a thread to run the command loop + # TODO(cretz): Is this something users should be concerned about or need control over? + Thread.new do + @core_runtime.run_command_loop + end + end + + # @!visibility private + def _core_runtime + @core_runtime + end + end +end diff --git a/temporalio/lib/temporalio/testing.rb b/temporalio/lib/temporalio/testing.rb new file mode 100644 index 00000000..5f18ac18 --- /dev/null +++ b/temporalio/lib/temporalio/testing.rb @@ -0,0 +1,9 @@ +# frozen_string_literal: true + +require 'temporalio/testing/workflow_environment' + +module Temporalio + # Module for all testing environments. + module Testing + end +end diff --git a/temporalio/lib/temporalio/testing/workflow_environment.rb b/temporalio/lib/temporalio/testing/workflow_environment.rb new file mode 100644 index 00000000..e3828153 --- /dev/null +++ b/temporalio/lib/temporalio/testing/workflow_environment.rb @@ -0,0 +1,132 @@ +# frozen_string_literal: true + +require 'temporalio/client' +require 'temporalio/converters' +require 'temporalio/internal/bridge/testing' +require 'temporalio/runtime' +require 'temporalio/version' + +module Temporalio + module Testing + # Test environment with a Temporal server for running workflows and more. + class WorkflowEnvironment + # @return [Client] Client for the server. + attr_reader :client + + # Start a local dev server. This is a full Temporal dev server from the CLI that by default downloaded to tmp if + # not already present. The dev server is run as a child process. All options that start with +dev_server_+ are for + # this specific implementation and therefore are not stable and may be changed as the underlying implementation + # changes. + # + # If a block is given it is passed the environment and the environment is shut down after. If a block is not + # given, the environment is returned and {shutdown} needs to be called manually. + # + # @param namespace [String] Namespace for the server. + # @param data_converter [Converters::DataConverter] Data converter for the client. + # @param interceptors [Array] Interceptors for the client. + # @param ip [String] IP to bind to. + # @param port [Integer, nil] Port to bind on, or +nil+ for random. + # @param ui [Boolean] If +true+, also starts the UI. + # @param runtime [Runtime] Runtime for the server and client. + # @param dev_server_existing_path [String, nil] Existing CLI path to use instead of downloading and caching to + # tmp. + # @param dev_server_database_filename [String, nil] Persistent SQLite filename to use across local server runs. + # Default of +nil+ means in-memory only. + # @param dev_server_log_format [String] Log format for CLI dev server. + # @param dev_server_log_level [String] Log level for CLI dev server. + # @param dev_server_log_format [String] Log format for CLI dev server. + # @param dev_server_download_version [String] Version of dev server to download and cache. + # @param dev_server_download_dest_dir [String, nil] Where to download. Defaults to tmp. + # @param dev_server_extra_args [Array] Any extra arguments for the CLI dev server. + # + # @yield [environment] If a block is given, it is called with the environment and upon complete the environment is + # shutdown. + # @yieldparam environment [WorkflowEnvironment] Environment that is shut down upon block completion. + # + # @return [WorkflowEnvironment, Object] Started local server environment with client if there was no block given, + # or block result if block was given. + def self.start_local( + namespace: 'default', + data_converter: Converters::DataConverter.default, + interceptors: [], + # TODO(cretz): More client connect options + ip: '127.0.0.1', + port: nil, + ui: false, # rubocop:disable Naming/MethodParameterName + runtime: Runtime.default, + dev_server_existing_path: nil, + dev_server_database_filename: nil, + dev_server_log_format: 'pretty', + dev_server_log_level: 'warn', + dev_server_download_version: 'default', + dev_server_download_dest_dir: nil, + dev_server_extra_args: [] + ) + server_options = Internal::Bridge::Testing::EphemeralServer::StartDevServerOptions.new( + existing_path: dev_server_existing_path, + sdk_name: 'sdk-python', + sdk_version: VERSION, + download_version: dev_server_download_version, + download_dest_dir: dev_server_download_dest_dir, + namespace:, + ip:, + port:, + database_filename: dev_server_database_filename, + ui:, + log_format: dev_server_log_format, + log_level: dev_server_log_level, + extra_args: dev_server_extra_args + ) + core_server = Internal::Bridge::Testing::EphemeralServer.start_dev_server(runtime._core_runtime, server_options) + # Try to connect, shutdown if we can't + begin + client = Client.connect( + core_server.target, + namespace, + data_converter:, + interceptors:, + runtime: + ) + server = Ephemeral.new(client, core_server) + rescue StandardError + core_server.shutdown + raise + end + if block_given? + begin + yield server + ensure + server.shutdown + end + else + server + end + end + + # Create workflow environment to an existing server with the given client. + # + # @param client [Client] Client to existing server. + def initialize(client) + @client = client + end + + # Shutdown this workflow environment. + def shutdown + # Do nothing by default + end + + # @!visibility private + class Ephemeral < WorkflowEnvironment + def initialize(client, core_server) + super(client) + @core_server = core_server + end + + # @!visibility private + def shutdown + @core_server.shutdown + end + end + end + end +end diff --git a/temporalio/lib/temporalio/version.rb b/temporalio/lib/temporalio/version.rb new file mode 100644 index 00000000..9e93e9e1 --- /dev/null +++ b/temporalio/lib/temporalio/version.rb @@ -0,0 +1,5 @@ +# frozen_string_literal: true + +module Temporalio + VERSION = '0.2.0' +end diff --git a/temporalio/rbs_collection.lock.yaml b/temporalio/rbs_collection.lock.yaml new file mode 100644 index 00000000..0b7a65d0 --- /dev/null +++ b/temporalio/rbs_collection.lock.yaml @@ -0,0 +1,144 @@ +--- +path: ".gem_rbs_collection" +gems: +- name: activesupport + version: '7.0' + source: + type: git + name: ruby/gem_rbs_collection + revision: 0233af5f782a23991cc0b8bd2e5e0e0f882aadee + remote: https://github.com/ruby/gem_rbs_collection.git + repo_dir: gems +- name: async + version: '2.12' + source: + type: git + name: ruby/gem_rbs_collection + revision: 0233af5f782a23991cc0b8bd2e5e0e0f882aadee + remote: https://github.com/ruby/gem_rbs_collection.git + repo_dir: gems +- name: base64 + version: '0' + source: + type: stdlib +- name: bigdecimal + version: '0' + source: + type: stdlib +- name: concurrent-ruby + version: '1.1' + source: + type: git + name: ruby/gem_rbs_collection + revision: 0233af5f782a23991cc0b8bd2e5e0e0f882aadee + remote: https://github.com/ruby/gem_rbs_collection.git + repo_dir: gems +- name: csv + version: '0' + source: + type: stdlib +- name: date + version: '0' + source: + type: stdlib +- name: erb + version: '0' + source: + type: stdlib +- name: fileutils + version: '0' + source: + type: stdlib +- name: forwardable + version: '0' + source: + type: stdlib +- name: google-protobuf + version: '3.22' + source: + type: git + name: ruby/gem_rbs_collection + revision: 0233af5f782a23991cc0b8bd2e5e0e0f882aadee + remote: https://github.com/ruby/gem_rbs_collection.git + repo_dir: gems +- name: grpc + version: '1.63' + source: + type: git + name: ruby/gem_rbs_collection + revision: 0233af5f782a23991cc0b8bd2e5e0e0f882aadee + remote: https://github.com/ruby/gem_rbs_collection.git + repo_dir: gems +- name: i18n + version: '1.10' + source: + type: git + name: ruby/gem_rbs_collection + revision: 0233af5f782a23991cc0b8bd2e5e0e0f882aadee + remote: https://github.com/ruby/gem_rbs_collection.git + repo_dir: gems +- name: json + version: '0' + source: + type: stdlib +- name: logger + version: '0' + source: + type: stdlib +- name: minitest + version: '0' + source: + type: stdlib +- name: monitor + version: '0' + source: + type: stdlib +- name: mutex_m + version: '0' + source: + type: stdlib +- name: optparse + version: '0' + source: + type: stdlib +- name: pathname + version: '0' + source: + type: stdlib +- name: rbs + version: 3.5.2 + source: + type: rubygems +- name: rdoc + version: '0' + source: + type: stdlib +- name: securerandom + version: '0' + source: + type: stdlib +- name: singleton + version: '0' + source: + type: stdlib +- name: strscan + version: '0' + source: + type: stdlib +- name: time + version: '0' + source: + type: stdlib +- name: tsort + version: '0' + source: + type: stdlib +- name: tzinfo + version: '2.0' + source: + type: git + name: ruby/gem_rbs_collection + revision: 0233af5f782a23991cc0b8bd2e5e0e0f882aadee + remote: https://github.com/ruby/gem_rbs_collection.git + repo_dir: gems +gemfile_lock_path: Gemfile.lock diff --git a/temporalio/rbs_collection.yaml b/temporalio/rbs_collection.yaml new file mode 100644 index 00000000..ef8a3c0f --- /dev/null +++ b/temporalio/rbs_collection.yaml @@ -0,0 +1,33 @@ +sources: + - type: git + name: ruby/gem_rbs_collection + remote: https://github.com/ruby/gem_rbs_collection.git + revision: main + repo_dir: gems + +path: .gem_rbs_collection + +gems: + # Bad/unnecessary RBS + # - name: activesupport + # ignore: true + - name: ast + ignore: true + # - name: concurrent-ruby + # ignore: true + - name: connection_pool + ignore: true + - name: diff-lcs + ignore: true + - name: listen + ignore: true + - name: parser + ignore: true + - name: rainbow + ignore: true + - name: rake + ignore: true + - name: rubocop + ignore: true + - name: rubocop-ast + ignore: true diff --git a/temporalio/sig/temporalio.rbs b/temporalio/sig/temporalio.rbs new file mode 100644 index 00000000..ae4011bd --- /dev/null +++ b/temporalio/sig/temporalio.rbs @@ -0,0 +1,3 @@ +module Temporalio + VERSION: String +end diff --git a/temporalio/sig/temporalio/internal/bridge/client.rbs b/temporalio/sig/temporalio/internal/bridge/client.rbs new file mode 100644 index 00000000..15948e1a --- /dev/null +++ b/temporalio/sig/temporalio/internal/bridge/client.rbs @@ -0,0 +1,10 @@ +module Temporalio + module Internal + module Bridge + class Client + # TODO(cretz): Improve + def self.new: (untyped, untyped) -> Client + end + end + end +end \ No newline at end of file diff --git a/temporalio/temporalio.gemspec b/temporalio/temporalio.gemspec new file mode 100644 index 00000000..2c22f58d --- /dev/null +++ b/temporalio/temporalio.gemspec @@ -0,0 +1,42 @@ +# frozen_string_literal: true + +require_relative 'lib/temporalio/version' + +Gem::Specification.new do |spec| + spec.name = 'temporalio' + spec.version = Temporalio::VERSION + spec.authors = ['Temporal Technologies Inc'] + spec.email = ['sdk@temporal.io'] + + spec.summary = 'Temporal.io Ruby SDK' + spec.homepage = 'https://github.com/temporalio/sdk-ruby' + spec.license = 'MIT' + spec.required_ruby_version = '>= 3.1.0' + spec.required_rubygems_version = '>= 3.3.11' + + spec.metadata['homepage_uri'] = spec.homepage + spec.metadata['source_code_uri'] = 'https://github.com/temporalio/sdk-ruby' + + spec.files = Dir['lib/**/*.rb', 'ext/**/*.*', 'Cargo.lock', 'Cargo.toml', 'Gemfile', 'Rakefile', + 'temporalio.gemspec', 'LICENSE', 'README.md'] + + spec.bindir = 'exe' + spec.executables = spec.files.grep(%r{\Aexe/}) { |f| File.basename(f) } + spec.require_paths = ['lib'] + spec.extensions = ['ext/Cargo.toml'] + spec.metadata['rubygems_mfa_required'] = 'true' + + spec.add_dependency 'google-protobuf', '>= 3.27.0' + + spec.add_development_dependency 'async' + spec.add_development_dependency 'grpc', '>= 1.65.0.pre2' + spec.add_development_dependency 'grpc-tools' + spec.add_development_dependency 'minitest' + spec.add_development_dependency 'rake' + spec.add_development_dependency 'rake-compiler' + spec.add_development_dependency 'rbs', '~> 3.5.2' + spec.add_development_dependency 'rb_sys', '~> 0.9.63' + spec.add_development_dependency 'rubocop' + spec.add_development_dependency 'steep', '~> 1.7.1' + spec.add_development_dependency 'yard' +end diff --git a/temporalio/test/client_test.rb b/temporalio/test/client_test.rb new file mode 100644 index 00000000..8b1dbc9a --- /dev/null +++ b/temporalio/test/client_test.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +require 'async' +require 'temporalio/client' +require 'temporalio/testing' +require 'test_helper' + +class ClientTest < Minitest::Test + include TestHelper + + def test_version_number + assert !Temporalio::VERSION.nil? + end + + def test_start_workflows_threaded + start_workflows + end + + def test_start_workflows_async + Sync do + start_workflows + end + end + + def start_workflows + # Create ephemeral test server + env.with_kitchen_sink_worker do |task_queue| + # Start 5 workflows + handles = 5.times.map do |i| + env.client.start_workflow( + 'kitchen_sink', + { actions: [{ result: { value: "result-#{i}" } }] }, + id: "wf-#{SecureRandom.uuid}", + task_queue: + ) + end + # Check all results + results = handles.map(&:result) + assert_equal %w[result-0 result-1 result-2 result-3 result-4], results + end + end +end + +# TODO(cretz): +# * All client options +# * Cloud tests +# * Test splatting options diff --git a/temporalio/test/golangworker/go.mod b/temporalio/test/golangworker/go.mod new file mode 100644 index 00000000..61d79e66 --- /dev/null +++ b/temporalio/test/golangworker/go.mod @@ -0,0 +1,31 @@ +module github.com/cretz/temporal-sdk-ruby-poc/temporalio/test/golangworker + +go 1.22 + +require go.temporal.io/sdk v1.27.0 + +require ( + github.com/davecgh/go-spew v1.1.1 // indirect + github.com/facebookgo/clock v0.0.0-20150410010913-600d898af40a // indirect + github.com/gogo/protobuf v1.3.2 // indirect + github.com/golang/mock v1.6.0 // indirect + github.com/google/uuid v1.6.0 // indirect + github.com/grpc-ecosystem/go-grpc-middleware v1.4.0 // indirect + github.com/grpc-ecosystem/grpc-gateway/v2 v2.20.0 // indirect + github.com/pborman/uuid v1.2.1 // indirect + github.com/pmezard/go-difflib v1.0.0 // indirect + github.com/robfig/cron v1.2.0 // indirect + github.com/stretchr/objx v0.5.2 // indirect + github.com/stretchr/testify v1.9.0 // indirect + go.temporal.io/api v1.34.0 // indirect + golang.org/x/exp v0.0.0-20231127185646-65229373498e // indirect + golang.org/x/net v0.25.0 // indirect + golang.org/x/sys v0.20.0 // indirect + golang.org/x/text v0.15.0 // indirect + golang.org/x/time v0.3.0 // indirect + google.golang.org/genproto/googleapis/api v0.0.0-20240521202816-d264139d666e // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20240521202816-d264139d666e // indirect + google.golang.org/grpc v1.64.0 // indirect + google.golang.org/protobuf v1.34.1 // indirect + gopkg.in/yaml.v3 v3.0.1 // indirect +) diff --git a/temporalio/test/golangworker/go.sum b/temporalio/test/golangworker/go.sum new file mode 100644 index 00000000..8a9641ba --- /dev/null +++ b/temporalio/test/golangworker/go.sum @@ -0,0 +1,175 @@ +cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= +github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= +github.com/benbjohnson/clock v1.1.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA= +github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= +github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= +github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= +github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= +github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= +github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= +github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= +github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= +github.com/facebookgo/clock v0.0.0-20150410010913-600d898af40a h1:yDWHCSQ40h88yih2JAcL6Ls/kVkSE8GFACTGVnMPruw= +github.com/facebookgo/clock v0.0.0-20150410010913-600d898af40a/go.mod h1:7Ga40egUymuWXxAe151lTNnCv97MddSOVsjpPPkityA= +github.com/go-kit/log v0.1.0/go.mod h1:zbhenjAZHb184qTLMA9ZjW7ThYL0H2mk7Q6pNt4vbaY= +github.com/go-logfmt/logfmt v0.5.0/go.mod h1:wCYkCAKZfumFQihp8CzCvQ3paCTfi41vtzG1KdI/P7A= +github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= +github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= +github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= +github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= +github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= +github.com/golang/mock v1.6.0 h1:ErTB+efbowRARo13NNdxyJji2egdxLGQhRaY+DUumQc= +github.com/golang/mock v1.6.0/go.mod h1:p6yTPP+5HYm5mzsMV8JkE6ZKdX+/wYM6Hr+LicevLPs= +github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/protobuf v1.3.3/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= +github.com/golang/protobuf v1.5.4 h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek= +github.com/golang/protobuf v1.5.4/go.mod h1:lnTiLA8Wa4RWRcIUkrtSVa5nRhsEGBg48fD6rSs7xps= +github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= +github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= +github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= +github.com/google/uuid v1.0.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= +github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/grpc-ecosystem/go-grpc-middleware v1.4.0 h1:UH//fgunKIs4JdUbpDl1VZCDaL56wXCB/5+wF6uHfaI= +github.com/grpc-ecosystem/go-grpc-middleware v1.4.0/go.mod h1:g5qyo/la0ALbONm6Vbp88Yd8NsDy6rZz+RcrMPxvld8= +github.com/grpc-ecosystem/grpc-gateway/v2 v2.20.0 h1:bkypFPDjIYGfCYD5mRBvpqxfYX1YCS1PXdKYWi8FsN0= +github.com/grpc-ecosystem/grpc-gateway/v2 v2.20.0/go.mod h1:P+Lt/0by1T8bfcF3z737NnSbmxQAppXMRziHUxPOC8k= +github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= +github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= +github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= +github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= +github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= +github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= +github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= +github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= +github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= +github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= +github.com/opentracing/opentracing-go v1.1.0/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= +github.com/pborman/uuid v1.2.1 h1:+ZZIw58t/ozdjRaXh/3awHfmWRbzYxJoAdNJxe/3pvw= +github.com/pborman/uuid v1.2.1/go.mod h1:X/NO0urCmaxf9VXbdlT7C2Yzkj2IKimNn4k+gtPdI/k= +github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= +github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= +github.com/robfig/cron v1.2.0 h1:ZjScXvvxeQ63Dbyxy76Fj3AT3Ut0aKsyd2/tl3DTMuQ= +github.com/robfig/cron v1.2.0/go.mod h1:JGuDeoQd7Z6yL4zQhZ3OPEVHB7fL6Ka6skscFHfmt2k= +github.com/rogpeppe/go-internal v1.11.0 h1:cWPaGQEPrBb5/AsnsZesgZZ9yb1OQ+GOISoDNXVBh4M= +github.com/rogpeppe/go-internal v1.11.0/go.mod h1:ddIwULY96R17DhadqLgMfk9H9tvdUzkipdSkR5nkCZA= +github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= +github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/objx v0.5.2 h1:xuMeJ0Sdp5ZMRXx/aWO6RZxdr3beISkG5/G/aIRr3pY= +github.com/stretchr/objx v0.5.2/go.mod h1:FRsXN1f5AsAjCGJKqEizvkpNtU+EGNCLh3NxZ/8L+MA= +github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= +github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= +github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= +github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= +github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= +github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= +go.temporal.io/api v1.34.0 h1:RBQtYF+jJa252uruscL0TULgdFNqUkhk5R7Bj8PT2ko= +go.temporal.io/api v1.34.0/go.mod h1:YN5Ty/DSp7uAdJxLxup+Y3aQLM00q+7cZuOEGFJ2Ob8= +go.temporal.io/sdk v1.27.0 h1:C5oOE/IRyLcZaFoB13kEHsjvSHEnGcwT6bNys0HFFHk= +go.temporal.io/sdk v1.27.0/go.mod h1:PnOq5f3dWuU2NAbY+yczXkIeycsIIdBtoCO62ZE0aak= +go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= +go.uber.org/goleak v1.1.10/go.mod h1:8a7PlsEVH3e/a/GLqe5IIrQx6GzcnRmZEufDUTk4A7A= +go.uber.org/multierr v1.6.0/go.mod h1:cdWPpRnG4AhwMwsgIHip0KRBQjJy5kYEpYjJxpXp9iU= +go.uber.org/zap v1.18.1/go.mod h1:xg/QME4nWcxGxrpdeYfq7UvYrLh66cuVKdrbD1XF/NI= +golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= +golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= +golang.org/x/exp v0.0.0-20231127185646-65229373498e h1:Gvh4YaCaXNs6dKTlfgismwWZKyjVZXwOPfIyUaqU3No= +golang.org/x/exp v0.0.0-20231127185646-65229373498e/go.mod h1:iRJReGqOEeBhDZGkGbynYwcHlctCvnjTYIamk7uXpHI= +golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= +golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= +golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= +golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= +golang.org/x/net v0.25.0 h1:d/OCCoBEUq33pjydKrGQhw7IlUPI2Oylr+8qLx49kac= +golang.org/x/net v0.25.0/go.mod h1:JkAGAh7GEvH74S6FOH42FLoXpXbE/aqXSrIQjXgsiwM= +golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= +golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20211025201205-69cdffdb9359/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.20.0 h1:Od9JTbYCk261bKm4M/mw7AklTlFYIa0bIp9BgSm1S8Y= +golang.org/x/sys v0.20.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= +golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/text v0.15.0 h1:h1V/4gjBv8v9cjcR6+AR5+/cIYK5N/WAgiv4xlsEtAk= +golang.org/x/text v0.15.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= +golang.org/x/time v0.3.0 h1:rg5rLMjNzMS1RkNLzCG38eapWhnYLFYXDXj2gOlr8j4= +golang.org/x/time v0.3.0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= +golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= +golang.org/x/tools v0.0.0-20191108193012-7d206e10da11/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= +golang.org/x/tools v0.1.1/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= +golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= +google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= +google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= +google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= +google.golang.org/genproto v0.0.0-20200423170343-7949de9c1215/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto/googleapis/api v0.0.0-20240521202816-d264139d666e h1:SkdGTrROJl2jRGT/Fxv5QUf9jtdKCQh4KQJXbXVLAi0= +google.golang.org/genproto/googleapis/api v0.0.0-20240521202816-d264139d666e/go.mod h1:LweJcLbyVij6rCex8YunD8DYR5VDonap/jYl3ZRxcIU= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240521202816-d264139d666e h1:Elxv5MwEkCI9f5SkoL6afed6NTdxaGoAo39eANBwHL8= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240521202816-d264139d666e/go.mod h1:EfXuqaE1J41VCDicxHzUDm+8rk+7ZdXzHV0IhO/I6s0= +google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= +google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= +google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= +google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= +google.golang.org/grpc v1.29.1/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3IjizoKk= +google.golang.org/grpc v1.64.0 h1:KH3VH9y/MgNQg1dE7b3XfVK0GsPSIzJwdF617gUSbvY= +google.golang.org/grpc v1.64.0/go.mod h1:oxjF8E3FBnjp+/gVFYdWacaLDx9na1aqy9oovLpxQYg= +google.golang.org/protobuf v1.34.1 h1:9ddQBjfCyZPOHPUiPxpYESBLc+T8P3E+Vo4IbKZgFWg= +google.golang.org/protobuf v1.34.1/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= +gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= +gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= +gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= +gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= diff --git a/temporalio/test/golangworker/main.go b/temporalio/test/golangworker/main.go new file mode 100644 index 00000000..8ada1a84 --- /dev/null +++ b/temporalio/test/golangworker/main.go @@ -0,0 +1,232 @@ +package main + +import ( + "encoding/json" + "errors" + "fmt" + "log" + "os" + "time" + + "go.temporal.io/sdk/client" + "go.temporal.io/sdk/temporal" + "go.temporal.io/sdk/worker" + "go.temporal.io/sdk/workflow" +) + +func main() { + if len(os.Args) != 4 { + log.Fatalf("expected endpoint, namespace, and task queue arg, found %v args", len(os.Args)-1) + } + if err := run(os.Args[1], os.Args[2], os.Args[3]); err != nil { + log.Fatal(err) + } +} + +func run(endpoint, namespace, taskQueue string) error { + log.Printf("Creating client to %v", endpoint) + cl, err := client.NewClient(client.Options{HostPort: endpoint, Namespace: namespace}) + if err != nil { + return fmt.Errorf("failed to create client: %w", err) + } + defer cl.Close() + + log.Printf("Creating worker") + w := worker.New(cl, taskQueue, worker.Options{}) + w.RegisterWorkflowWithOptions(KitchenSinkWorkflow, workflow.RegisterOptions{Name: "kitchen_sink"}) + defer log.Printf("Stopping worker") + return w.Run(worker.InterruptCh()) +} + +type KitchenSinkWorkflowParams struct { + Actions []*KitchenSinkAction `json:"actions"` + ActionSignal string `json:"action_signal"` +} + +type KitchenSinkAction struct { + Result *ResultAction `json:"result"` + Error *ErrorAction `json:"error"` + ContinueAsNew *ContinueAsNewAction `json:"continue_as_new"` + Sleep *SleepAction `json:"sleep"` + QueryHandler *QueryHandlerAction `json:"query_handler"` + Signal *SignalAction `json:"signal"` + ExecuteActivity *ExecuteActivityAction `json:"execute_activity"` +} + +type ResultAction struct { + Value interface{} `json:"value"` + RunID bool `json:"run_id"` +} + +type ErrorAction struct { + Message string `json:"message"` + Details interface{} `json:"details"` + Attempt bool `json:"attempt"` +} + +type ContinueAsNewAction struct { + WhileAboveZero int `json:"while_above_zero"` + Result interface{} `json:"result"` +} + +type SleepAction struct { + Millis int64 `json:"millis"` +} + +type QueryHandlerAction struct { + Name string `json:"name"` + Error string `json:"error"` +} + +type SignalAction struct { + Name string `json:"name"` +} + +type ExecuteActivityAction struct { + Name string `json:"name"` + TaskQueue string `json:"task_queue"` + Args []interface{} `json:"args"` + Count int `json:"count"` // 0 same as 1 + IndexAsArg bool `json:"index_as_arg"` + ScheduleToCloseTimeoutMS int64 `json:"schedule_to_close_timeout_ms"` + StartToCloseTimeoutMS int64 `json:"start_to_close_timeout_ms"` + ScheduleToStartTimeoutMS int64 `json:"schedule_to_start_timeout_ms"` + CancelAfterMS int64 `json:"cancel_after_ms"` + WaitForCancellation bool `json:"wait_for_cancellation"` + HeartbeatTimeoutMS int64 `json:"heartbeat_timeout_ms"` + RetryMaxAttempts int `json:"retry_max_attempts"` // 0 same as 1 + NonRetryableErrorTypes []string `json:"non_retryable_error_types"` +} + +func KitchenSinkWorkflow(ctx workflow.Context, params *KitchenSinkWorkflowParams) (interface{}, error) { + b, _ := json.Marshal(params) + workflow.GetLogger(ctx).Info("Started kitchen sink workflow", "params", string(b)) + + // Handle all initial actions + for _, action := range params.Actions { + if shouldReturn, ret, err := handleAction(ctx, params, action); shouldReturn { + return ret, err + } + } + + // Handle signal actions + if params.ActionSignal != "" { + actionCh := workflow.GetSignalChannel(ctx, params.ActionSignal) + for { + var action KitchenSinkAction + actionCh.Receive(ctx, &action) + if shouldReturn, ret, err := handleAction(ctx, params, &action); shouldReturn { + return ret, err + } + } + } + + return nil, nil +} + +func handleAction( + ctx workflow.Context, + params *KitchenSinkWorkflowParams, + action *KitchenSinkAction, +) (bool, interface{}, error) { + info := workflow.GetInfo(ctx) + switch { + case action.Result != nil: + if action.Result.RunID { + return true, info.WorkflowExecution.RunID, nil + } + return true, action.Result.Value, nil + + case action.Error != nil: + if action.Error.Attempt { + return true, nil, fmt.Errorf("attempt %v", info.Attempt) + } + var details []interface{} + if action.Error.Details != nil { + details = append(details, action.Error.Details) + } + return true, nil, temporal.NewApplicationError(action.Error.Message, "", details...) + + case action.ContinueAsNew != nil: + if action.ContinueAsNew.WhileAboveZero > 0 { + action.ContinueAsNew.WhileAboveZero-- + return true, nil, workflow.NewContinueAsNewError(ctx, KitchenSinkWorkflow, params) + } else if action.ContinueAsNew.Result != nil { + return true, action.ContinueAsNew.Result, nil + } + + case action.Sleep != nil: + if err := workflow.Sleep(ctx, time.Duration(action.Sleep.Millis)*time.Millisecond); err != nil { + return true, nil, err + } + + case action.QueryHandler != nil: + err := workflow.SetQueryHandler(ctx, action.QueryHandler.Name, func(arg string) (string, error) { + if action.QueryHandler.Error != "" { + return "", errors.New(action.QueryHandler.Error) + } + return arg, nil + }) + if err != nil { + return true, nil, err + } + + case action.Signal != nil: + workflow.GetSignalChannel(ctx, action.Signal.Name).Receive(ctx, nil) + + case action.ExecuteActivity != nil: + opts := workflow.ActivityOptions{ + TaskQueue: action.ExecuteActivity.TaskQueue, + ScheduleToCloseTimeout: time.Duration(action.ExecuteActivity.ScheduleToCloseTimeoutMS) * time.Millisecond, + StartToCloseTimeout: time.Duration(action.ExecuteActivity.StartToCloseTimeoutMS) * time.Millisecond, + ScheduleToStartTimeout: time.Duration(action.ExecuteActivity.ScheduleToStartTimeoutMS) * time.Millisecond, + WaitForCancellation: action.ExecuteActivity.WaitForCancellation, + HeartbeatTimeout: time.Duration(action.ExecuteActivity.HeartbeatTimeoutMS) * time.Millisecond, + RetryPolicy: &temporal.RetryPolicy{ + InitialInterval: 1 * time.Millisecond, + BackoffCoefficient: 1.01, + MaximumInterval: 2 * time.Millisecond, + MaximumAttempts: 1, + NonRetryableErrorTypes: action.ExecuteActivity.NonRetryableErrorTypes, + }, + } + if opts.StartToCloseTimeout == 0 && opts.ScheduleToCloseTimeout == 0 { + opts.ScheduleToCloseTimeout = 3 * time.Minute + } + if action.ExecuteActivity.RetryMaxAttempts > 1 { + opts.RetryPolicy.MaximumAttempts = int32(action.ExecuteActivity.RetryMaxAttempts) + } + var lastErr error + var lastResponse interface{} + count := action.ExecuteActivity.Count + if count == 0 { + count = 1 + } + sel := workflow.NewSelector(ctx) + for i := 0; i < count; i++ { + actCtx := workflow.WithActivityOptions(ctx, opts) + if action.ExecuteActivity.CancelAfterMS > 0 { + var cancel workflow.CancelFunc + actCtx, cancel = workflow.WithCancel(actCtx) + workflow.Go(actCtx, func(actCtx workflow.Context) { + workflow.Sleep(actCtx, time.Duration(action.ExecuteActivity.CancelAfterMS)*time.Millisecond) + cancel() + }) + } + args := action.ExecuteActivity.Args + if action.ExecuteActivity.IndexAsArg { + args = []interface{}{i} + } + sel.AddFuture(workflow.ExecuteActivity(actCtx, action.ExecuteActivity.Name, args...), + func(fut workflow.Future) { lastErr = fut.Get(actCtx, &lastResponse) }) + } + for i := 0; i < count && lastErr == nil; i++ { + sel.Select(ctx) + } + return true, lastResponse, lastErr + + default: + return true, nil, fmt.Errorf("unrecognized action") + } + return false, nil, nil +} diff --git a/temporalio/test/sig/test_helper.rbs b/temporalio/test/sig/test_helper.rbs new file mode 100644 index 00000000..e69de29b diff --git a/temporalio/test/test_helper.rb b/temporalio/test/test_helper.rb new file mode 100644 index 00000000..ee5f7d3e --- /dev/null +++ b/temporalio/test/test_helper.rb @@ -0,0 +1,66 @@ +# frozen_string_literal: true + +require 'minitest/autorun' +require 'singleton' + +module TestHelper + def env + TestEnvironment.instance + end + + class TestEnvironment + include Singleton + + attr_reader :server + + def initialize + @server = Temporalio::Testing::WorkflowEnvironment.start_local + Minitest.after_run do + @server.shutdown + end + end + + def client + @server.client + end + + def with_kitchen_sink_worker(worker_client = client) + # Run the golangworker + task_queue = "tq-#{SecureRandom.uuid}" + pid = Process.spawn( + kitchen_sink_exe, + worker_client.connection.target_host, worker_client.namespace, task_queue, + { chdir: File.join(__dir__ || '', 'golangworker') } + ) + begin + yield task_queue + ensure + Process.kill('KILL', pid) + Timeout.timeout(5) { Process.wait(pid) } + end + end + + def kitchen_sink_exe + @kitchen_sink_mutex ||= Mutex.new + @kitchen_sink_mutex.synchronize do + return @kitchen_sink_exe if @kitchen_sink_exe + + # Build the executable. We can't use "go run" because it can't forward kill + # signal + pid = Process.spawn( + 'go', 'build', '-o', 'golangworker', '.', + { chdir: File.join(__dir__ || '', 'golangworker') } + ) + begin + Timeout.timeout(100) { Process.wait(pid) } + rescue StandardError + Process.kill('KILL', pid) + raise + end + raise "Go build failed with #{$?.exitstatus}" unless $?.exitstatus.zero? # rubocop:disable Style/SpecialGlobalVars + + @kitchen_sink_exe = File.join(__dir__ || '', 'golangworker', 'golangworker') + end + end + end +end