Crate squads_temporal_sdk_core

Crate squads_temporal_sdk_core 

Source
Expand description

This crate provides a basis for creating new Temporal SDKs without completely starting from scratch

Re-exports§

pub use temporal_sdk_core_api as api;
pub use temporal_sdk_core_protos as protos;

Modules§

replay
This module implements support for creating special core instances and workers which can be used to replay canned histories. It should be used by Lang SDKs to provide replay capabilities to users during testing.
telemetry
This module helps with the initialization and management of telemetry. IE: Metrics and tracing. Logs from core are all traces, which may be exported to the console, in memory, or externally.

Structs§

Client
Contains an instance of a namespace-bound client for interacting with the Temporal server
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.
CoreRuntime
Holds shared state/components needed to back instances of workers and clients. More than one may be instantiated, but typically only one is needed. More than one runtime instance may be useful if multiple different telemetry settings are required.
FixedSizeSlotSupplier
Implements SlotSupplier with a fixed number of slots
PollActivityOptions
Expose WorkerClient symbols Additional options specific to activity task polling
PollOptions
Expose WorkerClient symbols Configuration options shared by workflow, activity, and Nexus polling calls
PollWorkflowOptions
Expose WorkerClient symbols Additional options specific to workflow task polling
RealSysInfo
Implements [SystemResourceInfo] using the sysinfo crate
ResourceBasedSlotsOptions
Allows for the full customization of the PID options for a resource based tuner
ResourceBasedSlotsOptionsBuilder
Builder for ResourceBasedSlotsOptions.
ResourceBasedTuner
Implements WorkerTuner and attempts to maintain certain levels of resource usage when under load.
ResourceSlotOptions
Options for a specific slot type
RetryClient
A wrapper for a [WorkflowClientTrait] or crate::WorkflowService implementor which performs auto-retries
RetryConfig
Configuration for retrying requests to the server
TaskToken
Type-safe wrapper for task token bytes
TlsConfig
Configuration options for TLS
TokioRuntimeBuilder
Wraps a tokio::runtime::Builder to allow layering multiple on_thread_start functions
TunerBuilder
Can be used to construct a TunerHolder from individual slot suppliers. Any supplier which is not provided will default to a FixedSizeSlotSupplier with a capacity of 100.
TunerHolder
Allows for the composition of different slot suppliers into a WorkerTuner
TunerHolderOptions
Can be used to construct a TunerHolder without needing to manually construct each SlotSupplier. Useful for lang bridges to allow more easily passing through user options.
TunerHolderOptionsBuilder
Builder for TunerHolderOptions.
Url
A parsed URL record.
Worker
A worker polls on a certain task queue
WorkerConfig
Defines per-worker configuration options
WorkerConfigBuilder
Builder for WorkerConfig.
WorkflowTaskCompletion
Expose WorkerClient symbols A version of RespondWorkflowTaskCompletedRequest that will finish being filled out by the server client

Enums§

SlotSupplierOptions
Options for known kinds of slot suppliers

Traits§

WorkerClient
Expose WorkerClient symbols This trait contains everything workers need to interact with Temporal, and hence provides a minimal mocking surface. Delegates to [WorkflowClientTrait] so see that for details.
WorkflowClientTrait
This trait provides higher-level friendlier interaction with the server. See the WorkflowService trait for a lower-level client.

Functions§

init_replay_worker
Create a worker for replaying one or more existing histories. It will auto-shutdown as soon as all histories have finished being replayed.
init_worker
Initialize a worker bound to a task queue.