Skip to main content

Crate temporalio_sdk_core

Crate temporalio_sdk_core 

Source
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§

ActivitySlotKind
Marker struct for activity slots.
Client
Contains an instance of a namespace-bound client for interacting with the Temporal server. Cheap to clone.
ClientOptions
Options for crate::Client::new.
ClientTlsOptions
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
LocalActivitySlotKind
Marker struct for local activity slots.
NamespaceCapabilities
Namespace capabilities discovered via describe_namespace during worker validation.
NexusSlotKind
Marker struct for nexus slots.
PollActivityOptions
Additional options specific to activity task polling
PollOptions
Configuration options shared by workflow, activity, and Nexus polling calls
PollWorkflowOptions
Additional options specific to workflow task polling
ResourceBasedSlotsOptions
Allows for the full customization of the PID options for a resource based tuner
ResourceBasedSlotsOptionsBuilder
Use builder syntax to set the inputs and finish with build().
ResourceBasedTuner
Implements crate::worker::WorkerTuner and attempts to maintain certain levels of resource usage when under load.
ResourceSlotOptions
Options for a specific slot type
RetryOptions
Configuration for retrying requests to the server
RuntimeOptions
Holds telemetry options, as well as worker heartbeat_interval. Construct with RuntimeOptions::builder
RuntimeOptionsBuilder
Use builder syntax to set the inputs and finish with build_internal().
SlotSupplierPermit
A permit issued by a SlotSupplier.
TaskToken
Type-safe wrapper for task token bytes
TlsOptions
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 crate::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
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
WorkerConfig
Defines per-worker configuration options
WorkerConfigBuilder
Use builder syntax to set the inputs and finish with build_internal().
WorkflowSlotKind
Marker struct for workflow slots.
WorkflowTaskCompletion
A version of RespondWorkflowTaskCompletedRequest that will finish being filled out by the server client

Enums§

CompleteActivityError
Errors thrown by crate::Worker::complete_activity_task
CompleteNexusError
Errors thrown by crate::Worker::complete_nexus_task
CompleteWfError
Errors thrown by crate::Worker::complete_workflow_activation
PollError
Errors thrown by crate::Worker polling methods
PollerBehavior
Different strategies for task polling
SlotInfo
Contextual information about in-use slots.
SlotKindType
What kind of task the slot is used for.
SlotSupplierOptions
Options for known kinds of slot suppliers
WorkerValidationError
Errors thrown by crate::Worker::validate
WorkerVersioningStrategy
Strategy a core worker uses for versioning.
WorkflowErrorType
Errors we can encounter during workflow processing which we may treat as either WFT failures or whole-workflow failures depending on user preference.

Traits§

SlotInfoTrait
Allows reifying slot info into the appropriate type.
SlotKind
Associates slot info/kinds together.
SlotMarkUsedContext
Context for slots being marked as used.
SlotReleaseContext
Context for slots being released.
SlotReservationContext
Context for slot reservation.
SlotSupplier
Implementing this trait allows users to customize how many tasks of certain kinds the worker will perform concurrently.
WorkerClient
This trait contains everything workers need to interact with Temporal, and hence provides a minimal mocking surface.
WorkerTuner
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.