pub struct InfraPolicy {
pub max_signal_age_ms: u64,
pub min_waiting_requests: u64,
pub max_capable_inflight: u64,
}Expand description
Queue and capacity limits for moving requests to the capable model.
Fields§
§max_signal_age_ms: u64Maximum age of the pool observation.
min_waiting_requests: u64Every efficient worker must have at least this many waiting requests.
max_capable_inflight: u64Stop moving requests when observed running or locally tracked capable work reaches this limit.
Implementations§
Source§impl InfraPolicy
impl InfraPolicy
Sourcepub fn apply(
&self,
outcome: &mut RoutingOutcome,
models: &RuntimeModels,
signals: &InfraSignals,
) -> Result<bool>
pub fn apply( &self, outcome: &mut RoutingOutcome, models: &RuntimeModels, signals: &InfraSignals, ) -> Result<bool>
Adjust a decision-only task result. Returns true only when the model changes.
Hosts must serialize this check with their local in-flight increment, then decrement when the response ends or is cancelled. Worker selection remains in the serving layer.
Trait Implementations§
Source§impl Clone for InfraPolicy
impl Clone for InfraPolicy
Source§fn clone(&self) -> InfraPolicy
fn clone(&self) -> InfraPolicy
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 InfraPolicy
impl Debug for InfraPolicy
Source§impl<'de> Deserialize<'de> for InfraPolicy
impl<'de> Deserialize<'de> for InfraPolicy
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for InfraPolicy
impl RefUnwindSafe for InfraPolicy
impl Send for InfraPolicy
impl Sync for InfraPolicy
impl Unpin for InfraPolicy
impl UnsafeUnpin for InfraPolicy
impl UnwindSafe for InfraPolicy
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