mirror of
https://github.com/hanzoai/swift-sdk.git
synced 2026-10-30 18:20:19 +00:00
The projection was 113 commits behind the document it claims to describe, and `generate.py --all --check` reported every one of the thirteen clients DRIFTED — the same +19 models in each, because they all fell behind the same emission. Regenerated in place from hanzo-inc/cloud openapi.yaml at 939b09d4 (sha256 087024f6…), which is the only description of this API that cannot name a route the binary does not serve. `--check` is clean across all thirteen after. .spec-lock moved with the code. The generator READS that file and never writes it — hanzoai/ci`s lane does — so a hand run leaves every lock naming the previous document. A lock that disagrees with the tree beside it is worse than no lock: the next `--check` without `--spec` fetches what production serves, compares it to a digest that was already wrong, and reports drift that is really staleness.
66 lines
3.5 KiB
Swift
66 lines
3.5 KiB
Swift
//
|
|
// HealthReport.swift
|
|
//
|
|
// Generated by openapi-generator
|
|
// https://openapi-generator.tech
|
|
//
|
|
|
|
import Foundation
|
|
|
|
public struct HealthReport: Sendable, Codable, ParameterConvertible, Hashable {
|
|
|
|
/** Datastore reports whether the shared warehouse client has a live connection. It is load-bearing for the READ path: false is one of the two ways this answers 503. */
|
|
public var datastore: Bool?
|
|
/** Lenses is per-lens table availability, probed only when connected — so it is absent from a degraded report, which has nothing to say about tables it could not reach. */
|
|
public var lenses: HealthLenses?
|
|
/** Lost is the count of facts the sink irrecoverably dropped since boot (warehouse.go). It is reported on the DEGRADED report too, and deliberately: a warehouse that is unreachable is exactly when facts start failing their deliveries, so suppressing the number here would hide it precisely when it moves. ANY NON-ZERO VALUE IS AN ALARM — it counts data the endpoint already answered 200 for. */
|
|
public var lost: Loss?
|
|
/** Plane reports the event plane — the bus and the stream every accepted event is published to BEFORE any of it reaches the warehouse. It is load-bearing for the WRITE path, and it is here because its absence was a real outage: this endpoint answered 200/ok on warehouse connectivity alone while every POST /v1/event 503'd on a stream that could not bind, so 100% ingest loss was invisible to monitoring. A probe that cannot see the write path cannot report the write path. */
|
|
public var plane: HealthPlane?
|
|
/** Reason is the human-readable cause, present only on a degraded report. */
|
|
public var reason: String?
|
|
/** Service names the subsystem answering, so a probe aggregating several health endpoints can attribute a degraded one. */
|
|
public var service: String?
|
|
/** Status is ok or degraded. Degraded is the 503 and means EITHER load-bearing dependency is down — the warehouse this subsystem reads, or the event plane it writes. It is not moved by a missing lens table, which is honest-empty. */
|
|
public var status: String?
|
|
/** Warehouse names the datastore database every lens reads. */
|
|
public var warehouse: String?
|
|
|
|
public init(datastore: Bool? = nil, lenses: HealthLenses? = nil, lost: Loss? = nil, plane: HealthPlane? = nil, reason: String? = nil, service: String? = nil, status: String? = nil, warehouse: String? = nil) {
|
|
self.datastore = datastore
|
|
self.lenses = lenses
|
|
self.lost = lost
|
|
self.plane = plane
|
|
self.reason = reason
|
|
self.service = service
|
|
self.status = status
|
|
self.warehouse = warehouse
|
|
}
|
|
|
|
public enum CodingKeys: String, CodingKey, CaseIterable {
|
|
case datastore
|
|
case lenses
|
|
case lost
|
|
case plane
|
|
case reason
|
|
case service
|
|
case status
|
|
case warehouse
|
|
}
|
|
|
|
// Encodable protocol methods
|
|
|
|
public func encode(to encoder: Encoder) throws {
|
|
var container = encoder.container(keyedBy: CodingKeys.self)
|
|
try container.encodeIfPresent(datastore, forKey: .datastore)
|
|
try container.encodeIfPresent(lenses, forKey: .lenses)
|
|
try container.encodeIfPresent(lost, forKey: .lost)
|
|
try container.encodeIfPresent(plane, forKey: .plane)
|
|
try container.encodeIfPresent(reason, forKey: .reason)
|
|
try container.encodeIfPresent(service, forKey: .service)
|
|
try container.encodeIfPresent(status, forKey: .status)
|
|
try container.encodeIfPresent(warehouse, forKey: .warehouse)
|
|
}
|
|
}
|
|
|