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
impl ServiceStatus
Sourcepub fn runner_root(&self) -> Option<(&Path, &RootAccessReport)>
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.
Sourcepub const fn is_installed(&self) -> bool
pub const fn is_installed(&self) -> bool
Whether a registration exists at all.
Sourcepub fn is_running(&self) -> bool
pub fn is_running(&self) -> bool
Whether the daemon is running now.
Sourcepub fn is_healthy(&self) -> bool
pub fn is_healthy(&self) -> bool
False whenever anything is wrong, including a stale binary path.
Sourcepub fn problems(&self) -> &[StatusProblem]
pub fn problems(&self) -> &[StatusProblem]
Everything that is wrong.
Sourcepub fn notes(&self) -> &[String]
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.
Sourcepub fn start_mode(&self) -> Option<StartMode>
pub fn start_mode(&self) -> Option<StartMode>
The recorded start mode. Journey 5 step 4.
Sourcepub const fn binary(&self) -> Option<&BinaryPath>
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.
Sourcepub const fn last_github_contact(&self) -> Option<DateTime<Utc>>
pub const fn last_github_contact(&self) -> Option<DateTime<Utc>>
The last successful GitHub contact. Journey 5 step 4.
Sourcepub const fn secret_store(&self) -> Option<&ActiveStore>
pub const fn secret_store(&self) -> Option<&ActiveStore>
Which store the daemon reads, and whether that agrees with the registration.
Sourcepub const fn record(&self) -> Option<&InstallRecord>
pub const fn record(&self) -> Option<&InstallRecord>
The record install wrote.
Sourcepub const fn registration(&self) -> Option<&Registration>
pub const fn registration(&self) -> Option<&Registration>
What the service manager says.
Trait Implementations§
Source§impl Clone for ServiceStatus
impl Clone for ServiceStatus
Source§fn clone(&self) -> ServiceStatus
fn clone(&self) -> ServiceStatus
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more