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
- Client
Keep Alive Config - Client keep alive configuration.
- Client
Options - Options for the connection to the temporal server. Construct with ClientOptionsBuilder
- Client
Options Builder - Builder for
ClientOptions
. - Client
TlsConfig - If using mTLS, both the client cert and private key must be specified, this contains them.
- Configured
Client - A client with ClientOptions attached, which can be passed to initialize workers, or can be used directly. Is cheap to clone.
- GetWorkflow
Result Opts - Options for fetching workflow results
- Http
Connect Proxy Options - Options for HTTP CONNECT proxy.
- IsWorker
Task Long Poll - A request extension that, when set, should make the RetryClient consider this call to be a [CallType::TaskLongPoll]
- NoRetry
OnMatching - 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.
- Register
Namespace Options - Helper struct for
register_namespace
. - Register
Namespace Options Builder - Builder for
RegisterNamespaceOptions
. - Retry
Client - A wrapper for a [WorkflowClientTrait] or crate::WorkflowService implementor which performs auto-retries
- Retry
Config - Configuration for retrying requests to the server
- Service
Call Interceptor - Interceptor which attaches common metadata (like “client-name”) to every outgoing call
- Shared
Replaceable Client - 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.
- Signal
With Start Options - Helper struct for
signal_with_start_workflow_execution
. - Signal
With Start Options Builder - Builder for
SignalWithStartOptions
. - Slot
Manager - 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.
- Start
Time Filter - Status
Filter - Temporal
Service Client - Aggregates various services exposed by the Temporal server
- TlsConfig
- Configuration options for TLS
- Worker
Key - Registration key for a worker
- Workflow
Execution Filter - Workflow
Execution Info - Holds needed information to refer to a specific workflow run, or workflow execution chain
- Workflow
Handle - A workflow handle which can refer to a specific workflow run, or a chain of workflow runs with the same workflow id.
- Workflow
Options - Optional fields supplied at the start of workflow execution
- Workflow
Type Filter
Enums§
- Archival
State - Client
Init Error - Errors thrown while attempting to establish a connection to the server
- Client
Options Builder Error - Error type for ClientOptionsBuilder
- Invalid
Header Error - Errors thrown when a gRPC metadata header is invalid.
- List
Closed Filters - List
Open Filters - Namespace
- Enum to help reference a namespace by either the namespace name or the namespace id
- Register
Namespace Options Builder Error - Error type for RegisterNamespaceOptionsBuilder
- Signal
With Start Options Builder Error - Error type for SignalWithStartOptionsBuilder
- Workflow
Execution Result - 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§
- Cloud
Service - Trait version of the generated client with modifications to attach appropriate metric labels or whatever else to requests
- Health
Service - Trait version of the generated client with modifications to attach appropriate metric labels or whatever else to requests
- Namespaced
Client - A client that is bound to a namespace
- Operator
Service - 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.
- Slot
Provider - This trait is implemented by an object associated with a worker, which provides WFT processing slots.
- Test
Service - Trait version of the generated client with modifications to attach appropriate metric labels or whatever else to requests
- WfClient
Ext - Additional methods for workflow clients
- Workflow
Client Trait - This trait provides higher-level friendlier interaction with the server. See the WorkflowService trait for a lower-level client.
- Workflow
Service - Trait version of the generated client with modifications to attach appropriate metric labels or whatever else to requests
Type Aliases§
- Operator
Service Client With Metrics - An OperatorServiceClient with the default interceptors attached.
- Temporal
Service Client With Metrics - A TemporalServiceClient with the default interceptors attached.
- Test
Service Client With Metrics - An TestServiceClient with the default interceptors attached.
- Workflow
Service Client With Metrics - A WorkflowServiceClient with the default interceptors attached.