FleetUnit class

Constructors

FleetUnit({String? host, String? kind, String? label, FleetMetrics? metrics, int? queued, int? running, int? sessions, String? source_, FleetSpec? spec, String? status, String? unit})
Returns a new FleetUnit instance.

Properties

hashCode → int
The hash code for this object.
no setteroverride
host ↔ String?
Host is the unit's hostname. Empty for a unit that is not one host: a cluster row has no hostname to report.
getter/setter pair
kind ↔ String?
Kind is what the unit IS: laptop, cloud, gpu, cluster, machine or worker.
getter/setter pair
label ↔ String?
Label is the name to show a human — a target's label, a worker's hostname, a machine's display name. Empty when the source has none to give.
getter/setter pair
metrics ↔ FleetMetrics?
Metrics is the unit's latest utilization: its own live snapshot when it keeps one (a run-target's heartbeat wins), else the newest sample from the series for the SAME source. Absent means nothing is known about this unit's load — which is deliberately not the same as a reading of zero.
getter/setter pair
queued ↔ int?
Queued is how many renders are waiting on THIS GPU's own lane in the org's gpu-jobs queue. BYO units only — an agent run-target dispatches, it does not queue — and omitted when nothing is waiting.
getter/setter pair
running ↔ int?
Running is what the unit is executing right now: agent sessions in flight for a run-target, claimed renders for a BYO GPU.
getter/setter pair
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
sessions ↔ int?
Sessions is how many agent sessions are open on this unit. Always present, and 0 for a source that cannot host agent sessions at all — a fact about that plane, not a gap in the reading.
getter/setter pair
source_ ↔ String?
Source is the plane this row came from: "agent" (a linked run-target), "byo" (a worker or cluster the org dialed in) or "visor" (a machine Hanzo provisioned). It is half the row's identity, and it says which face owns the unit — /v1/agents/targets, /v1/visor/fleet/workers, /v1/visor/machines.
getter/setter pair
spec ↔ FleetSpec?
Spec is the unit's static capability. Absent when the source reported none — unknown capability, never a zeroed one.
getter/setter pair
status ↔ String?
Status is liveness in the SOURCE's own vocabulary, because each plane decides it differently: a run-target's is derived from its heartbeat, a BYO worker's is online/offline on the 90s window, a BYO cluster's is "attached", and a Visor machine's is the provider's word for its lifecycle state.
getter/setter pair
unit ↔ String?
Unit is the SOURCE's own id for this unit — a run-target id, a BYO worker id, a Visor machine name — so a row links straight back to the face that owns it. It is unique within a source, not across them: two planes may mint the same id, which is why (source, unit) together is the identity.
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) → FleetUnit?
Returns a new FleetUnit instance and imports its values from value if it's a Map, null otherwise.
listFromJson(dynamic json, {bool growable = false}) → List<FleetUnit>
mapFromJson(dynamic json) → Map<String, FleetUnit>
mapListFromJson(dynamic json, {bool growable = false}) → Map<String, List<FleetUnit>>

Constants

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