pub struct HostPaths {
pub active_setup: PathBuf,
pub backup: PathBuf,
pub docker: PathBuf,
pub etc: PathBuf,
pub lease_file: PathBuf,
}Expand description
Default host layout used on a Horto box (/srv/...).
Tests and dry-run hosts override these with a temporary tree.
§Examples
use horto_os_ui_shared::HostPaths;
use std::path::PathBuf;
let paths = HostPaths {
active_setup: PathBuf::from("/tmp/active"),
backup: PathBuf::from("/tmp/backup"),
docker: PathBuf::from("/tmp/docker"),
etc: PathBuf::from("/tmp/etc"),
lease_file: PathBuf::from("/tmp/leases"),
};
assert!(paths.resume_file().ends_with("horto_setup_state.json"));Fields§
§active_setup: PathBuf/srv/active_setup (env files, staging, resume).
backup: PathBuf/srv/backup.
docker: PathBuf/srv/docker.
etc: PathBuf/etc (or a tempfile stand-in in tests).
lease_file: PathBufdnsmasq leases file.
Implementations§
Source§impl HostPaths
impl HostPaths
Sourcepub fn resume_file(&self) -> PathBuf
pub fn resume_file(&self) -> PathBuf
Resume JSON path under active_setup.
Sourcepub fn full_env_file(&self) -> PathBuf
pub fn full_env_file(&self) -> PathBuf
IoT-LAN env file (iot-lan_conf.env).
Sourcepub fn iot_lan_env_file(&self) -> PathBuf
pub fn iot_lan_env_file(&self) -> PathBuf
Alias for Self::full_env_file (tip name).
Sourcepub fn minimal_env_file(&self) -> PathBuf
pub fn minimal_env_file(&self) -> PathBuf
Minimal setup env file.
Sourcepub fn os_configuration_file(&self) -> PathBuf
pub fn os_configuration_file(&self) -> PathBuf
OS configuration env under active setup.
Sourcepub fn service_links_file(&self) -> PathBuf
pub fn service_links_file(&self) -> PathBuf
Status-API service links (host/ports). Overrides embedded defaults when present.
Sourcepub fn staging_etc(&self) -> PathBuf
pub fn staging_etc(&self) -> PathBuf
Staged /etc tree before apply (s4 → s5).
Sourcepub fn initial_backup_etc(&self) -> PathBuf
pub fn initial_backup_etc(&self) -> PathBuf
Protected initial /etc backup destination (s3).
Sourcepub fn docker_assets(&self) -> PathBuf
pub fn docker_assets(&self) -> PathBuf
Docker assets directory (leases export, stack files).
Sourcepub fn leases_json(&self) -> PathBuf
pub fn leases_json(&self) -> PathBuf
Exported leases JSON path.
Sourcepub fn leases_html(&self) -> PathBuf
pub fn leases_html(&self) -> PathBuf
Exported leases HTML path.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for HostPaths
impl RefUnwindSafe for HostPaths
impl Send for HostPaths
impl Sync for HostPaths
impl Unpin for HostPaths
impl UnsafeUnpin for HostPaths
impl UnwindSafe for HostPaths
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more