Module: Temporalio::Client::Interceptor

Defined in:
lib/temporalio/client/interceptor.rb

Overview

Note:

Input classes herein may get new required fields added and therefore the constructors of the Input classes

Mixin for intercepting clients. Classes that include this should implement their own #intercept_client that returns their own instance of Outbound.

may change in backwards incompatible ways. Users should not try to construct Input classes themselves.

Defined Under Namespace

Classes: Outbound

Constant Summary collapse

StartWorkflowInput =
Data.define(
  :workflow,
  :args,
  :workflow_id,
  :task_queue,
  :static_summary,
  :static_details,
  :execution_timeout,
  :run_timeout,
  :task_timeout,
  :id_reuse_policy,
  :id_conflict_policy,
  :retry_policy,
  :cron_schedule,
  :memo,
  :search_attributes,
  :start_delay,
  :request_eager_start,
  :headers,
  :rpc_options
)
StartUpdateWithStartWorkflowInput =
Data.define(
  :update_id,
  :update,
  :args,
  :wait_for_stage,
  :start_workflow_operation,
  :headers,
  :rpc_options
)
SignalWithStartWorkflowInput =
Data.define(
  :signal,
  :args,
  :start_workflow_operation,
  # Headers intentionally not defined here, because they are not separate from start_workflow_operation
  :rpc_options
)
ListWorkflowsInput =
Data.define(
  :query,
  :rpc_options
)
CountWorkflowsInput =
Data.define(
  :query,
  :rpc_options
)
DescribeWorkflowInput =
Data.define(
  :workflow_id,
  :run_id,
  :rpc_options
)
FetchWorkflowHistoryEventsInput =
Data.define(
  :workflow_id,
  :run_id,
  :wait_new_event,
  :event_filter_type,
  :skip_archival,
  :rpc_options
)
SignalWorkflowInput =
Data.define(
  :workflow_id,
  :run_id,
  :signal,
  :args,
  :headers,
  :rpc_options
)
QueryWorkflowInput =
Data.define(
  :workflow_id,
  :run_id,
  :query,
  :args,
  :reject_condition,
  :headers,
  :rpc_options
)
StartWorkflowUpdateInput =
Data.define(
  :workflow_id,
  :run_id,
  :update_id,
  :update,
  :args,
  :wait_for_stage,
  :headers,
  :rpc_options
)
PollWorkflowUpdateInput =
Data.define(
  :workflow_id,
  :run_id,
  :update_id,
  :rpc_options
)
CancelWorkflowInput =
Data.define(
  :workflow_id,
  :run_id,
  :first_execution_run_id,
  :rpc_options
)
TerminateWorkflowInput =
Data.define(
  :workflow_id,
  :run_id,
  :first_execution_run_id,
  :reason,
  :details,
  :rpc_options
)
CreateScheduleInput =
Data.define(
  :id,
  :schedule,
  :trigger_immediately,
  :backfills,
  :memo,
  :search_attributes,
  :rpc_options
)
ListSchedulesInput =
Data.define(
  :query,
  :rpc_options
)
BackfillScheduleInput =
Data.define(
  :id,
  :backfills,
  :rpc_options
)
DeleteScheduleInput =
Data.define(
  :id,
  :rpc_options
)
DescribeScheduleInput =
Data.define(
  :id,
  :rpc_options
)
PauseScheduleInput =
Data.define(
  :id,
  :note,
  :rpc_options
)
TriggerScheduleInput =
Data.define(
  :id,
  :overlap,
  :rpc_options
)
UnpauseScheduleInput =
Data.define(
  :id,
  :note,
  :rpc_options
)
UpdateScheduleInput =
Data.define(
  :id,
  :updater,
  :rpc_options
)
HeartbeatAsyncActivityInput =
Data.define(
  :task_token_or_id_reference,
  :details,
  :rpc_options
)
CompleteAsyncActivityInput =
Data.define(
  :task_token_or_id_reference,
  :result,
  :rpc_options
)
FailAsyncActivityInput =
Data.define(
  :task_token_or_id_reference,
  :error,
  :last_heartbeat_details,
  :rpc_options
)
ReportCancellationAsyncActivityInput =
Data.define(
  :task_token_or_id_reference,
  :details,
  :rpc_options
)

Instance Method Summary collapse

Instance Method Details

#intercept_client(next_interceptor) ⇒ Outbound

Method called when intercepting a client. This is called upon client creation.

Parameters:

  • next_interceptor (Outbound)

    Next interceptor in the chain that should be called. This is usually passed to Outbound constructor.

Returns:

  • (Outbound)

    Interceptor to be called for client calls.



16
17
18
# File 'lib/temporalio/client/interceptor.rb', line 16

def intercept_client(next_interceptor)
  next_interceptor
end