Skip to main content

Crate temporalio_client

Crate temporalio_client 

Source
Expand description

This crate contains client implementations that can be used to contact the Temporal service.

It implements auto-retry behavior and metrics collection.

Re-exports§

pub use interceptors::BackfillScheduleInput;
pub use interceptors::CancelWorkflowInput;
pub use interceptors::ClientInterceptor;
pub use interceptors::CompleteAsyncActivityInput;
pub use interceptors::CountWorkflowsInput;
pub use interceptors::CountWorkflowsOutput;
pub use interceptors::CreateScheduleInput;
pub use interceptors::CreateScheduleOutput;
pub use interceptors::DeleteScheduleInput;
pub use interceptors::DescribeScheduleInput;
pub use interceptors::DescribeScheduleOutput;
pub use interceptors::DescribeWorkflowInput;
pub use interceptors::DescribeWorkflowOutput;
pub use interceptors::FailAsyncActivityInput;
pub use interceptors::FetchWorkflowHistoryPageInput;
pub use interceptors::FetchWorkflowHistoryPageOutput;
pub use interceptors::HasArgs;
pub use interceptors::HeartbeatAsyncActivityInput;
pub use interceptors::ListSchedulesPageInput;
pub use interceptors::ListSchedulesPageOutput;
pub use interceptors::ListWorkflowsPageInput;
pub use interceptors::ListWorkflowsPageOutput;
pub use interceptors::Next;
pub use interceptors::PauseScheduleInput;
pub use interceptors::PollWorkflowUpdateInput;
pub use interceptors::PollWorkflowUpdateOutput;
pub use interceptors::QueryWorkflowInput;
pub use interceptors::QueryWorkflowOutput;
pub use interceptors::ReportAsyncActivityCancellationInput;
pub use interceptors::SendScheduleUpdateInput;
pub use interceptors::SignalWorkflowInput;
pub use interceptors::StartWorkflowInput;
pub use interceptors::StartWorkflowOutput;
pub use interceptors::StartWorkflowUpdateInput;
pub use interceptors::StartWorkflowUpdateOutput;
pub use interceptors::TemporalClientValue;
pub use interceptors::TerminateWorkflowInput;
pub use interceptors::TriggerScheduleInput;
pub use interceptors::UnpauseScheduleInput;
pub use interceptors::UpdateScheduleInput;
pub use plugins::ClientPlugin;
pub use plugins::ErasedClientPlugin;
pub use plugins::PluginApplyError;
pub use plugins::PluginError;
pub use plugins::PluginTarget;
pub use plugins::WorkerPluginData;
pub use tonic;

Modules§

callback_based
This module implements support for callback-based gRPC service that has a callback invoked for every gRPC call instead of directly using the network.
client_options_builder
Tools for manipulating the type state of ClientOptionsBuilder.
connection_options_builder
Tools for manipulating the type state of ConnectionOptionsBuilder.
danger
Potentially dangerous TLS related functionality.
envconfig
Configuration loading from environment variables and TOML files. Conversion from temporalio_common::envconfig::ClientConfigProfile to ConnectionOptions and ClientOptions.
errors
Contains errors that can be returned by clients.
grpc
gRPC service traits for direct access to Temporal services.
interceptors
Interceptors for high-level client operations. Interceptors for high-level client operations.
plugins
Experimental APIs for configuring clients with reusable plugins. Experimental client plugin APIs.
request_extensions
Request extensions for tonic gRPC requests.
schedules
Schedule operations: create, describe, update, pause, trigger, backfill, list, and delete.
worker
Contains types and logic for interactions between clients and Core/SDK workers.

Structs§

