source stringclasses 1
value | repo stringlengths 5 63 | repo_url stringlengths 24 82 | path stringlengths 5 167 | language stringclasses 1
value | license stringclasses 5
values | stars int64 10 51.4k | ref stringclasses 23
values | size_bytes int64 200 258k | text stringlengths 137 258k |
|---|---|---|---|---|---|---|---|---|---|
github | shlima/click_house | https://github.com/shlima/click_house | spec/click_house/extend/connection_healthy_spec.rb | Ruby | mit | 192 | master | 846 | RSpec.describe ClickHouse::Extend::ConnectionHealthy do
subject do
ClickHouse::Connection.new(ClickHouse.config)
end
describe '#ping' do
context 'when ok' do
it 'works' do
expect(subject.ping).to eq(true)
end
end
context 'when fail' do
before do
subject.transpor... |
github | shlima/click_house | https://github.com/shlima/click_house | spec/click_house/extend/connection_altering_spec.rb | Ruby | mit | 192 | master | 4,283 | RSpec.describe ClickHouse::Extend::ConnectionAltering do
subject do
ClickHouse.connection
end
describe '#add_column' do
before do
subject.execute <<~SQL
CREATE TABLE rspec (date Date, id UInt32, user_id UInt32) ENGINE MergeTree() ORDER BY date
SQL
end
context 'when not exists... |
github | shlima/click_house | https://github.com/shlima/click_house | spec/click_house/response/factory_spec.rb | Ruby | mit | 192 | master | 550 | RSpec.describe ClickHouse::Response::Factory do
subject do
ClickHouse.connection
end
describe 'WITH totals modifier' do
context 'when blank' do
let(:response) do
subject.select_all('SELECT 1')
end
it 'is empty' do
expect(response.totals).to eq(nil)
end
end
... |
github | shlima/click_house | https://github.com/shlima/click_house | spec/click_house/type/ip_type_spec.rb | Ruby | mit | 192 | master | 375 | RSpec.describe ClickHouse::Type::IPType do
describe '#cast' do
let(:ip) do
IPAddr.new('127.0.0.1')
end
it 'works' do
expect(subject.cast(String(ip))).to eq(ip)
end
end
describe '#serialize' do
let(:ip) do
IPAddr.new('127.0.0.1')
end
it 'works' do
expect(subje... |
github | shlima/click_house | https://github.com/shlima/click_house | spec/click_house/type/fixed_string_type_spec.rb | Ruby | mit | 192 | master | 388 | RSpec.describe ClickHouse::Type::FixedStringType do
describe '#serialize' do
def target(value, limit = nil)
described_class.new.serialize(value, limit)
end
it 'works' do
expect(target(nil)).to eq(nil)
expect(target('foo bar')).to eq('foo bar')
expect(target('foo bar', 1)).to eq('f... |
github | shlima/click_house | https://github.com/shlima/click_house | spec/click_house/type/date_time_type_spec.rb | Ruby | mit | 192 | master | 730 | RSpec.describe ClickHouse::Type::DateTimeType do
describe '#serialize' do
let(:time) do
Time.new(2019, 1, 1, 9, 5, 6)
end
it 'works' do
expect(subject.serialize(time)).to eq('2019-01-01 09:05:06')
end
end
describe '#cast' do
context 'when zone is empty' do
let(:time) do
... |
github | shlima/click_house | https://github.com/shlima/click_house | spec/click_house/type/date_time64_spec.rb | Ruby | mit | 192 | master | 1,020 | RSpec.describe ClickHouse::Type::DateTime64Type do
let(:precisions) do
(0..9).to_a
end
describe '#serialize' do
let(:time) do
Time.new(2019, 1, 1, 9, 5, 6)
end
it 'works' do
precisions.each do |precision|
tail = "." + "0" * precision if precision > 0
expect(s... |
github | shlima/click_house | https://github.com/shlima/click_house | spec/click_house/type/decimal_type_spec.rb | Ruby | mit | 192 | master | 573 | RSpec.describe ClickHouse::Type::DecimalType do
describe '#casr' do
context 'when String' do
it 'works' do
expect(subject.cast("1.0")).to eq(BigDecimal(1.0, 1))
end
end
context 'when BigDecimal' do
it 'works' do
expect(subject.cast(BigDecimal(1))).to eq(BigDecimal(1))
... |
github | shlima/click_house | https://github.com/shlima/click_house | spec/click_house/type/float_type_spec.rb | Ruby | mit | 192 | master | 528 | RSpec.describe ClickHouse::Type::FloatType do
describe '#serialize' do
it 'works' do
expect(subject.serialize(5)).to be_a(Float)
expect(subject.serialize(5)).to eq(5.0)
expect(subject.serialize(5.0)).to eq(5.0)
expect(subject.serialize(nil)).to eq(nil)
end
end
describe '#cast' do
... |
github | shlima/click_house | https://github.com/shlima/click_house | spec/click_house/definition/column_set_spec.rb | Ruby | mit | 192 | master | 1,450 | RSpec.describe ClickHouse::Definition::ColumnSet do
def squish(string)
string.gsub(/[[:space:]]/, '').strip
end
context 'when integration' do
subject do
described_class.new do |t|
t.Decimal :money, 5, 5
t.UInt16 :year_birth, low_cardinality: true
t.UInt16 :year_death, low_... |
github | shlima/click_house | https://github.com/shlima/click_house | spec/support/ruby_version.rb | Ruby | mit | 192 | master | 334 | # frozen_string_literal: true
# @return [Boolean]
# @param version [String] like "2.7"
def ruby_version_gt(version)
Gem::Version.new(RUBY_VERSION) > Gem::Version.new(version)
end
# @return [Boolean]
# @param version [String] like "2.7"
def ruby_version_lt(version)
Gem::Version.new(RUBY_VERSION) < Gem::Version.new... |
github | shlima/click_house | https://github.com/shlima/click_house | spec/support/database_cleaner.rb | Ruby | mit | 192 | master | 436 | SYSTEM_DATABASES = %w[default system _temporary_and_external_tables]
RSpec.configure do |config|
config.around(:each) do |example|
ClickHouse.connection.create_database(ClickHouse.config.database, if_not_exists: true)
example.run
ClickHouse.connection.databases.each do |database|
next if SYSTEM_D... |
github | temporalio/sdk-ruby | https://github.com/temporalio/sdk-ruby | temporalio/temporalio.gemspec | Ruby | mit | 192 | main | 998 | # 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 | temporalio/sdk-ruby | https://github.com/temporalio/sdk-ruby | temporalio/Gemfile | Ruby | mit | 192 | main | 883 | # frozen_string_literal: true
source 'https://rubygems.org'
gemspec
group :development do
gem 'activemodel'
gem 'activerecord'
gem 'async'
gem 'base64'
gem 'googleapis-common-protos-types'
gem 'irb'
gem 'minitest'
# Have to explicitly depend on openssl for macos issue in GH CI described at
# https:... |
github | temporalio/sdk-ruby | https://github.com/temporalio/sdk-ruby | temporalio/Rakefile | Ruby | mit | 192 | main | 2,581 | # frozen_string_literal: true
# rubocop:disable Lint/MissingCopEnableDirective, Style/DocumentationMethod
require 'bundler/gem_tasks'
require 'rb_sys/cargo/metadata'
require 'rb_sys/extensiontask'
task build: :compile
GEMSPEC = Gem::Specification.load('temporalio.gemspec')
begin
RbSys::ExtensionTask.new('tempora... |
github | temporalio/sdk-ruby | https://github.com/temporalio/sdk-ruby | temporalio/smoke_test/smoke_test_gem.rb | Ruby | mit | 192 | main | 1,013 | # frozen_string_literal: true
raise 'Must provide gem file glob' if ARGV.length != 1
gem_files = Dir.glob(ARGV.first)
raise "Unable to find single gem file, found #{gem_files.length}" unless gem_files.length == 1
# TODO(cretz): For Linux musl, we have to install google-protobuf manually because latest versions do no... |
github | temporalio/sdk-ruby | https://github.com/temporalio/sdk-ruby | temporalio/extra/payload_visitor_gen.rb | Ruby | mit | 192 | main | 9,894 | # frozen_string_literal: true
require_relative '../lib/temporalio/api'
require_relative '../lib/temporalio/api/cloud/cloudservice/v1/service'
require_relative '../lib/temporalio/api/operatorservice/v1/service'
require_relative '../lib/temporalio/api/workflowservice/v1/service'
require_relative '../lib/temporalio/inter... |
github | temporalio/sdk-ruby | https://github.com/temporalio/sdk-ruby | temporalio/extra/proto_gen.rb | Ruby | mit | 192 | main | 17,369 | # frozen_string_literal: true
require 'fileutils'
require 'google/protobuf'
require 'open3'
# Generator for the proto files.
class ProtoGen
PROTOC_VERSION_FILE = File.expand_path('../../.protoc-version', __dir__)
MINIMUM_PROTOC_VERSION = Gem::Version.new(File.read(PROTOC_VERSION_FILE).strip)
SERVICE_DEFINITIONS... |
github | temporalio/sdk-ruby | https://github.com/temporalio/sdk-ruby | temporalio/extra/simple_bench.rb | Ruby | mit | 192 | main | 3,794 | # frozen_string_literal: true
# rubocop:disable Style/Documentation, Style/DocumentationMethod
require_relative '../lib/temporalio/activity'
require_relative '../lib/temporalio/client'
require_relative '../lib/temporalio/testing'
require_relative '../lib/temporalio/worker'
require_relative '../lib/temporalio/workflow... |
github | temporalio/sdk-ruby | https://github.com/temporalio/sdk-ruby | temporalio/extra/memory_bench.rb | Ruby | mit | 192 | main | 7,414 | # frozen_string_literal: true
# rubocop:disable Style/Documentation, Style/DocumentationMethod
# Memory profiling harness for investigating memory leaks.
# Runs trivial workflows in batches and samples RSS between batches.
#
# Usage:
# ruby extra/memory_bench.rb --workflow-count 5000 --batch-size 500
#
# With an ex... |
github | temporalio/sdk-ruby | https://github.com/temporalio/sdk-ruby | temporalio/lib/temporalio.rb | Ruby | mit | 192 | main | 274 | # frozen_string_literal: true
require 'temporalio/version'
require 'temporalio/versioning_override'
# Temporal Ruby SDK. See the README at https://github.com/temporalio/sdk-ruby.
module Temporalio
# @!visibility private
def self._root_file_path
__FILE__
end
end |
github | temporalio/sdk-ruby | https://github.com/temporalio/sdk-ruby | temporalio/lib/temporalio/common_enums.rb | Ruby | mit | 192 | main | 4,707 | # frozen_string_literal: true
require 'temporalio/api'
module Temporalio
# How already-in-use workflow IDs are handled on start.
#
# @see https://docs.temporal.io/workflows#workflow-id-reuse-policy
module WorkflowIDReusePolicy
# Allow starting a workflow execution using the same workflow ID.
ALLOW_DUP... |
github | temporalio/sdk-ruby | https://github.com/temporalio/sdk-ruby | temporalio/lib/temporalio/retry_policy.rb | Ruby | mit | 192 | main | 3,085 | # frozen_string_literal: true
require 'temporalio/internal/proto_utils'
module Temporalio
RetryPolicy = Data.define(
:initial_interval,
:backoff_coefficient,
:max_interval,
:max_attempts,
:non_retryable_error_types
)
# Options for retrying workflows and activities.
#
# @!attribute initi... |
github | temporalio/sdk-ruby | https://github.com/temporalio/sdk-ruby | temporalio/lib/temporalio/worker.rb | Ruby | mit | 192 | main | 35,397 | # frozen_string_literal: true
require 'temporalio/activity'
require 'temporalio/cancellation'
require 'temporalio/client'
require 'temporalio/error'
require 'temporalio/internal/bridge'
require 'temporalio/internal/bridge/worker'
require 'temporalio/internal/proto_utils'
require 'temporalio/internal/worker/activity_wo... |
github | temporalio/sdk-ruby | https://github.com/temporalio/sdk-ruby | temporalio/lib/temporalio/workflow_history.rb | Ruby | mit | 192 | main | 1,345 | # frozen_string_literal: true
require 'temporalio/api'
module Temporalio
# Representation of a workflow's history.
class WorkflowHistory
# Convert a JSON string to workflow history. This supports the JSON format exported by Temporal UI and CLI.
#
# @param json [String] JSON string.
# @return [Work... |
github | temporalio/sdk-ruby | https://github.com/temporalio/sdk-ruby | temporalio/lib/temporalio/workflow.rb | Ruby | mit | 192 | main | 38,620 | # frozen_string_literal: true
require 'random/formatter'
require 'temporalio/error'
require 'temporalio/internal/worker/workflow_instance'
require 'temporalio/priority'
require 'temporalio/workflow/activity_cancellation_type'
require 'temporalio/workflow/child_workflow_cancellation_type'
require 'temporalio/workflow/c... |
github | temporalio/sdk-ruby | https://github.com/temporalio/sdk-ruby | temporalio/lib/temporalio/api.rb | Ruby | mit | 192 | main | 420 | # frozen_string_literal: true
require 'temporalio/api/cloud/cloudservice'
require 'temporalio/api/common/v1/grpc_status'
require 'temporalio/api/errordetails/v1/message'
require 'temporalio/api/export/v1/message'
require 'temporalio/api/operatorservice'
require 'temporalio/api/sdk/v1/workflow_metadata'
require 'tempor... |
github | temporalio/sdk-ruby | https://github.com/temporalio/sdk-ruby | temporalio/lib/temporalio/metric.rb | Ruby | mit | 192 | main | 4,404 | # frozen_string_literal: true
require 'temporalio/internal/metric'
module Temporalio
# Metric that can be recorded from a metric meter. This is obtained via {Meter.create_metric}. The metric meter is
# obtained via workflow environment, activity context, or from the {Runtime} if in neither of those. This class is... |
github | temporalio/sdk-ruby | https://github.com/temporalio/sdk-ruby | temporalio/lib/temporalio/testing.rb | Ruby | mit | 192 | main | 218 | # frozen_string_literal: true
require 'temporalio/testing/activity_environment'
require 'temporalio/testing/workflow_environment'
module Temporalio
# Module for all testing environments.
module Testing
end
end |
github | temporalio/sdk-ruby | https://github.com/temporalio/sdk-ruby | temporalio/lib/temporalio/simple_plugin.rb | Ruby | mit | 192 | main | 7,971 | # frozen_string_literal: true
require 'temporalio/client'
require 'temporalio/worker'
module Temporalio
# Plugin that implements both {Client::Plugin} and {Worker::Plugin} and provides a simplified common set of settings
# for configuring both.
#
# WARNING: Plugins are experimental.
class SimplePlugin
i... |
github | temporalio/sdk-ruby | https://github.com/temporalio/sdk-ruby | temporalio/lib/temporalio/runtime.rb | Ruby | mit | 192 | main | 14,304 | # frozen_string_literal: true
require 'temporalio/internal/bridge'
require 'temporalio/internal/bridge/runtime'
require 'temporalio/internal/metric'
require 'temporalio/metric'
require 'temporalio/runtime/metric_buffer'
module Temporalio
# Runtime for Temporal Ruby SDK.
#
# Only one global {Runtime} needs to ex... |
github | temporalio/sdk-ruby | https://github.com/temporalio/sdk-ruby | temporalio/lib/temporalio/cancellation.rb | Ruby | mit | 192 | main | 6,560 | # frozen_string_literal: true
require 'temporalio/error'
require 'temporalio/workflow'
module Temporalio
# Cancellation representation, often known as a "cancellation token". This is used by clients, activities, and
# workflows to represent cancellation in a thread/fiber-safe way.
class Cancellation
# Creat... |
github | temporalio/sdk-ruby | https://github.com/temporalio/sdk-ruby | temporalio/lib/temporalio/worker_deployment_version.rb | Ruby | mit | 192 | main | 1,954 | # frozen_string_literal: true
require 'temporalio/internal/bridge/worker'
module Temporalio
WorkerDeploymentVersion = Data.define(
:deployment_name,
:build_id
)
# Represents the version of a specific worker deployment.
class WorkerDeploymentVersion
# Parse a version from a canonical string, which... |
github | temporalio/sdk-ruby | https://github.com/temporalio/sdk-ruby | temporalio/lib/temporalio/error.rb | Ruby | mit | 192 | main | 4,782 | # frozen_string_literal: true
require 'temporalio/api'
module Temporalio
# Superclass for all Temporal errors
class Error < StandardError
# Whether the error represents some form of cancellation from an activity or workflow.
#
# @param error [Exception] Error to check.
# @return [Boolean] True if ... |
github | temporalio/sdk-ruby | https://github.com/temporalio/sdk-ruby | temporalio/lib/temporalio/scoped_logger.rb | Ruby | mit | 192 | main | 2,708 | # frozen_string_literal: true
require 'delegate'
require 'logger'
module Temporalio
# Implementation via delegator to {::Logger} that puts scoped values on the log message and appends them to the log
# message.
class ScopedLogger < SimpleDelegator
# @!attribute scoped_values_getter
# @return [Proc, ni... |
github | temporalio/sdk-ruby | https://github.com/temporalio/sdk-ruby | temporalio/lib/temporalio/client.rb | Ruby | mit | 192 | main | 36,630 | # frozen_string_literal: true
require 'google/protobuf/well_known_types'
require 'logger'
require 'temporalio/api'
require 'temporalio/client/async_activity_handle'
require 'temporalio/client/connection'
require 'temporalio/client/interceptor'
require 'temporalio/client/plugin'
require 'temporalio/client/schedule'
req... |
github | temporalio/sdk-ruby | https://github.com/temporalio/sdk-ruby | temporalio/lib/temporalio/activity.rb | Ruby | mit | 192 | main | 358 | # frozen_string_literal: true
require 'temporalio/activity/cancellation_details'
require 'temporalio/activity/complete_async_error'
require 'temporalio/activity/context'
require 'temporalio/activity/definition'
require 'temporalio/activity/info'
require 'temporalio/priority'
module Temporalio
# All activity related... |
github | temporalio/sdk-ruby | https://github.com/temporalio/sdk-ruby | temporalio/lib/temporalio/priority.rb | Ruby | mit | 192 | main | 4,053 | # frozen_string_literal: true
require 'temporalio/api'
module Temporalio
Priority = Data.define(
:priority_key,
:fairness_key,
:fairness_weight
)
# Priority contains metadata that controls relative ordering of task processing when tasks are
# backlogged in a queue. Initially, Priority will be use... |
github | temporalio/sdk-ruby | https://github.com/temporalio/sdk-ruby | temporalio/lib/temporalio/env_config.rb | Ruby | mit | 192 | main | 11,942 | # frozen_string_literal: true
require 'pathname'
require 'temporalio/internal/bridge'
module Temporalio
# Environment and file-based configuration for Temporal clients.
module EnvConfig
# This module provides utilities to load Temporal client configuration from TOML files
# and environment variables.
... |
github | temporalio/sdk-ruby | https://github.com/temporalio/sdk-ruby | temporalio/lib/temporalio/versioning_override.rb | Ruby | mit | 192 | main | 1,839 | # frozen_string_literal: true
require 'temporalio/worker_deployment_version'
module Temporalio
# Base class for version overrides that can be provided in start workflow options.
# Used to control the versioning behavior of workflows started with this override.
class VersioningOverride
# @!visibility private... |
github | temporalio/sdk-ruby | https://github.com/temporalio/sdk-ruby | temporalio/lib/temporalio/search_attributes.rb | Ruby | mit | 192 | main | 12,318 | # frozen_string_literal: true
require 'temporalio/api'
module Temporalio
# Collection of typed search attributes.
#
# This is represented as a mapping of {SearchAttributes::Key} to object values. This is not a hash though it does have
# a few hash-like methods and can be converted to a hash via {#to_h}. In so... |
github | temporalio/sdk-ruby | https://github.com/temporalio/sdk-ruby | temporalio/lib/temporalio/internal/metric.rb | Ruby | mit | 192 | main | 3,404 | # frozen_string_literal: true
require 'singleton'
require 'temporalio/internal/bridge'
require 'temporalio/metric'
module Temporalio
module Internal
class Metric < Temporalio::Metric
attr_reader :metric_type, :name, :description, :unit, :value_type
def initialize(metric_type:, name:, description:, ... |
github | temporalio/sdk-ruby | https://github.com/temporalio/sdk-ruby | temporalio/lib/temporalio/internal/bridge.rb | Ruby | mit | 192 | main | 1,436 | # frozen_string_literal: true
# Use Ruby-version-specific Rust library if present. When the gem is compiled
# via the cross-gem action, it is placed in a version specific directory. E.g.
# for the Linux gem as of this writing, there will be files at:
# * temporalio/internal/bridge/3.2/temporalio_bridge.so
# * temp... |
github | temporalio/sdk-ruby | https://github.com/temporalio/sdk-ruby | temporalio/lib/temporalio/internal/proto_utils.rb | Ruby | mit | 192 | main | 5,788 | # frozen_string_literal: true
require 'temporalio/api'
module Temporalio
module Internal
module ProtoUtils
def self.seconds_to_duration(seconds_numeric)
return nil if seconds_numeric.nil?
seconds = seconds_numeric.to_i
nanos = ((seconds_numeric - seconds) * 1_000_000_000).round
... |
github | temporalio/sdk-ruby | https://github.com/temporalio/sdk-ruby | temporalio/lib/temporalio/internal/bridge/worker.rb | Ruby | mit | 192 | main | 4,270 | # frozen_string_literal: true
require 'temporalio/internal/bridge'
module Temporalio
module Internal
module Bridge
class Worker
Options = Struct.new(
:namespace,
:task_queue,
:tuner,
:identity_override,
:max_cached_workflows,
:workflow_ta... |
github | temporalio/sdk-ruby | https://github.com/temporalio/sdk-ruby | temporalio/lib/temporalio/internal/bridge/runtime.rb | Ruby | mit | 192 | main | 1,220 | # frozen_string_literal: true
module Temporalio
module Internal
module Bridge
class Runtime
Options = Struct.new(
:telemetry,
:worker_heartbeat_interval
)
TelemetryOptions = Struct.new(
:logging, # Optional
:metrics # Optional
)
... |
github | temporalio/sdk-ruby | https://github.com/temporalio/sdk-ruby | temporalio/lib/temporalio/internal/bridge/testing.rb | Ruby | mit | 192 | main | 1,764 | # frozen_string_literal: true
require 'temporalio/internal/bridge'
module Temporalio
module Internal
module Bridge
module Testing
class EphemeralServer
StartDevServerOptions = Struct.new(
:existing_path, # Optional
:sdk_name,
:sdk_version,
... |
github | temporalio/sdk-ruby | https://github.com/temporalio/sdk-ruby | temporalio/lib/temporalio/internal/bridge/client.rb | Ruby | mit | 192 | main | 2,268 | # frozen_string_literal: true
require 'temporalio/internal/bridge'
module Temporalio
module Internal
module Bridge
class Client
Options = Struct.new(
:target_host,
:client_name,
:client_version,
:rpc_metadata,
:api_key, # Optional
:identi... |
github | temporalio/sdk-ruby | https://github.com/temporalio/sdk-ruby | temporalio/lib/temporalio/internal/bridge/api/core_interface.rb | Ruby | mit | 192 | main | 3,703 | # frozen_string_literal: true
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: temporal/sdk/core/core_interface.proto
require 'google/protobuf'
require 'google/protobuf/duration_pb'
require 'google/protobuf/empty_pb'
require 'google/protobuf/timestamp_pb'
require 'temporalio/api/common/v1/message'... |
github | temporalio/sdk-ruby | https://github.com/temporalio/sdk-ruby | temporalio/lib/temporalio/internal/bridge/api/external_data/external_data.rb | Ruby | mit | 192 | main | 1,583 | # frozen_string_literal: true
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: temporal/sdk/core/external_data/external_data.proto
require 'google/protobuf'
require 'google/protobuf/duration_pb'
require 'google/protobuf/timestamp_pb'
descriptor_data = "\n3temporal/sdk/core/external_data/external... |
github | temporalio/sdk-ruby | https://github.com/temporalio/sdk-ruby | temporalio/lib/temporalio/internal/bridge/api/activity_result/activity_result.rb | Ruby | mit | 192 | main | 3,261 | # frozen_string_literal: true
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: temporal/sdk/core/activity_result/activity_result.proto
require 'google/protobuf'
require 'google/protobuf/duration_pb'
require 'google/protobuf/timestamp_pb'
require 'temporalio/api/common/v1/message'
require 'temporal... |
github | temporalio/sdk-ruby | https://github.com/temporalio/sdk-ruby | temporalio/lib/temporalio/internal/bridge/api/child_workflow/child_workflow.rb | Ruby | mit | 192 | main | 3,143 | # frozen_string_literal: true
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: temporal/sdk/core/child_workflow/child_workflow.proto
require 'google/protobuf'
require 'temporalio/api/common/v1/message'
require 'temporalio/api/failure/v1/message'
require 'temporalio/internal/bridge/api/common/commo... |
github | temporalio/sdk-ruby | https://github.com/temporalio/sdk-ruby | temporalio/lib/temporalio/internal/bridge/api/workflow_activation/workflow_activation.rb | Ruby | mit | 192 | main | 13,992 | # frozen_string_literal: true
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: temporal/sdk/core/workflow_activation/workflow_activation.proto
require 'google/protobuf'
require 'google/protobuf/timestamp_pb'
require 'google/protobuf/duration_pb'
require 'google/protobuf/empty_pb'
require 'temporal... |
github | temporalio/sdk-ruby | https://github.com/temporalio/sdk-ruby | temporalio/lib/temporalio/internal/bridge/api/workflow_completion/workflow_completion.rb | Ruby | mit | 192 | main | 2,296 | # frozen_string_literal: true
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: temporal/sdk/core/workflow_completion/workflow_completion.proto
require 'google/protobuf'
require 'temporalio/api/failure/v1/message'
require 'temporalio/api/enums/v1/failed_cause'
require 'temporalio/api/enums/v1/workf... |
github | temporalio/sdk-ruby | https://github.com/temporalio/sdk-ruby | temporalio/lib/temporalio/internal/bridge/api/common/common.rb | Ruby | mit | 192 | main | 1,459 | # frozen_string_literal: true
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: temporal/sdk/core/common/common.proto
require 'google/protobuf'
require 'google/protobuf/duration_pb'
descriptor_data = "\n%temporal/sdk/core/common/common.proto\x12\x0e\x63oresdk.common\x1a\x1egoogle/protobuf/duratio... |
github | temporalio/sdk-ruby | https://github.com/temporalio/sdk-ruby | temporalio/lib/temporalio/internal/bridge/api/nexus/nexus.rb | Ruby | mit | 192 | main | 3,505 | # frozen_string_literal: true
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: temporal/sdk/core/nexus/nexus.proto
require 'google/protobuf'
require 'google/protobuf/timestamp_pb'
require 'temporalio/api/common/v1/message'
require 'temporalio/api/failure/v1/message'
require 'temporalio/api/nexus/v... |
github | temporalio/sdk-ruby | https://github.com/temporalio/sdk-ruby | temporalio/lib/temporalio/internal/bridge/api/activity_task/activity_task.rb | Ruby | mit | 192 | main | 4,060 | # frozen_string_literal: true
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: temporal/sdk/core/activity_task/activity_task.proto
require 'google/protobuf'
require 'google/protobuf/duration_pb'
require 'google/protobuf/timestamp_pb'
require 'temporalio/api/common/v1/message'
require 'temporalio/i... |
github | temporalio/sdk-ruby | https://github.com/temporalio/sdk-ruby | temporalio/lib/temporalio/internal/bridge/api/workflow_commands/workflow_commands.rb | Ruby | mit | 192 | main | 17,172 | # frozen_string_literal: true
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: temporal/sdk/core/workflow_commands/workflow_commands.proto
require 'google/protobuf'
require 'google/protobuf/duration_pb'
require 'google/protobuf/timestamp_pb'
require 'google/protobuf/empty_pb'
require 'temporalio/a... |
github | temporalio/sdk-ruby | https://github.com/temporalio/sdk-ruby | temporalio/lib/temporalio/internal/client/implementation.rb | Ruby | mit | 192 | main | 42,811 | # frozen_string_literal: true
require 'google/protobuf/well_known_types'
require 'securerandom'
require 'temporalio/activity'
require 'temporalio/api'
require 'temporalio/client/activity_id_reference'
require 'temporalio/client/async_activity_handle'
require 'temporalio/client/connection'
require 'temporalio/client/in... |
github | temporalio/sdk-ruby | https://github.com/temporalio/sdk-ruby | temporalio/lib/temporalio/internal/worker/activity_worker.rb | Ruby | mit | 192 | main | 19,787 | # frozen_string_literal: true
require 'temporalio/activity'
require 'temporalio/activity/definition'
require 'temporalio/cancellation'
require 'temporalio/converters/raw_value'
require 'temporalio/internal/bridge/api'
require 'temporalio/internal/proto_utils'
require 'temporalio/scoped_logger'
require 'temporalio/work... |
github | temporalio/sdk-ruby | https://github.com/temporalio/sdk-ruby | temporalio/lib/temporalio/internal/worker/multi_runner.rb | Ruby | mit | 192 | main | 7,629 | # frozen_string_literal: true
require 'singleton'
require 'temporalio/internal/bridge/worker'
module Temporalio
module Internal
module Worker
# Primary worker (re)actor-style event handler. This handles multiple workers, receiving events from the bridge,
# and handling a user block.
class Mult... |
github | temporalio/sdk-ruby | https://github.com/temporalio/sdk-ruby | temporalio/lib/temporalio/internal/worker/workflow_worker.rb | Ruby | mit | 192 | main | 10,538 | # frozen_string_literal: true
require 'temporalio/api/payload_visitor'
require 'temporalio/error'
require 'temporalio/internal/worker/workflow_instance'
require 'temporalio/scoped_logger'
require 'temporalio/workflow'
require 'temporalio/workflow/definition'
require 'timeout'
module Temporalio
module Internal
m... |
github | temporalio/sdk-ruby | https://github.com/temporalio/sdk-ruby | temporalio/lib/temporalio/internal/worker/workflow_instance.rb | Ruby | mit | 192 | main | 38,994 | # frozen_string_literal: true
require 'json'
require 'temporalio'
require 'temporalio/activity/definition'
require 'temporalio/api'
require 'temporalio/converters/payload_converter'
require 'temporalio/converters/raw_value'
require 'temporalio/error'
require 'temporalio/internal/bridge/api'
require 'temporalio/interna... |
github | temporalio/sdk-ruby | https://github.com/temporalio/sdk-ruby | temporalio/lib/temporalio/internal/worker/workflow_instance/child_workflow_handle.rb | Ruby | mit | 192 | main | 2,349 | # frozen_string_literal: true
require 'temporalio/cancellation'
require 'temporalio/workflow'
require 'temporalio/workflow/child_workflow_handle'
module Temporalio
module Internal
module Worker
class WorkflowInstance
# Implementation of the child workflow handle.
class ChildWorkflowHandle ... |
github | temporalio/sdk-ruby | https://github.com/temporalio/sdk-ruby | temporalio/lib/temporalio/internal/worker/workflow_instance/nexus_client.rb | Ruby | mit | 192 | main | 1,509 | # frozen_string_literal: true
require 'temporalio/workflow'
require 'temporalio/workflow/nexus_client'
module Temporalio
module Internal
module Worker
class WorkflowInstance
# Implementation of the Nexus client.
class NexusClient < Workflow::NexusClient
attr_reader :endpoint, :se... |
github | temporalio/sdk-ruby | https://github.com/temporalio/sdk-ruby | temporalio/lib/temporalio/internal/worker/workflow_instance/details.rb | Ruby | mit | 192 | main | 1,831 | # frozen_string_literal: true
module Temporalio
module Internal
module Worker
class WorkflowInstance
# Details needed to instantiate a {WorkflowInstance}.
class Details
attr_reader :namespace, :task_queue, :definition, :initial_activation, :logger, :metric_meter,
... |
github | temporalio/sdk-ruby | https://github.com/temporalio/sdk-ruby | temporalio/lib/temporalio/internal/worker/workflow_instance/externally_immutable_hash.rb | Ruby | mit | 192 | main | 588 | # frozen_string_literal: true
require 'delegate'
module Temporalio
module Internal
module Worker
class WorkflowInstance
# Delegator to a hash that does not allow external mutations. Used for memo.
class ExternallyImmutableHash < SimpleDelegator
def initialize(initial_hash)
... |
github | temporalio/sdk-ruby | https://github.com/temporalio/sdk-ruby | temporalio/lib/temporalio/internal/worker/workflow_instance/outbound_implementation.rb | Ruby | mit | 192 | main | 23,017 | # frozen_string_literal: true
require 'temporalio/activity/definition'
require 'temporalio/cancellation'
require 'temporalio/error'
require 'temporalio/internal/bridge/api'
require 'temporalio/internal/proto_utils'
require 'temporalio/internal/worker/workflow_instance'
require 'temporalio/internal/worker/workflow_inst... |
github | temporalio/sdk-ruby | https://github.com/temporalio/sdk-ruby | temporalio/lib/temporalio/internal/worker/workflow_instance/replay_safe_metric.rb | Ruby | mit | 192 | main | 1,054 | # frozen_string_literal: true
require 'temporalio/scoped_logger'
module Temporalio
module Internal
module Worker
class WorkflowInstance
# Wrapper for a metric that does not log on replay.
class ReplaySafeMetric < SimpleDelegator
def record(value, additional_attributes: nil)
... |
github | temporalio/sdk-ruby | https://github.com/temporalio/sdk-ruby | temporalio/lib/temporalio/internal/worker/workflow_instance/replay_safe_logger.rb | Ruby | mit | 192 | main | 1,152 | # frozen_string_literal: true
require 'temporalio/scoped_logger'
require 'temporalio/workflow'
module Temporalio
module Internal
module Worker
class WorkflowInstance
# Wrapper for a scoped logger that does not log on replay.
class ReplaySafeLogger < ScopedLogger
def initialize(lo... |
github | temporalio/sdk-ruby | https://github.com/temporalio/sdk-ruby | temporalio/lib/temporalio/internal/worker/workflow_instance/scheduler.rb | Ruby | mit | 192 | main | 7,333 | # frozen_string_literal: true
require 'temporalio'
require 'temporalio/cancellation'
require 'temporalio/error'
require 'temporalio/internal/worker/workflow_instance'
require 'temporalio/workflow'
require 'timeout'
module Temporalio
module Internal
module Worker
class WorkflowInstance
# Determinis... |
github | temporalio/sdk-ruby | https://github.com/temporalio/sdk-ruby | temporalio/lib/temporalio/internal/worker/workflow_instance/inbound_implementation.rb | Ruby | mit | 192 | main | 1,740 | # frozen_string_literal: true
require 'temporalio/internal/worker/workflow_instance'
require 'temporalio/worker/interceptor'
require 'temporalio/workflow'
module Temporalio
module Internal
module Worker
class WorkflowInstance
# Root implementation of the inbound interceptor.
class InboundI... |
github | temporalio/sdk-ruby | https://github.com/temporalio/sdk-ruby | temporalio/lib/temporalio/internal/worker/workflow_instance/illegal_call_tracer.rb | Ruby | mit | 192 | main | 7,370 | # frozen_string_literal: true
require 'temporalio/worker/illegal_workflow_call_validator'
require 'temporalio/workflow'
module Temporalio
module Internal
module Worker
class WorkflowInstance
# Class that installs {::TracePoint} to disallow illegal calls.
class IllegalCallTracer
d... |
github | temporalio/sdk-ruby | https://github.com/temporalio/sdk-ruby | temporalio/lib/temporalio/internal/worker/workflow_instance/context.rb | Ruby | mit | 192 | main | 14,295 | # frozen_string_literal: true
require 'temporalio/cancellation'
require 'temporalio/error'
require 'temporalio/internal/bridge/api'
require 'temporalio/internal/proto_utils'
require 'temporalio/internal/worker/workflow_instance'
require 'temporalio/internal/worker/workflow_instance/external_workflow_handle'
require 't... |
github | temporalio/sdk-ruby | https://github.com/temporalio/sdk-ruby | temporalio/lib/temporalio/internal/worker/workflow_instance/nexus_operation_handle.rb | Ruby | mit | 192 | main | 1,981 | # frozen_string_literal: true
require 'temporalio/cancellation'
require 'temporalio/workflow'
require 'temporalio/workflow/nexus_operation_handle'
module Temporalio
module Internal
module Worker
class WorkflowInstance
# Implementation of the Nexus operation handle.
class NexusOperationHand... |
github | temporalio/sdk-ruby | https://github.com/temporalio/sdk-ruby | temporalio/lib/temporalio/internal/worker/workflow_instance/external_workflow_handle.rb | Ruby | mit | 192 | main | 946 | # frozen_string_literal: true
require 'temporalio/cancellation'
require 'temporalio/workflow'
require 'temporalio/workflow/external_workflow_handle'
module Temporalio
module Internal
module Worker
class WorkflowInstance
# Implementation of the external workflow handle.
class ExternalWorkfl... |
github | temporalio/sdk-ruby | https://github.com/temporalio/sdk-ruby | temporalio/lib/temporalio/internal/worker/workflow_instance/handler_execution.rb | Ruby | mit | 192 | main | 646 | # frozen_string_literal: true
module Temporalio
module Internal
module Worker
class WorkflowInstance
# Representation of a currently-executing handler. Used to track whether any handlers are still running and warn
# on workflow complete as needed.
class HandlerExecution
at... |
github | temporalio/sdk-ruby | https://github.com/temporalio/sdk-ruby | temporalio/lib/temporalio/internal/worker/workflow_instance/handler_hash.rb | Ruby | mit | 192 | main | 1,475 | # frozen_string_literal: true
module Temporalio
module Internal
module Worker
class WorkflowInstance
# Hash for handlers that notifies when one is added. Only `[]=` and `store` can be used to mutate it.
class HandlerHash < SimpleDelegator
def initialize(initial_frozen_hash, defini... |
github | temporalio/sdk-ruby | https://github.com/temporalio/sdk-ruby | temporalio/lib/temporalio/converters/raw_value.rb | Ruby | mit | 192 | main | 676 | # frozen_string_literal: true
module Temporalio
module Converters
# Raw value wrapper that has the raw payload. When raw args are configured at implementation time, the inbound
# arguments will be instances of this class. When instances of this class are sent outbound or returned from
# inbound calls, th... |
github | temporalio/sdk-ruby | https://github.com/temporalio/sdk-ruby | temporalio/lib/temporalio/converters/payload_codec.rb | Ruby | mit | 192 | main | 1,124 | # frozen_string_literal: true
module Temporalio
module Converters
# Base class for encoding and decoding payloads. Commonly used for encryption.
class PayloadCodec
# Encode the given payloads into a new set of payloads.
#
# @param payloads [Enumerable<Api::Common::V1::Payload>] Payloads to ... |
github | temporalio/sdk-ruby | https://github.com/temporalio/sdk-ruby | temporalio/lib/temporalio/converters/payload_converter.rb | Ruby | mit | 192 | main | 3,710 | # 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... |
github | temporalio/sdk-ruby | https://github.com/temporalio/sdk-ruby | temporalio/lib/temporalio/converters/failure_converter.rb | Ruby | mit | 192 | main | 11,634 | # frozen_string_literal: true
require 'temporalio/api'
require 'temporalio/error'
require 'temporalio/internal/proto_utils'
module Temporalio
module Converters
# Base class for converting Ruby errors to/from Temporal failures.
class FailureConverter
# @return [FailureConverter] Default failure convert... |
github | temporalio/sdk-ruby | https://github.com/temporalio/sdk-ruby | temporalio/lib/temporalio/converters/data_converter.rb | Ruby | mit | 192 | main | 4,683 | # 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 [PayloadCo... |
github | temporalio/sdk-ruby | https://github.com/temporalio/sdk-ruby | temporalio/lib/temporalio/converters/payload_converter/json_protobuf.rb | Ruby | mit | 192 | main | 1,362 | # 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
EN... |
github | temporalio/sdk-ruby | https://github.com/temporalio/sdk-ruby | temporalio/lib/temporalio/converters/payload_converter/json_plain.rb | Ruby | mit | 192 | main | 2,290 | # frozen_string_literal: true
require 'json'
require 'temporalio/api'
require 'temporalio/converters/payload_converter/encoding'
require 'temporalio/workflow'
module Temporalio
module Converters
class PayloadConverter
# Encoding for all values for +json/plain+ encoding.
class JSONPlain < Encoding
... |
github | temporalio/sdk-ruby | https://github.com/temporalio/sdk-ruby | temporalio/lib/temporalio/converters/payload_converter/binary_protobuf.rb | Ruby | mit | 192 | main | 1,421 | # 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
... |
github | temporalio/sdk-ruby | https://github.com/temporalio/sdk-ruby | temporalio/lib/temporalio/converters/payload_converter/composite.rb | Ruby | mit | 192 | main | 2,952 | # frozen_string_literal: true
require 'temporalio/api'
require 'temporalio/converters/payload_converter'
require 'temporalio/converters/raw_value'
require 'temporalio/error'
module Temporalio
module Converters
class PayloadConverter
# Payload converter that is a collection of {Encoding}s. When converting ... |
github | temporalio/sdk-ruby | https://github.com/temporalio/sdk-ruby | temporalio/lib/temporalio/converters/payload_converter/encoding.rb | Ruby | mit | 192 | main | 1,626 | # 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 impleme... |
github | temporalio/sdk-ruby | https://github.com/temporalio/sdk-ruby | temporalio/lib/temporalio/converters/payload_converter/binary_null.rb | Ruby | mit | 192 | main | 854 | # 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'
#... |
github | temporalio/sdk-ruby | https://github.com/temporalio/sdk-ruby | temporalio/lib/temporalio/converters/payload_converter/binary_plain.rb | Ruby | mit | 192 | main | 970 | # 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/... |
github | temporalio/sdk-ruby | https://github.com/temporalio/sdk-ruby | temporalio/lib/temporalio/error/failure.rb | Ruby | mit | 192 | main | 9,694 | # frozen_string_literal: true
require 'temporalio/api'
require 'temporalio/error'
module Temporalio
class Error
# Base class for all Temporal serializable failures.
class Failure < Error
end
# Error raised by a client or workflow when a workflow execution has already started.
class WorkflowAlre... |
github | temporalio/sdk-ruby | https://github.com/temporalio/sdk-ruby | temporalio/lib/temporalio/contrib/open_telemetry.rb | Ruby | mit | 192 | main | 23,237 | # frozen_string_literal: true
require 'English'
require 'opentelemetry' # This import will intentionally fail if the user does not have OTel gem available
require 'temporalio/client/interceptor'
require 'temporalio/converters/payload_converter'
require 'temporalio/worker/interceptor'
module Temporalio
module Contri... |
github | temporalio/sdk-ruby | https://github.com/temporalio/sdk-ruby | temporalio/lib/temporalio/runtime/metric_buffer.rb | Ruby | mit | 192 | main | 3,777 | # frozen_string_literal: true
module Temporalio
class Runtime
# Metric buffer for use with a runtime to capture metrics. Only one metric buffer can be associated with a runtime
# and {retrieve_updates} cannot be called before the runtime is created. Once runtime created, users should
# regularly call {re... |
github | temporalio/sdk-ruby | https://github.com/temporalio/sdk-ruby | temporalio/lib/temporalio/workflow/child_workflow_cancellation_type.rb | Ruby | mit | 192 | main | 1,006 | # frozen_string_literal: true
require 'temporalio/internal/bridge/api'
module Temporalio
module Workflow
# Cancellation types for child workflows.
module ChildWorkflowCancellationType
# Do not request cancellation of the child workflow if already scheduled.
ABANDON = Internal::Bridge::Api::Child... |
github | temporalio/sdk-ruby | https://github.com/temporalio/sdk-ruby | temporalio/lib/temporalio/workflow/child_workflow_handle.rb | Ruby | mit | 192 | main | 1,724 | # frozen_string_literal: true
module Temporalio
module Workflow
# Handle for interacting with a child workflow.
#
# This is created via {Workflow.start_child_workflow}, it is never instantiated directly.
class ChildWorkflowHandle
# @!visibility private
def initialize
raise NotImpl... |
github | temporalio/sdk-ruby | https://github.com/temporalio/sdk-ruby | temporalio/lib/temporalio/workflow/future.rb | Ruby | mit | 192 | main | 6,146 | # frozen_string_literal: true
require 'temporalio/workflow'
module Temporalio
module Workflow
# Asynchronous future for use in workflows to do concurrent and background work. This can only be used inside
# workflows.
class Future
# Return a future that completes when any of the given futures compl... |
github | temporalio/sdk-ruby | https://github.com/temporalio/sdk-ruby | temporalio/lib/temporalio/workflow/external_workflow_handle.rb | Ruby | mit | 192 | main | 1,366 | # frozen_string_literal: true
require 'temporalio/workflow'
module Temporalio
module Workflow
# Handle for interacting with an external workflow.
#
# This is created via {Workflow.external_workflow_handle}, it is never instantiated directly.
class ExternalWorkflowHandle
# @!visibility private
... |
github | temporalio/sdk-ruby | https://github.com/temporalio/sdk-ruby | temporalio/lib/temporalio/workflow/nexus_operation_handle.rb | Ruby | mit | 192 | main | 1,132 | # frozen_string_literal: true
module Temporalio
module Workflow
# Handle for interacting with a Nexus operation.
#
# This is created via {NexusClient#start_operation}, it is never instantiated directly.
#
# WARNING: Nexus support is experimental.
class NexusOperationHandle
# @!visibilit... |
github | temporalio/sdk-ruby | https://github.com/temporalio/sdk-ruby | temporalio/lib/temporalio/workflow/activity_cancellation_type.rb | Ruby | mit | 192 | main | 995 | # frozen_string_literal: true
require 'temporalio/internal/bridge/api'
module Temporalio
module Workflow
# Cancellation types for activities.
module ActivityCancellationType
# Initiate a cancellation request and immediately report cancellation to the workflow.
TRY_CANCEL = Internal::Bridge::Api:... |
github | temporalio/sdk-ruby | https://github.com/temporalio/sdk-ruby | temporalio/lib/temporalio/workflow/handler_unfinished_policy.rb | Ruby | mit | 192 | main | 328 | # frozen_string_literal: true
module Temporalio
module Workflow
# Actions taken if a workflow completes with running handlers.
module HandlerUnfinishedPolicy
# Issue a warning in addition to abandoning.
WARN_AND_ABANDON = 1
# Abandon the handler with no warning.
ABANDON = 2
end
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.