Skip to main content

ServiceStatus

Struct ServiceStatus 

Source
pub struct ServiceStatus { /* private fields */ }
Expand description

Everything service status reports.

Journey 5 step 4 names four of these — the start mode, the resolved binary path, the diagnostic log path, and the last successful GitHub contact — and the release gate adds the fifth: service status reports a stale binary path as an error rather than appearing healthy”. Self::is_healthy is what an exit code should be derived from, and it is false whenever Self::problems is non-empty.

Implementations§

Source§

impl ServiceStatus

Source

pub fn runner_root(&self) -> Option<(&Path, &RootAccessReport)>

What this host’s default runner root grants, and to whom.

None when the platform default could not even be resolved. The descriptor inside has been through crate::runner_root_access::redact, so it names the well-known trustees and says “an account” for everything else — no more identity than the account line above it already prints.

Source

pub const fn is_installed(&self) -> bool

Whether a registration exists at all.

Source

pub fn is_running(&self) -> bool

Whether the daemon is running now.

Source

pub fn is_healthy(&self) -> bool

False whenever anything is wrong, including a stale binary path.

Source

pub fn problems(&self) -> &[StatusProblem]

Everything that is wrong.

Source

pub fn notes(&self) -> &[String]

True statements that are not faults — a login-mode registration not running unattended, or an agent that has not yet reached GitHub.

Source

pub fn start_mode(&self) -> Option<StartMode>

The recorded start mode. Journey 5 step 4.

Source

pub const fn binary(&self) -> Option<&BinaryPath>

The resolved absolute binary path and what became of it. Journey 5 step 4 and 05-infrastructure.md item 6.

Source

pub fn log_file(&self) -> &Path

The diagnostic log path. 05-infrastructure.md item 4.

Source

pub const fn last_github_contact(&self) -> Option<DateTime<Utc>>

The last successful GitHub contact. Journey 5 step 4.

Source

pub const fn secret_store(&self) -> Option<&ActiveStore>

Which store the daemon reads, and whether that agrees with the registration.

Source

pub const fn record(&self) -> Option<&InstallRecord>

The record install wrote.

Source

pub const fn registration(&self) -> Option<&Registration>

What the service manager says.

Trait Implementations§

Source§

impl Clone for ServiceStatus

Source§

fn clone(&self) -> ServiceStatus

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 ServiceStatus

Source§

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

Formats the value using the given formatter. Read more
Source§

impl Display for ServiceStatus

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> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
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<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> 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> 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> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. 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