pub trait ConfigSource:
Send
+ Sync
+ 'static {
// Required methods
fn show(&self) -> Vec<ConfigShowRow>;
fn doctor(&self) -> Vec<ConfigDoctorFinding>;
}Expand description
Read-only trait over the operator’s on-disk config + its
secret-resolution state. Kept read-only at this layer
because write paths (zero init, zero pair) already live
in dedicated non-interactive entrypoints; the TUI should
never silently rewrite config.toml.
Implementations:
- Production:
ConfigAdapterinzero/src/main.rswrapszero_config::load_config+ keychain lookups. - Tests:
MockConfigbelow is the in-memory double used bydispatch_integration.rs.
Required Methods§
Sourcefn show(&self) -> Vec<ConfigShowRow>
fn show(&self) -> Vec<ConfigShowRow>
Rows for /config show. Order is preserved verbatim in
the rendered output — the adapter decides the column
order so it can group identity → engine → guardrails →
display without the dispatcher needing to know the
schema.
Sourcefn doctor(&self) -> Vec<ConfigDoctorFinding>
fn doctor(&self) -> Vec<ConfigDoctorFinding>
Findings for /config doctor. Return order is
preserved; the adapter is responsible for ordering
(errors first is a reasonable default, but the trait
does not mandate it because a “summary then detail”
shape is sometimes clearer).