Skip to main content

SlowRoot

Struct SlowRoot 

Source
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

Source

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.

Source

pub fn source(&self) -> Source

How gunnar learned where to write.

Source

pub fn serialdat(&self) -> &str

serialdat.mountpoint, or empty when nothing said. Reported only.

Source

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.

Source

pub fn device(&self) -> &str

serialdat.dev, or empty.

Source

pub fn path_of(&self, name: &str) -> PathBuf

The path for one dir.<name>, exactly as configured. Never computed relative to anything else.

Source

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.

Source

pub fn claim_of(&self, name: &str) -> Claim

The verdict for one directory.

Source

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.

Source

pub fn meta_dir(&self) -> Result<PathBuf>

The metadata mirror: roster, principals, enrolled keys. Needs off-stripe.

Source

pub fn crash_dir(&self) -> Result<PathBuf>

Crash records and diagnostics. Needs off-stripe.

Source

pub fn log_dir(&self) -> Result<PathBuf>

The audit trail and the durable console log. Needs off-stripe.

Source

pub fn gc_dir(&self) -> Result<PathBuf>

gc / repack scratch. Does not need off-stripe; nothing writes here yet.

Source

pub fn quarantine_dir(&self) -> Result<PathBuf>

Push quarantine. Does not need off-stripe; nothing writes here yet.

Source

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.

Source

pub fn health(&self) -> Vec<String>

The three off-stripe-requiring copies, each said honestly.

Source

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.

Source

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§

Source§

impl Clone for SlowRoot

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for SlowRoot

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Allocation for T
where T: RefUnwindSafe + Send + Sync,

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<'a, T, E> AsTaggedExplicit<'a, E> for T
where T: 'a,

Source§

fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

Source§

impl<'a, T, E> AsTaggedImplicit<'a, E> for T
where T: 'a,

Source§

fn implicit( self, class: Class, constructed: bool, tag: u32, ) -> TaggedParser<'a, Implicit, Self, E>

Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> FromRef<T> for T
where T: Clone,

Source§

fn from_ref(input: &T) -> T

Converts to this type from a reference to the input type.
Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self> ⓘ

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self> ⓘ

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoRequest<T> for T

Source§

fn into_request(self) -> Request<T>

Wrap the input message T in a tonic::Request
Source§

impl<L> LayerExt<L> for L

Source§

fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>
where L: Layer<S>,

Applies the layer to a service and wraps it in Layered.
Source§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘ
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more