pub trait WorkerTuner {
// Required methods
fn workflow_task_slot_supplier(
&self,
) -> Arc<dyn SlotSupplier<SlotKind = WorkflowSlotKind> + Sync + Send> ⓘ;
fn activity_task_slot_supplier(
&self,
) -> Arc<dyn SlotSupplier<SlotKind = ActivitySlotKind> + Sync + Send> ⓘ;
fn local_activity_slot_supplier(
&self,
) -> Arc<dyn SlotSupplier<SlotKind = LocalActivitySlotKind> + Sync + Send> ⓘ;
fn nexus_task_slot_supplier(
&self,
) -> Arc<dyn SlotSupplier<SlotKind = NexusSlotKind> + Sync + Send> ⓘ;
}Expand description
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.
Required Methods§
Sourcefn workflow_task_slot_supplier(
&self,
) -> Arc<dyn SlotSupplier<SlotKind = WorkflowSlotKind> + Sync + Send> ⓘ
fn workflow_task_slot_supplier( &self, ) -> Arc<dyn SlotSupplier<SlotKind = WorkflowSlotKind> + Sync + Send> ⓘ
Return a SlotSupplier for workflow tasks. Note that workflow task slot suppliers must be willing to hand out a minimum of one non-sticky slot and one sticky slot if workflow caching is enabled, otherwise the worker may fail to process new tasks.
Sourcefn activity_task_slot_supplier(
&self,
) -> Arc<dyn SlotSupplier<SlotKind = ActivitySlotKind> + Sync + Send> ⓘ
fn activity_task_slot_supplier( &self, ) -> Arc<dyn SlotSupplier<SlotKind = ActivitySlotKind> + Sync + Send> ⓘ
Return a SlotSupplier for activity tasks
Sourcefn local_activity_slot_supplier(
&self,
) -> Arc<dyn SlotSupplier<SlotKind = LocalActivitySlotKind> + Sync + Send> ⓘ
fn local_activity_slot_supplier( &self, ) -> Arc<dyn SlotSupplier<SlotKind = LocalActivitySlotKind> + Sync + Send> ⓘ
Return a SlotSupplier for local activities
Sourcefn nexus_task_slot_supplier(
&self,
) -> Arc<dyn SlotSupplier<SlotKind = NexusSlotKind> + Sync + Send> ⓘ
fn nexus_task_slot_supplier( &self, ) -> Arc<dyn SlotSupplier<SlotKind = NexusSlotKind> + Sync + Send> ⓘ
Return a SlotSupplier for nexus tasks
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".