Expand description
This crate provides a basis for creating new Temporal SDKs without completely starting from scratch. APIs provided by this crate are not considered stable and may break at any time.
If you are looking for the Temporal Rust SDK, please use temporalio-sdk.
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§
- Activity
Slot Kind - Marker struct for activity slots.
- Client
- Contains an instance of a namespace-bound client for interacting with the Temporal server. Cheap to clone.
- Client
Options - Options for crate::Client::new.
- Client
TlsOptions - 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
- Local
Activity Slot Kind - Marker struct for local activity slots.
- Namespace
Capabilities - Namespace capabilities discovered via
describe_namespaceduring worker validation. - Nexus
Slot Kind - Marker struct for nexus slots.
- Poll
Activity Options - Additional options specific to activity task polling
- Poll
Options - Configuration options shared by workflow, activity, and Nexus polling calls
- Poll
Workflow Options - Additional options specific to workflow task polling
- Resource
Based Slots Options - Allows for the full customization of the PID options for a resource based tuner
- Resource
Based Slots Options Builder - Use builder syntax to set the inputs and finish with
build(). - Resource
Based Tuner - Implements crate::worker::WorkerTuner and attempts to maintain certain levels of resource usage when under load.
- Resource
Slot Options - Options for a specific slot type
- Retry
Options - Configuration for retrying requests to the server
- Runtime
Options - Holds telemetry options, as well as worker heartbeat_interval. Construct with RuntimeOptions::builder
- Runtime
Options Builder - Use builder syntax to set the inputs and finish with
build_internal(). - Slot
Supplier Permit - A permit issued by a SlotSupplier.
- Task
Token - Type-safe wrapper for task token bytes
- TlsOptions
- 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
TunerHolderfrom 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 crate::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 - Use builder syntax to set the inputs and finish with
build_internal(). - Url
- A parsed URL record.
- Worker
- A worker polls on a certain task queue
- Worker
Config - Defines per-worker configuration options
- Worker
Config Builder - Use builder syntax to set the inputs and finish with
build_internal(). - Workflow
Slot Kind - Marker struct for workflow slots.
- Workflow
Task Completion - A version of RespondWorkflowTaskCompletedRequest that will finish being filled out by the server client
Enums§
- Complete
Activity Error - Errors thrown by crate::Worker::complete_activity_task
- Complete
Nexus Error - Errors thrown by crate::Worker::complete_nexus_task
- Complete
WfError - Errors thrown by crate::Worker::complete_workflow_activation
- Poll
Error - Errors thrown by crate::Worker polling methods
- Poller
Behavior - Different strategies for task polling
- Slot
Info - Contextual information about in-use slots.
- Slot
Kind Type - What kind of task the slot is used for.
- Slot
Supplier Options - Options for known kinds of slot suppliers
- Worker
Validation Error - Errors thrown by crate::Worker::validate
- Worker
Versioning Strategy - Strategy a core worker uses for versioning.
- Workflow
Error Type - Errors we can encounter during workflow processing which we may treat as either WFT failures or whole-workflow failures depending on user preference.
Traits§
- Slot
Info Trait - Allows reifying slot info into the appropriate type.
- Slot
Kind - Associates slot info/kinds together.
- Slot
Mark Used Context - Context for slots being marked as used.
- Slot
Release Context - Context for slots being released.
- Slot
Reservation Context - Context for slot reservation.
- Slot
Supplier - Implementing this trait allows users to customize how many tasks of certain kinds the worker will perform concurrently.
- Worker
Client - This trait contains everything workers need to interact with Temporal, and hence provides a minimal mocking surface.
- Worker
Tuner - This trait allows users to customize the performance characteristics of workers dynamically. For more, see the docstrings of the traits in the return types of its functions.
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.