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§
- Activity
Slot Kind - Marker struct for activity slots.
- Core
Worker - A worker polls on a certain task queue
- Fixed
Size Slot Supplier - Implements SlotSupplier with a fixed number of slots
- Local
Activity Slot Kind - Marker struct for local activity slots.
- Nexus
Slot Kind - Marker struct for nexus slots.
- 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
Controller - Coordinates resource-based slot decisions using a shared resource sampler and PID controllers.
- Resource
Slot Options - Options for a specific slot type
- 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.
- 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(). - 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.
Enums§
- Poller
Behavior - Different strategies for task polling
- Resource
Based Tuner Config - Selects whether a tuner holder creates a controller or uses an existing shared controller.
- 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
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
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.