pub struct KoiMetadata {
pub enable: Option<bool>,
pub service_type: Option<String>,
pub name: Option<String>,
pub dns_name: Option<String>,
pub txt: HashMap<String, String>,
pub health_path: Option<String>,
pub health_kind: Option<String>,
pub health_interval: Option<u64>,
pub health_timeout: Option<u64>,
pub proxy_port: Option<u16>,
pub proxy_remote: Option<bool>,
pub certmesh: Option<bool>,
}Expand description
Koi-specific metadata extracted from runtime labels/annotations.
All fields are optional — when absent, the adapter uses heuristics or skips the corresponding Koi capability.
Fields§
§enable: Option<bool>Opt-in flag. When Some(false), the instance is ignored.
When None, the adapter uses its default policy (opt-in or opt-out).
service_type: Option<String>mDNS service type override (e.g., _http._tcp).
name: Option<String>Service name override for mDNS/DNS.
dns_name: Option<String>DNS name override (without zone suffix).
txt: HashMap<String, String>TXT record key-value pairs for mDNS.
health_path: Option<String>Health check HTTP path (e.g., /healthz).
health_kind: Option<String>Health check kind override (http or tcp).
health_interval: Option<u64>Health check interval in seconds.
health_timeout: Option<u64>Health check timeout in seconds.
proxy_port: Option<u16>TLS proxy listen port.
proxy_remote: Option<bool>Allow remote proxy connections.
certmesh: Option<bool>Enable certmesh cert injection.
Implementations§
Source§impl KoiMetadata
impl KoiMetadata
Sourcepub fn from_labels(labels: &HashMap<String, String>) -> Self
pub fn from_labels(labels: &HashMap<String, String>) -> Self
Parse from a flat key-value map (Docker labels, Incus user.* config).
Keys use the koi. prefix: koi.type, koi.name, koi.dns.name,
koi.txt.key, koi.health.path, etc.
Sourcepub fn from_labels_and_env(
labels: &HashMap<String, String>,
env: &[String],
) -> Self
pub fn from_labels_and_env( labels: &HashMap<String, String>, env: &[String], ) -> Self
Parse from labels with optional environment variable overrides.
Environment variables provide a lower-precedence shorthand:
KOI_MDNS_ANNOUNCE=<name>— equivalent tokoi.announce=<name>label
The koi.announce=<name> shorthand (label or env var) sets:
enable = truename = <name>dns_name = <name>
Explicit koi.* labels always override the shorthand.
Sourcepub fn is_disabled(&self) -> bool
pub fn is_disabled(&self) -> bool
Whether this instance is explicitly opted out.
Trait Implementations§
Source§impl Clone for KoiMetadata
impl Clone for KoiMetadata
Source§fn clone(&self) -> KoiMetadata
fn clone(&self) -> KoiMetadata
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more