pub struct WorkerStatus {
pub id: WorkerId,
pub address: String,
pub capabilities: Capabilities,
pub load: Option<LoadMetrics>,
pub active_plans: Vec<String>,
pub last_heartbeat: DateTime<Utc>,
pub connected: bool,
}Expand description
Status of a registered worker.
Fields§
§id: WorkerIdThe worker’s unique id, as it registered itself.
address: StringWhere clients reach the worker (e.g. ws://host:8080). The
coordinator hands this out on /submit and steps aside — the
plan and its tensor payloads travel client→worker direct, never
through the coordinator.
capabilities: CapabilitiesWhat the worker offers: CPUs, RAM, GPUs, Python envs, tags.
Placement matches required tags against these via
matches_tags.
load: Option<LoadMetrics>Load reported with the latest heartbeat; None until the first
one arrives after registration.
active_plans: Vec<String>The plans currently leased to this worker. /submit takes a
lease (WorkerRegistry::claim), /complete releases it
(WorkerRegistry::release) — this list is what makes
has_capacity and the least-loaded
tie-break mean anything.
last_heartbeat: DateTime<Utc>When the worker last beat (workers beat every 10s). What
is_alive and the reaper compare against.
connected: boolFalse after an explicit WorkerRegistry::disconnect;
re-registering sets it back. A disconnected worker is never
alive, however fresh its heartbeat.
Implementations§
Source§impl WorkerStatus
impl WorkerStatus
Trait Implementations§
Source§impl Clone for WorkerStatus
impl Clone for WorkerStatus
Source§fn clone(&self) -> WorkerStatus
fn clone(&self) -> WorkerStatus
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for WorkerStatus
impl Debug for WorkerStatus
Source§impl<'de> Deserialize<'de> for WorkerStatus
impl<'de> Deserialize<'de> for WorkerStatus
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>,
Auto Trait Implementations§
impl Freeze for WorkerStatus
impl RefUnwindSafe for WorkerStatus
impl Send for WorkerStatus
impl Sync for WorkerStatus
impl Unpin for WorkerStatus
impl UnsafeUnpin for WorkerStatus
impl UnwindSafe for WorkerStatus
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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