Crate squads_temporal_client

Crate squads_temporal_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 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.

Structs§

Client
Contains an instance of a namespace-bound client for interacting with the Temporal server
ClientKeepAliveConfig
Client keep alive configuration.
ClientOptions
Options for the connection to the temporal server. Construct with ClientOptionsBuilder
ClientOptionsBuilder
Builder for ClientOptions.
ClientTlsConfig
If using mTLS, both the client cert and private key must be specified, this contains them.
ConfiguredClient
A client with ClientOptions attached, which can be passed to initialize workers, or can be used directly. Is cheap to clone.
GetWorkflowResultOpts
Options for fetching workflow results
HttpConnectProxyOptions
Options for HTTP CONNECT proxy.
IsWorkerTaskLongPoll
A request extension that, when set, should make the RetryClient consider this call to be a [CallType::TaskLongPoll]
NoRetryOnMatching
A request extension that, when set, and a call is being processed by a RetryClient, allows the caller to request certain matching errors to short-circuit-return immediately and not follow normal retry logic.
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
Builder for RegisterNamespaceOptions.
RetryClient
A wrapper for a [WorkflowClientTrait] or crate::WorkflowService implementor which performs auto-retries
RetryConfig
Configuration for retrying requests to the server
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.
SignalWithStartOptions
Helper struct for signal_with_start_workflow_execution.
SignalWithStartOptionsBuilder
Builder for SignalWithStartOptions.
SlotManager
Enables local workers to make themselves visible to a shared client instance. There can only be one worker registered per namespace+queue_name+client, others will get ignored. It also provides a convenient method to find compatible slots within the collection.
StartTimeFilter
StatusFilter
TemporalServiceClient
Aggregates various services exposed by the Temporal server
TlsConfig
Configuration options for TLS
WorkerKey
Registration key for a worker
WorkflowExecutionFilter
WorkflowExecutionInfo
Holds needed information to refer to a specific workflow run, or workflow execution chain
WorkflowHandle
A workflow handle which can refer to a specific workflow run, or a chain of workflow runs with the same workflow id.
WorkflowOptions
Optional fields supplied at the start of workflow execution
WorkflowTypeFilter

Enums§

ArchivalState
ClientInitError
Errors thrown while attempting to establish a connection to the server
ClientOptionsBuilderError
Error type for ClientOptionsBuilder
InvalidHeaderError
Errors thrown when a gRPC metadata header is invalid.
ListClosedFilters
ListOpenFilters
Namespace
Enum to help reference a namespace by either the namespace name or the namespace id
RegisterNamespaceOptionsBuilderError
Error type for RegisterNamespaceOptionsBuilder
SignalWithStartOptionsBuilderError
Error type for SignalWithStartOptionsBuilder
WorkflowExecutionResult
Enumerates terminal states for a particular workflow execution

Constants§

DEFAULT_WORKFLOW_EXECUTION_RETENTION_PERIOD
Default workflow execution retention for a Namespace is 3 days
RETRYABLE_ERROR_CODES
List of gRPC error codes that client will retry.

Statics§

ERROR_RETURNED_DUE_TO_SHORT_CIRCUIT
Key used to indicate a error was returned by the retryer because of the short-circuit predicate
LONG_REQUEST_LATENCY_HISTOGRAM_NAME
The string name (which may be prefixed) for this metric
MESSAGE_TOO_LARGE_KEY
Key used to communicate when a GRPC message is too large
REQUEST_LATENCY_HISTOGRAM_NAME
The string name (which may be prefixed) for this metric

Traits§

CloudService
Trait version of the generated client with modifications to attach appropriate metric labels or whatever else to requests
HealthService
Trait version of the generated client with modifications to attach appropriate metric labels or whatever else to requests
NamespacedClient
A client that is bound to a namespace
OperatorService
Trait version of the generated client with modifications to attach appropriate metric labels or whatever else to requests
Slot
This trait represents a slot reserved for processing a WFT by a worker.
SlotProvider
This trait is implemented by an object associated with a worker, which provides WFT processing slots.
TestService
Trait version of the generated client with modifications to attach appropriate metric labels or whatever else to requests
WfClientExt
Additional methods for workflow clients
WorkflowClientTrait
This trait provides higher-level friendlier interaction with the server. See the WorkflowService trait for a lower-level client.
WorkflowService
Trait version of the generated client with modifications to attach appropriate metric labels or whatever else to requests

Type Aliases§

OperatorServiceClientWithMetrics
An OperatorServiceClient with the default interceptors attached.
TemporalServiceClientWithMetrics
A TemporalServiceClient with the default interceptors attached.
TestServiceClientWithMetrics
An TestServiceClient with the default interceptors attached.
WorkflowServiceClientWithMetrics
A WorkflowServiceClient with the default interceptors attached.