pub struct TargetView {Show 13 fields
pub capacity: Option<String>,
pub created_at: Option<String>,
pub host: Option<String>,
pub id: Option<String>,
pub kind: Option<String>,
pub label: Option<String>,
pub metrics: Option<Box<Metrics>>,
pub metrics_at: Option<String>,
pub running: Option<i32>,
pub sessions: Option<i32>,
pub spec: Option<Box<Spec>>,
pub status: Option<String>,
pub updated_at: Option<String>,
}Fields§
§capacity: Option<String>Capacity is a human summary of what the machine has ("8 vCPU / 32G", "1× GB10"), up to 256 characters. Prose for a card — Spec is the same thing in a form a scheduler can read, and nothing derives one from the other.
created_at: Option<String>CreatedAt is when the machine was first registered, RFC 3339 in UTC. A re-link refreshes the row and leaves this alone, so it dates the machine and not the connection.
host: Option<String>Host is the hostname sessions on this machine report, and it is a JOIN KEY, not a label: a session naming this host counts against the load below even when it names no target id, and a re-link of the same (org, host, owner) refreshes this row instead of creating a second. Empty means the machine is addressable only by ID.
id: Option<String>ID is the machine’s handle, minted as "tgt_" + 32 hex characters. It is what a session records to say it ran here, and what every later patch, claim or delete addresses.
kind: Option<String>Kind is what sort of destination this is, from a closed five: laptop | cloud | gpu | cluster | machine. A register that named none is a machine.
label: Option<String>Label is the name a person gave the machine ("workshop"), up to 128 characters. Required at register, free text, and the only field here meant for reading rather than matching.
metrics: Option<Box<Metrics>>Metrics is what the machine was DOING at its last heartbeat — loadavg, memory, accelerator utilization. Absent when it has never beaten. It is a SNAPSHOT: the series over time lives in the fleet samples, not here.
metrics_at: Option<String>MetricsAt is when that heartbeat was recorded, RFC 3339 in UTC, and the SERVER stamps it — a client cannot backdate or forge the staleness clock. Absent means never beaten, which is exactly the case where Status is taken at its word.
running: Option<i32>Running is how many of those are in running right now — the number a dispatcher weighs against Capacity. paused sessions are in Sessions and not here.
sessions: Option<i32>Sessions is how many of the org’s sessions are mapped to this machine, by target id OR by matching Host. All of them, whatever their status.
spec: Option<Box<Spec>>Spec is what the machine IS — os, arch, cores, RAM, accelerators — the static half, changed only when something reports it again. Absent when nothing has ever been reported, and a scheduler reads absence as "cannot satisfy a floor" rather than as "no limits".
status: Option<String>Status is the EFFECTIVE liveness — online | offline | draining — not the stored one. offline and draining are operator INTENT and are reported as they stand; online is checked against the heartbeat, and a machine that has beaten before but not in the last 90 seconds reports offline whatever its row says. A target that has NEVER beaten keeps its stored status, because a hand-registered destination has no fact to check.
updated_at: Option<String>UpdatedAt is the last write to the row, same format — which for a beating machine is its last heartbeat, since a heartbeat IS a write.
Implementations§
Source§impl TargetView
impl TargetView
pub fn new() -> TargetView
Trait Implementations§
Source§impl Clone for TargetView
impl Clone for TargetView
Source§fn clone(&self) -> TargetView
fn clone(&self) -> TargetView
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more