Skip to main content

Module runtime

Module runtime 

Source
Expand description

Runtime configuration and low-level Core worker building blocks.

These types are grouped here to keep Core-specific configuration separate from the SDK’s primary workflow and activity APIs. Create a crate::Runtime before connecting a client, then pass it to crate::Worker::new.

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.

Structs§

ActivitySlotKind
Marker struct for activity slots.
CoreWorker
A worker polls on a certain task queue
FixedSizeSlotSupplier
Implements SlotSupplier with a fixed number of slots
LocalActivitySlotKind
Marker struct for local activity slots.
NexusSlotKind
Marker struct for nexus slots.
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.
ResourceController
Coordinates resource-based slot decisions using a shared resource sampler and PID controllers.
ResourceSlotOptions
Options for a specific slot type
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.
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().
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.

Enums§

PollerBehavior
Different strategies for task polling
ResourceBasedTunerConfig
Selects whether a tuner holder creates a controller or uses an existing shared controller.
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
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.
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.