pub enum ModelFilterState {
Live,
Coming,
Leaving,
Absent,
}Expand description
Liveness state of a model on internal (self-hosted) infrastructure, as
published by the controller into the model_filters append-only event log.
model_filters is an event log, not a current-state table: the CURRENT
state of a model is the latest event for it. An Absent event is an
explicit tombstone (the controller retracted the model); a model with no events at
all is also treated as absent. The daemon treats absence as “claim now,
route to OpenRouter”.
Variants§
Live
Internal infrastructure is serving this model now.
Coming
Internal infrastructure will serve this model soon; expected_ready_at
carries the ETA.
Leaving
The controller is draining this model: it has decided to scale the model to
zero, but the workers are still up finishing their in-flight requests (so it
stays listed in the gateway’s /v1/models). Distinguished from Absent so
observers and the controller can tell “scaling down, still serving” from
“gone”, but treated identically to Coming/Absent by the claim gate
(not-live → no new full-capacity claims).
Absent
Explicit tombstone: the controller is no longer deploying this model.
Appended (instead of deleting rows) to retract a model from the log. Treated
by the claim gate as NOT-LIVE — the same leaky-bucket + deadline-ramp path as
Coming/Leaving. NOTE: this is not the same as a model with no events
at all: the gate claims a no-events model at full capacity (it is unmanaged
— mf.state IS NULL), whereas an Absent model is explicitly held not-live.
Implementations§
Source§impl ModelFilterState
impl ModelFilterState
Sourcepub fn parse_state(s: &str) -> Option<ModelFilterState>
pub fn parse_state(s: &str) -> Option<ModelFilterState>
Parse the textual model_filters.state value.
Trait Implementations§
Source§impl Clone for ModelFilterState
impl Clone for ModelFilterState
Source§fn clone(&self) -> ModelFilterState
fn clone(&self) -> ModelFilterState
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for ModelFilterState
Source§impl Debug for ModelFilterState
impl Debug for ModelFilterState
Source§impl<'de> Deserialize<'de> for ModelFilterState
impl<'de> Deserialize<'de> for ModelFilterState
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<ModelFilterState, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<ModelFilterState, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
impl Eq for ModelFilterState
Source§impl PartialEq for ModelFilterState
impl PartialEq for ModelFilterState
Source§impl Serialize for ModelFilterState
impl Serialize for ModelFilterState
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
impl StructuralPartialEq for ModelFilterState
Auto Trait Implementations§
impl Freeze for ModelFilterState
impl RefUnwindSafe for ModelFilterState
impl Send for ModelFilterState
impl Sync for ModelFilterState
impl Unpin for ModelFilterState
impl UnsafeUnpin for ModelFilterState
impl UnwindSafe for ModelFilterState
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
Source§fn with_current_context(self) -> WithContext<Self> ⓘ
fn with_current_context(self) -> WithContext<Self> ⓘ
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more