pub struct TargetReq {
pub capacity: Option<String>,
pub host: Option<String>,
pub kind: Option<String>,
pub label: Option<String>,
pub metrics: Option<Box<Metrics>>,
pub spec: Option<Box<Spec>>,
pub status: Option<String>,
}Fields§
§capacity: Option<String>Capacity is a human summary of the machine’s size, up to 256 characters. Prose only; a scheduler reads Spec.
host: Option<String>Host is the hostname sessions on this machine will report. It is what makes a re-link IDEMPOTENT: the same (org, host, owner) refreshes the existing row and answers 200, while a request with no host always creates a new target and answers 201. It never adopts a row owned by somebody else.
kind: Option<String>Kind is laptop | cloud | gpu | cluster | machine. Empty registers a machine; anything outside the five is a 400.
label: Option<String>Label is the name to show for this machine, up to 128 characters. REQUIRED — it is the only field here a person reads.
metrics: Option<Box<Metrics>>Metrics is a live sample, and sending one IS A HEARTBEAT: it refreshes the row and starts the 90-second liveness window, and it is appended to the fleet series as one point. Its own at is ignored — the server stamps the time, so a client can never age or backdate its own machine. Omit it to register a machine without claiming it is alive.
spec: Option<Box<Spec>>Spec is the machine’s static capability — os, arch, cores, RAM, accelerators. Every field is bounded on write and at most 32 accelerators are accepted, so what comes back may be clamped. Omit it for a destination nothing probes.
status: Option<String>Status is online | offline | draining. Empty registers online. It states INTENT — a heartbeat is what decides whether an online machine is actually reachable, so declaring online does not make it so.