TargetView class

Constructors

TargetView({String? capacity, String? createdAt, String? host, String? id, String? kind, String? label, Metrics? metrics, String? metricsAt, int? running, int? sessions, Spec? spec, String? status, String? updatedAt})
Returns a new TargetView instance.

Properties

capacity ↔ 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.
getter/setter pair
createdAt ↔ 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.
getter/setter pair
hashCode → int
The hash code for this object.
no setteroverride
host ↔ 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.
getter/setter pair
id ↔ 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.
getter/setter pair
kind ↔ 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.
getter/setter pair
label ↔ 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.
getter/setter pair
metrics ↔ 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.
getter/setter pair
metricsAt ↔ 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.
getter/setter pair
running ↔ int?
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.
getter/setter pair
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
sessions ↔ int?
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.
getter/setter pair
spec ↔ 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".
getter/setter pair
status ↔ 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.
getter/setter pair
updatedAt ↔ 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.
getter/setter pair

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() → Map<String, dynamic>
toString() → String
A string representation of this object.
override

Operators

operator ==(Object other) → bool
The equality operator.
override

Static Methods

fromJson(dynamic value) → TargetView?
Returns a new TargetView instance and imports its values from value if it's a Map, null otherwise.
listFromJson(dynamic json, {bool growable = false}) → List<TargetView>
mapFromJson(dynamic json) → Map<String, TargetView>
mapListFromJson(dynamic json, {bool growable = false}) → Map<String, List<TargetView>>

Constants

requiredKeys → const Set<String>
The list of required keys that must be present in a JSON.