pub struct SlowRoot { /* private fields */ }Expand description
The resolved directories, how they were learned, and what may be claimed about each.
Implementations§
Source§impl SlowRoot
impl SlowRoot
Sourcepub fn resolve(data_root: &Path, config: Option<&LayoutConfig>) -> SlowRoot
pub fn resolve(data_root: &Path, config: Option<&LayoutConfig>) -> SlowRoot
Resolve every directory from the config, or fall back under the data root when there is none.
Sourcepub fn serialdat(&self) -> &str
pub fn serialdat(&self) -> &str
serialdat.mountpoint, or empty when nothing said. Reported only.
Sourcepub fn class(&self) -> &str
pub fn class(&self) -> &str
serialdat.class — p3 / device / fallback — or empty when
nothing said. A class that was not read is not reported as one.
Sourcepub fn path_of(&self, name: &str) -> PathBuf
pub fn path_of(&self, name: &str) -> PathBuf
The path for one dir.<name>, exactly as configured. Never computed
relative to anything else.
Sourcepub fn claim(&self) -> Claim
pub fn claim(&self) -> Claim
The one verdict, over the copies that need another failure domain.
The three of them are laid by one installer decision, so they agree by construction; if they ever did not, the honest summary is the WORST of them, never the best.
Sourcepub fn dir(&self, name: &str) -> Result<PathBuf>
pub fn dir(&self, name: &str) -> Result<PathBuf>
One of the directories, created on demand.
Creation is here and not at resolve time on purpose: a slow area that has gone read-only must fail the write that needed it, with the path in the message, rather than fail the boot of a server whose git objects are all still on a working disk.
Sourcepub fn meta_dir(&self) -> Result<PathBuf>
pub fn meta_dir(&self) -> Result<PathBuf>
The metadata mirror: roster, principals, enrolled keys. Needs off-stripe.
Sourcepub fn log_dir(&self) -> Result<PathBuf>
pub fn log_dir(&self) -> Result<PathBuf>
The audit trail and the durable console log. Needs off-stripe.
Sourcepub fn gc_dir(&self) -> Result<PathBuf>
pub fn gc_dir(&self) -> Result<PathBuf>
gc / repack scratch. Does not need off-stripe; nothing writes here yet.
Sourcepub fn quarantine_dir(&self) -> Result<PathBuf>
pub fn quarantine_dir(&self) -> Result<PathBuf>
Push quarantine. Does not need off-stripe; nothing writes here yet.
Sourcepub fn health_line(&self, what: &str, dir: &str) -> String
pub fn health_line(&self, what: &str, dir: &str) -> String
The honest sentence about one off-stripe-requiring copy.
Never “OK” and never “missing” for a copy that is present on the same
device: the whole failure this module exists to prevent is a health
check that answers mirror OK for a mirror that dies with its original.
Sourcepub fn row(&self) -> (String, bool)
pub fn row(&self) -> (String, bool)
The console row: the same shape crate::disktest uses, one line, and a
warn flag so the dashboard colours it.
Sourcepub fn announce(&self, config_path: &str, authenticity: &str)
pub fn announce(&self, config_path: &str, authenticity: &str)
Say the row as the ONE tracing line the log tap turns into the layout
row (dashboard::describe), exactly as disktest does.
authenticity is crate::layout_config::Authenticity::word — the
SAME two words the installer’s own console prints, so an admin
comparing the two screens is not left wondering whether they mean the
same thing.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for SlowRoot
impl RefUnwindSafe for SlowRoot
impl Send for SlowRoot
impl Sync for SlowRoot
impl Unpin for SlowRoot
impl UnsafeUnpin for SlowRoot
impl UnwindSafe for SlowRoot
Blanket Implementations§
impl<T> Allocation for T
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request