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
- 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.
- Core
Runtime - 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.
- Fixed
Size Slot Supplier - Implements SlotSupplier with a fixed number of slots
- Poll
Activity Options - Expose WorkerClient symbols Additional options specific to activity task polling
- Poll
Options - Expose WorkerClient symbols Configuration options shared by workflow, activity, and Nexus polling calls
- Poll
Workflow Options - Expose WorkerClient symbols Additional options specific to workflow task polling
- Real
SysInfo - Implements [SystemResourceInfo] using the sysinfo crate
- Resource
Based Slots Options - Allows for the full customization of the PID options for a resource based tuner
- Resource
Based Slots Options Builder - Builder for
ResourceBasedSlotsOptions
. - Resource
Based Tuner - Implements WorkerTuner and attempts to maintain certain levels of resource usage when under load.
- Resource
Slot Options - Options for a specific slot type
- Retry
Client - A wrapper for a [WorkflowClientTrait] or crate::WorkflowService implementor which performs auto-retries
- Retry
Config - Configuration for retrying requests to the server
- Task
Token - Type-safe wrapper for task token bytes
- TlsConfig
- Configuration options for TLS
- Tokio
Runtime Builder - Wraps a tokio::runtime::Builder to allow layering multiple on_thread_start functions
- Tuner
Builder - 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. - Tuner
Holder - Allows for the composition of different slot suppliers into a WorkerTuner
- Tuner
Holder Options - 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.
- Tuner
Holder Options Builder - Builder for
TunerHolderOptions
. - Url
- A parsed URL record.
- Worker
- A worker polls on a certain task queue
- Worker
Config - Defines per-worker configuration options
- Worker
Config Builder - Builder for
WorkerConfig
. - Workflow
Task Completion - Expose WorkerClient symbols A version of RespondWorkflowTaskCompletedRequest that will finish being filled out by the server client
Enums§
- Slot
Supplier Options - Options for known kinds of slot suppliers
Traits§
- Worker
Client - 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.
- Workflow
Client Trait - 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.