ActivityCancelOptions
Options for ActivityHandle::cancel.
ActivityCancelOptionsBuilder
Use builder syntax to set the inputs and finish with build().
ActivityCountOptions
Options for counting activities.
ActivityCountOptionsBuilder
Use builder syntax to set the inputs and finish with build().
ActivityDescribeOptions
Controls which optional fields will be requested in ActivityHandle::describe operation. The fields will be present in returned ActivityExecutionDescription, subject to data availability and server support.
ActivityDescribeOptionsBuilder
Use builder syntax to set the inputs and finish with build().
ActivityExecutionCount
Result of an activity count operation.
ActivityExecutionCountAggregationGroup
Aggregation group from an activity count query with a group-by clause.
ActivityExecutionDescription
Contains the current state of the activity execution. Obtained from ActivityHandle::describe. Methods that deserialize payloads (e.g. heartbeat_details) use DataConverter of the client associated with the activity handle.
ActivityExecutionInfo
Contains basic information about an activity. Obtained from Client::list_activities.
ActivityHandle
Handle associated with a standalone activity execution that can be used to wait for the result or to manage execution of the activity. Obtained from Client::start_activity or Client::get_activity_handle.
ActivityHeartbeatResponse
Response from a heartbeat call.
ActivityListOptions
Options for listing activities.
ActivityListOptionsBuilder
Use builder syntax to set the inputs and finish with build().
ActivityStartOptions
Options for starting a standalone activity.
ActivityStartOptionsBuilder
Use builder syntax to set the inputs and finish with build().
ActivityTerminateOptions
Options for ActivityHandle::terminate.
ActivityTerminateOptionsBuilder
Use builder syntax to set the inputs and finish with build().
AsyncActivityHandle
Handle for completing activities asynchronously (outside the worker).
Client
Contains an instance of a namespace-bound client for interacting with the Temporal server. Cheap to clone.
ClientKeepAliveOptions
Client keep alive configuration.
ClientKeepAliveOptionsBuilder
Use builder syntax to set the inputs and finish with build().
ClientOptions
Options for crate::Client::new.
ClientOptionsBuilder
Use builder syntax to set the inputs and finish with build().
ClientTlsOptions
If using mTLS, both the client cert and private key must be specified, this contains them.
ClientTlsOptionsBuilder
Use builder syntax to set the inputs and finish with build().
Connection
A connection to the Temporal service.
ConnectionOptions
Options for crate::Connection::connect.
ConnectionOptionsBuilder
Use builder syntax to set the inputs and finish with build().
DnsLoadBalancingOptions
Options for DNS-based load balancing.
DnsLoadBalancingOptionsBuilder
Use builder syntax to set the inputs and finish with build().
HttpConnectProxyOptions
Options for HTTP CONNECT proxy.
ListActivitiesStream
A stream of activity executions from a list query. Internally paginates through results from the server.
ListWorkflowsStream
A stream of workflow executions from a list query. Internally paginates through results from the server.
Memo
A collection of memo payloads that can be deserialized into typed values.
PayloadLimitsOptions
Payload size limit options for a connection. NOTE: Experimental
PayloadLimitsOptionsBuilder
Use builder syntax to set the inputs and finish with build().
Priority
Priority contains metadata that controls relative ordering of task processing when tasks are backlogged in a queue. Initially, Priority will be used in activity and workflow task queues, which are typically where backlogs exist. Other queues in the server (such as transfer and timer queues) and rate limiting decisions do not use Priority, but may in the future.
RegisterNamespaceOptions
Helper struct for register_namespace.
RegisterNamespaceOptionsBuilder
Use builder syntax to set the inputs and finish with build().
RetryOptions
Configuration for retrying requests to the server
RetryPolicy
Options for retrying workflows and activities.
RpcMetadata
Metadata attached to a single high-level client RPC.
RpcOptions
Controls applied to a single high-level client RPC.
ServiceCallInterceptor
Interceptor which attaches common metadata (like “client-name”) to every outgoing call
SharedReplaceableClient
A client wrapper that allows replacing the underlying client at a later point in time. Clones of this struct have a shared reference to the underlying client, and each clone also has its own cached clone of the underlying client. Before every service call, a check is made whether the shared client was replaced, and the cached clone is updated accordingly.
TemporalServiceClient
Aggregates various services exposed by the Temporal server
TlsOptions
Configuration options for TLS
TlsOptionsBuilder
Use builder syntax to set the inputs and finish with build().
UntypedQuery
Marker type for sending untyped queries. Stores the query name for runtime lookup.
UntypedSignal
Marker type for sending untyped signals. Stores the signal name for runtime lookup.
UntypedUpdate
Marker type for sending untyped updates. Stores the update name for runtime lookup.
UntypedWorkflow
Marker type for untyped workflow handles. Stores the workflow type name. Uses RawValue for both input and output.
Url
A parsed URL record.
WorkflowCancelOptions
Options for cancelling a workflow.
WorkflowCancelOptionsBuilder
Use builder syntax to set the inputs and finish with build().
WorkflowCountAggregationGroup
Aggregation group from a workflow count query with a group-by clause.
WorkflowCountOptions
Options for counting workflows.
WorkflowCountOptionsBuilder
Use builder syntax to set the inputs and finish with build().
WorkflowDescribeOptions
Options for describing a workflow.
WorkflowDescribeOptionsBuilder
Use builder syntax to set the inputs and finish with build().
WorkflowExecuteUpdateOptions
Options for starting a workflow update.
WorkflowExecuteUpdateOptionsBuilder
Use builder syntax to set the inputs and finish with build().
WorkflowExecution
A workflow execution returned from list operations. This represents information about a workflow present in visibility.
WorkflowExecutionCount
Result of a workflow count operation.
WorkflowExecutionDescription
Description of a workflow execution returned by WorkflowHandle::describe.
WorkflowExecutionInfo
Holds needed information to refer to a specific workflow run, or workflow execution chain
WorkflowFetchHistoryOptions
Options for fetching workflow history.
WorkflowFetchHistoryOptionsBuilder
Use builder syntax to set the inputs and finish with build().
WorkflowGetResultOptions
Options for fetching workflow results
WorkflowGetResultOptionsBuilder
Use builder syntax to set the inputs and finish with build().
WorkflowHandle
A workflow handle which can refer to a specific workflow run, or a chain of workflow runs with the same workflow id.
WorkflowHistory
Workflow execution history returned by WorkflowHandle::fetch_history.
WorkflowHistoryJsonError
Error converting a workflow history to or from JSON.
WorkflowListOptions
Options for listing workflows.
WorkflowListOptionsBuilder
Use builder syntax to set the inputs and finish with build().
WorkflowQueryOptions
Options for querying a workflow.
WorkflowQueryOptionsBuilder
Use builder syntax to set the inputs and finish with build().
WorkflowResultDetails
Details attached to a cancelled or terminated workflow result.
WorkflowSignalOptions
Options for sending a signal to a workflow.
WorkflowSignalOptionsBuilder
Use builder syntax to set the inputs and finish with build().
WorkflowStartOptions
Options for starting a workflow execution.
WorkflowStartOptionsBuilder
Use builder syntax to set the inputs and finish with build().
WorkflowStartSignal
A signal to send atomically when starting a workflow. Use with WorkflowStartOptions::start_signal to achieve signal-with-start behavior.
WorkflowStartSignalBuilder
Use builder syntax to set the inputs and finish with build().
WorkflowStartUpdateOptions
Options for starting an update without waiting for completion.
WorkflowStartUpdateOptionsBuilder
Use builder syntax to set the inputs and finish with build().
WorkflowTerminateOptions
Options for terminating a workflow.
WorkflowTerminateOptionsBuilder
Use builder syntax to set the inputs and finish with build().
WorkflowUpdateHandle
Handle to a workflow update that has been started but may not be complete.

