pub struct RuntimeHostConfig {
pub durability: RuntimeDurabilityConfig,
pub process_engines: ProcessEngineRegistry,
pub providers: RuntimeProviderConfig,
pub prompt: RuntimePromptConfig,
pub control: RuntimeControlConfig,
pub tracing: RuntimeTracingConfig,
pub clock: Arc<dyn Clock>,
}Expand description
Required host configuration for all runtimes.
Fields§
§durability: RuntimeDurabilityConfig§process_engines: ProcessEngineRegistry§providers: RuntimeProviderConfig§prompt: RuntimePromptConfig§control: RuntimeControlConfig§tracing: RuntimeTracingConfig§clock: Arc<dyn Clock>Injected time source. Durable timestamps and timeout/backoff logic read
this rather than the OS clock directly, so replay is reproducible and
tests can drive time. Defaults to SystemClock.
Implementations§
Source§impl RuntimeHostConfig
impl RuntimeHostConfig
Sourcepub fn new(
effect_host: Arc<dyn EffectHost>,
attachment_store: Arc<dyn AttachmentStore>,
process_env_store: Arc<dyn ProcessExecutionEnvStore>,
) -> Self
pub fn new( effect_host: Arc<dyn EffectHost>, attachment_store: Arc<dyn AttachmentStore>, process_env_store: Arc<dyn ProcessExecutionEnvStore>, ) -> Self
Construct a config with the three host-owned dependencies named explicitly.
There is intentionally no Default. The effect host and stores decide
a runtime’s durability, so hosts must choose them rather than silently
inheriting in-memory implementations. Use RuntimeHostConfig::in_memory
to opt into the in-process / in-memory versions by name.
Sourcepub fn with_clock(self, clock: Arc<dyn Clock>) -> Self
pub fn with_clock(self, clock: Arc<dyn Clock>) -> Self
Replace the runtime time source. Hosts that need deterministic replay or
test-driven time inject their own Clock; the default is
SystemClock.
Sourcepub fn in_memory() -> Self
pub fn in_memory() -> Self
Explicit in-process / in-memory configuration: an
InlineEffectHost and in-memory stores.
Convenient for tests and local experiments; not durable. Named so the choice is never silent.
pub fn with_process_env_store( self, process_env_store: Arc<dyn ProcessExecutionEnvStore>, ) -> Self
pub fn with_process_cancel_ability( self, process_cancel_ability: Arc<dyn ProcessCancelAbility>, ) -> Self
pub fn with_process_engine(self, engine: Arc<dyn ProcessEngine>) -> Self
Trait Implementations§
Source§impl Clone for RuntimeHostConfig
impl Clone for RuntimeHostConfig
Source§fn clone(&self) -> RuntimeHostConfig
fn clone(&self) -> RuntimeHostConfig
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more