pub struct DurableProcessWorkerConfig {
pub plugin_host: Arc<PluginHost>,
pub runtime_host: RuntimeHostConfig,
pub session_policy: SessionPolicy,
pub session_store_factory: Arc<dyn SessionStoreFactory>,
pub process_registry: Arc<dyn ProcessRegistry>,
pub process_change_hub: Option<ProcessChangeHub>,
pub trigger_store: Arc<dyn TriggerStore>,
pub process_work_driver: Option<ProcessWorkDriver>,
pub queued_work_driver: Option<QueuedWorkDriver>,
pub residency: Residency,
pub lease_owner: LeaseOwnerIdentity,
/* private fields */
}Expand description
Deployment-local configuration for rebuilding durable process executions.
Process rows intentionally carry only portable process input and provenance. Workers provide plugins, providers, stores, secrets, and host capabilities for the deployment that owns those rows.
Fields§
§plugin_host: Arc<PluginHost>§runtime_host: RuntimeHostConfig§session_policy: SessionPolicy§session_store_factory: Arc<dyn SessionStoreFactory>§process_registry: Arc<dyn ProcessRegistry>§process_change_hub: Option<ProcessChangeHub>§trigger_store: Arc<dyn TriggerStore>§process_work_driver: Option<ProcessWorkDriver>§queued_work_driver: Option<QueuedWorkDriver>§residency: ResidencyResidency for sessions the worker rebuilds to run a process. Defaults to
[Residency::KeepAll]; a host running [Residency::ActivePathOnly] wires
it here so the worker’s rebuilt sessions trim to the active path too,
instead of silently diverging from the live runtime by keeping the full
graph resident.
lease_owner: LeaseOwnerIdentityOwner identity stem this worker derives per-recovery lease owners from.
Each recovery attempt claims with a unique (owner_id, incarnation_id)
derived from this identity — a live lease held by an earlier attempt
must fence a later sweep pass rather than be re-entered as the same
incarnation — while the liveness metadata is inherited as-is. Defaults
to a fresh opaque identity per config. Hosts that run one worker per OS
process should wire a
LeaseOwnerIdentity::local_process
identity so peers on the same host can prove a crashed worker dead and
reclaim its process leases before the TTL — mirroring the session
execution lane’s runtime lease owner.
Implementations§
Source§impl DurableProcessWorkerConfig
impl DurableProcessWorkerConfig
pub fn new( plugin_host: Arc<PluginHost>, runtime_host: RuntimeHostConfig, session_store_factory: Arc<dyn SessionStoreFactory>, process_registry: Arc<dyn ProcessRegistry>, ) -> DurableProcessWorkerConfig
pub fn with_trigger_store( self, store: Arc<dyn TriggerStore>, ) -> DurableProcessWorkerConfig
pub fn with_session_policy( self, policy: SessionPolicy, ) -> DurableProcessWorkerConfig
pub fn with_residency(self, residency: Residency) -> DurableProcessWorkerConfig
pub fn with_process_work_driver( self, driver: ProcessWorkDriver, ) -> DurableProcessWorkerConfig
pub fn with_change_hub( self, hub: ProcessChangeHub, ) -> DurableProcessWorkerConfig
Sourcepub fn with_lease_owner(
self,
lease_owner: LeaseOwnerIdentity,
) -> DurableProcessWorkerConfig
pub fn with_lease_owner( self, lease_owner: LeaseOwnerIdentity, ) -> DurableProcessWorkerConfig
Set the owner identity this worker presents when claiming process
leases. See DurableProcessWorkerConfig::lease_owner.
pub fn with_queued_work_driver( self, driver: QueuedWorkDriver, ) -> DurableProcessWorkerConfig
pub fn from_plugin_factories( plugin_factories: impl IntoIterator<Item = Arc<dyn PluginFactory>>, runtime_host: RuntimeHostConfig, session_store_factory: Arc<dyn SessionStoreFactory>, process_registry: Arc<dyn ProcessRegistry>, ) -> DurableProcessWorkerConfig
pub fn from_plugin_stack( plugin_stack: PluginStack, runtime_host: RuntimeHostConfig, session_store_factory: Arc<dyn SessionStoreFactory>, process_registry: Arc<dyn ProcessRegistry>, ) -> DurableProcessWorkerConfig
Trait Implementations§
Source§impl Clone for DurableProcessWorkerConfig
impl Clone for DurableProcessWorkerConfig
Source§fn clone(&self) -> DurableProcessWorkerConfig
fn clone(&self) -> DurableProcessWorkerConfig
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more