pub struct WorkerRuntimeConfig {
pub embedding_endpoint: Option<String>,
pub ocr_endpoint: Option<String>,
pub vision_endpoint: Option<String>,
pub extractor_endpoint: Option<String>,
pub max_in_flight: usize,
pub silent_updates_enabled: bool,
}Expand description
External worker runtime configuration and deterministic fallback policy.
Fields§
§embedding_endpoint: Option<String>§ocr_endpoint: Option<String>§vision_endpoint: Option<String>§extractor_endpoint: Option<String>§max_in_flight: usize§silent_updates_enabled: boolImplementations§
Source§impl WorkerRuntimeConfig
impl WorkerRuntimeConfig
pub const DEFAULT_MAX_IN_FLIGHT: usize = 2
Sourcepub fn from_environment(
environment: &EnvironmentConfig,
) -> Result<Self, WorkerRuntimeConfigError>
pub fn from_environment( environment: &EnvironmentConfig, ) -> Result<Self, WorkerRuntimeConfigError>
Builds worker config from typed environment overrides.
Sourcepub fn endpoint_for(&self, kind: WorkerKind) -> Option<&str>
pub fn endpoint_for(&self, kind: WorkerKind) -> Option<&str>
Returns the configured endpoint for a worker kind.
Trait Implementations§
Source§impl Clone for WorkerRuntimeConfig
impl Clone for WorkerRuntimeConfig
Source§fn clone(&self) -> WorkerRuntimeConfig
fn clone(&self) -> WorkerRuntimeConfig
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for WorkerRuntimeConfig
impl Debug for WorkerRuntimeConfig
Source§impl PartialEq for WorkerRuntimeConfig
impl PartialEq for WorkerRuntimeConfig
Source§fn eq(&self, other: &WorkerRuntimeConfig) -> bool
fn eq(&self, other: &WorkerRuntimeConfig) -> bool
Tests for
self and other values to be equal, and is used by ==.impl Eq for WorkerRuntimeConfig
impl StructuralPartialEq for WorkerRuntimeConfig
Auto Trait Implementations§
impl Freeze for WorkerRuntimeConfig
impl RefUnwindSafe for WorkerRuntimeConfig
impl Send for WorkerRuntimeConfig
impl Sync for WorkerRuntimeConfig
impl Unpin for WorkerRuntimeConfig
impl UnsafeUnpin for WorkerRuntimeConfig
impl UnwindSafe for WorkerRuntimeConfig
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more