TargetReq class

Constructors

TargetReq({String? capacity, String? host, String? kind, String? label, Metrics? metrics, Spec? spec, String? status})
Returns a new TargetReq instance.

Properties

capacity ↔ String?
Capacity is a human summary of the machine's size, up to 256 characters. Prose only; a scheduler reads Spec.
getter/setter pair
hashCode → int
The hash code for this object.
no setteroverride
host ↔ 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.
getter/setter pair
kind ↔ String?
Kind is laptop | cloud | gpu | cluster | machine. Empty registers a machine; anything outside the five is a 400.
getter/setter pair
label ↔ String?
Label is the name to show for this machine, up to 128 characters. REQUIRED — it is the only field here a person reads.
getter/setter pair
metrics ↔ 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.
getter/setter pair
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
spec ↔ 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.
getter/setter pair
status ↔ 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.
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) → TargetReq?
Returns a new TargetReq instance and imports its values from value if it's a Map, null otherwise.
listFromJson(dynamic json, {bool growable = false}) → List<TargetReq>
mapFromJson(dynamic json) → Map<String, TargetReq>
mapListFromJson(dynamic json, {bool growable = false}) → Map<String, List<TargetReq>>

Constants

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