tachyon-types 0.3.0

Shared myko entity and command types for the tachyon Ansible runner.
Documentation
use myko_macros::myko_item;
use std::collections::BTreeMap;

/// A cluster definition discovered from the deploy repo's cluster config files.
///
/// The runner scans its cluster dir and reports each as a `ClusterDef` (upsert
/// by name) so a console can offer a launch dropdown — discovery lives where the
/// config files are (the runner), not the cell, symmetric with `Playbook`.
///
/// Deliberately GENERIC: `name` / `label` / `nodes` are all a generic
/// orchestrator needs, and any domain specifics (render-fleet previs host,
/// nDisplay stage, engine version, default map, …) ride the `metadata` string
/// map so tachyon stays domain-agnostic — the reporter decides what keys to put
/// there, the UI decides what to surface.
#[myko_item]
pub struct ClusterDef {
    /// The config's identity — the filename stem, and the value passed as
    /// `RunPlaybook`'s `extraVars.cluster`.
    pub name: String,
    /// Human-friendly description for a dropdown (None if the def has none).
    pub label: Option<String>,
    /// Hostnames the def covers. For display, and — for a legacy def that
    /// doesn't self-resolve its hosts — the `--limit` set.
    pub nodes: Vec<String>,
    /// Reporter-defined domain metadata, kept generic so tachyon hard-codes no
    /// render-fleet concepts (e.g. `previsHost`, `defaultMap`, `stage`,
    /// `ueVersion`).
    pub metadata: BTreeMap<String, String>,
}