pub struct DesiredState {
pub servers: BTreeMap<String, Server>,
pub invalid: BTreeMap<String, CoreError>,
pub clients: ClientPrefsFile,
pub overlay: Option<MachineOverlay>,
pub settings: Settings,
pub catalog: Catalog,
}Expand description
Everything the system layer is computed from, read from one view of the store (working tree, transaction or past revision).
Fields§
§servers: BTreeMap<String, Server>Valid servers by id.
invalid: BTreeMap<String, CoreError>Server files that do not load or validate, by id. Entries owned for these servers are left alone (never removed) until the file is fixed.
clients: ClientPrefsFile§overlay: Option<MachineOverlay>This machine’s overlay (machines/<machine-id>.toml).
settings: Settings§catalog: Catalogsecrets.toml with this machine’s overlay applied.
Implementations§
Source§impl DesiredState
impl DesiredState
Sourcepub fn load(
src: &dyn StoreRead,
machine_id: Option<&str>,
) -> Result<Self, CoreError>
pub fn load( src: &dyn StoreRead, machine_id: Option<&str>, ) -> Result<Self, CoreError>
Loads the desired state. A broken clients.toml, settings.toml,
secrets.toml or machine overlay fails the whole load, since it
changes every target; a broken server file only marks that server
DesiredState::invalid.
Sourcepub fn apply_mode(&self) -> ApplyMode
pub fn apply_mode(&self) -> ApplyMode
apply_mode from settings.toml; instant by default (SPEC 5.7).
Sourcepub fn export_provider_secrets(&self) -> bool
pub fn export_provider_secrets(&self) -> bool
Whether this machine exports provider secrets to the environment
([delivery] export_provider_secrets in the overlay).
Sourcepub fn prefs(&self, client: &str) -> ClientPrefs
pub fn prefs(&self, client: &str) -> ClientPrefs
The clients.toml table of a client (empty when absent).