Enums§

ActivityExecutionStatus
Execution status of an activity. See ActivityExecutionInfoLike::status.
ActivityIdConflictPolicy
Specifies behavior when starting a standalone activity if there’s a running activity with the same ID. See ActivityStartOptions::id_conflict_policy.
ActivityIdReusePolicy
Specifies behavior when starting a standalone activity if there’s a closed activity with the same ID. See ActivityStartOptions::id_reuse_policy.
ActivityIdentifier
Identifies an async activity for completion outside a worker.
GrpcCompression
Selects the transport-level compression used for gRPC calls. See ConnectionOptions::grpc_compression.
Namespace
Enum to help reference a namespace by either the namespace name or the namespace id
PendingActivityState
Detailed state of an activity with ActivityExecutionStatus::Running. See ActivityExecutionDescription::run_state.
RpcMetadataError
An invalid key or value supplied to RpcMetadata.
WorkflowExecutionResult
Enumerates terminal states for a particular workflow execution
WorkflowExecutionStatus
The lifecycle status of a workflow execution.

Statics§

LONG_REQUEST_LATENCY_HISTOGRAM_NAME
The string name (which may be prefixed) for this metric
REQUEST_LATENCY_HISTOGRAM_NAME
The string name (which may be prefixed) for this metric

Traits§

ActivityExecutionInfoLike
Common methods of ActivityExecutionInfo and ActivityExecutionDescription.
NamespacedClient
A client that is bound to a namespace

Type Aliases§

UntypedWorkflowHandle
A workflow handle to a workflow with unknown types. Uses single argument raw payloads for input and output.