Files
zeekay 1df3ddf6bd Regenerate against the document the deployment answers for
The projection these were generated from predated the compute migration, so
they described /v1/visor — which the API serves at zero paths now.

No /v1/visor path survives here.
2026-09-05 18:55:38 -07:00

134 lines
7.1 KiB
Swift

//
// ByoWorker.swift
//
// Generated by openapi-generator
// https://openapi-generator.tech
//
import Foundation
public struct ByoWorker: Sendable, Codable, ParameterConvertible, Hashable {
/** Arch/CPUs/Memory are the connecting host's static CPU spec, mirrored from the registration: Arch is runtime.GOARCH (amd64 | arm64), Memory is total RAM in BYTES — the same fields a code-linked run-target carries, so the /v1/compute/fleet board renders a linked node's arch + cores + RAM like any other unit. */
public var arch: String?
/** Capabilities is what this worker offers the org: \"studio.render\" when the node can render, \"engine.serve\" when it serves a model endpoint. A node advertises one only once it can honour it, so an absent list means a node that has dialed in but is not ready to serve any of them yet. */
public var capabilities: [String]?
/** CPUModel is the processor as the host names it (\"Apple M3 Max\"), for display. */
public var cpuModel: String?
/** CPUs is the host's logical core count. */
public var cpus: Int64?
/** Cuda is the host's CUDA toolkit version. NVIDIA hosts report it. */
public var cuda: String?
/** Driver is the host's NVIDIA kernel driver version — distinct from Cuda, and the one that bounds which CUDA versions can run on this box. */
public var driver: String?
/** Engine is the hanzo-engine model server this node runs, when it runs one (`hanzo link --serve-engine`). Absent means the node takes jobs but serves no model endpoint. */
public var engine: EngineAdvertisement?
/** FirstSeen is when this node first dialed in, RFC 3339 — the start of its presence record, which `hanzo unlink` ends. */
public var firstSeen: String?
/** GPUs are the accelerators the host found on itself. Empty is a real answer: a CPU-only machine can dial in and take non-GPU work. */
public var gpus: [ByoGPU]?
/** Hip is the host's HIP runtime version, the AMD counterpart to Cuda. */
public var hip: String?
/** Hostname is what the host calls itself. It equals ID for any hostname already in the [a-z0-9-] alphabet, and differs when sanitizing had to change it. */
public var hostname: String?
/** ID is the node's id in the fleet — the sanitized hostname it registered under, which is also the `unit` its samples and its gpu-jobs lane key on. This is the id to use everywhere else on the compute surface. */
public var id: String?
/** JobQueue is the tasks NAMESPACE this worker claims render jobs out of — \"gpu-jobs\" unless `hanzo link` was pointed at another. Within it, a job aimed at this node alone rides the task-queue value \"gpu:<id>\". */
public var jobQueue: String?
/** LastHeartbeat is the most recent beat this node sent, RFC 3339. It is what Status is computed from, so a reader can check the judgement. */
public var lastHeartbeat: String?
/** Location is always \"on-prem\" — a machine that dialed in has no cloud region, and inventing one would put it somewhere it is not. */
public var location: String?
/** Memory is the host's total RAM in BYTES. */
public var memory: Int64?
/** Os is the host's operating system: linux, darwin or windows. */
public var os: String?
/** Provider is always \"byo\": this machine is the operator's, not one Hanzo provisioned. It exists so a fold into the machines/GPUs pages says which rows are rented and which are the customer's own. */
public var provider: String?
/** Rocm is the host's ROCm version. AMD hosts report it; empty otherwise. */
public var rocm: String?
/** Status is \"online\" when the last heartbeat landed within 90s, else \"offline\" — so it is a fact about heartbeat freshness, not about the box being powered on. A worker that has never beaten reads offline. */
public var status: String?
/** Version is the `hanzo` CLI version running on the node. It is what to check when a worker is missing a field a newer registration reports. */
public var version: String?
public init(arch: String? = nil, capabilities: [String]? = nil, cpuModel: String? = nil, cpus: Int64? = nil, cuda: String? = nil, driver: String? = nil, engine: EngineAdvertisement? = nil, firstSeen: String? = nil, gpus: [ByoGPU]? = nil, hip: String? = nil, hostname: String? = nil, id: String? = nil, jobQueue: String? = nil, lastHeartbeat: String? = nil, location: String? = nil, memory: Int64? = nil, os: String? = nil, provider: String? = nil, rocm: String? = nil, status: String? = nil, version: String? = nil) {
self.arch = arch
self.capabilities = capabilities
self.cpuModel = cpuModel
self.cpus = cpus
self.cuda = cuda
self.driver = driver
self.engine = engine
self.firstSeen = firstSeen
self.gpus = gpus
self.hip = hip
self.hostname = hostname
self.id = id
self.jobQueue = jobQueue
self.lastHeartbeat = lastHeartbeat
self.location = location
self.memory = memory
self.os = os
self.provider = provider
self.rocm = rocm
self.status = status
self.version = version
}
public enum CodingKeys: String, CodingKey, CaseIterable {
case arch
case capabilities
case cpuModel
case cpus
case cuda
case driver
case engine
case firstSeen
case gpus
case hip
case hostname
case id
case jobQueue
case lastHeartbeat
case location
case memory
case os
case provider
case rocm
case status
case version
}
// Encodable protocol methods
public func encode(to encoder: Encoder) throws {
var container = encoder.container(keyedBy: CodingKeys.self)
try container.encodeIfPresent(arch, forKey: .arch)
try container.encodeIfPresent(capabilities, forKey: .capabilities)
try container.encodeIfPresent(cpuModel, forKey: .cpuModel)
try container.encodeIfPresent(cpus, forKey: .cpus)
try container.encodeIfPresent(cuda, forKey: .cuda)
try container.encodeIfPresent(driver, forKey: .driver)
try container.encodeIfPresent(engine, forKey: .engine)
try container.encodeIfPresent(firstSeen, forKey: .firstSeen)
try container.encodeIfPresent(gpus, forKey: .gpus)
try container.encodeIfPresent(hip, forKey: .hip)
try container.encodeIfPresent(hostname, forKey: .hostname)
try container.encodeIfPresent(id, forKey: .id)
try container.encodeIfPresent(jobQueue, forKey: .jobQueue)
try container.encodeIfPresent(lastHeartbeat, forKey: .lastHeartbeat)
try container.encodeIfPresent(location, forKey: .location)
try container.encodeIfPresent(memory, forKey: .memory)
try container.encodeIfPresent(os, forKey: .os)
try container.encodeIfPresent(provider, forKey: .provider)
try container.encodeIfPresent(rocm, forKey: .rocm)
try container.encodeIfPresent(status, forKey: .status)
try container.encodeIfPresent(version, forKey: .version)
}
}
@available(iOS 13, tvOS 13, watchOS 6, macOS 10.15, *)
extension ByoWorker: Identifiable {}