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 const fn foreign(&self) -> Option<&ForeignService>
pub const fn foreign(&self) -> Option<&ForeignService>
The other installation this machine’s service belongs to, when it is
not this account’s. See ForeignService.
Sourcepub fn is_unread(&self) -> bool
pub fn is_unread(&self) -> bool
Whether this is another installation’s service whose own records this account could not read, so only the service manager’s facts are here.
Sourcepub fn with_definition_drift(self, drift: Option<DefinitionDrift>) -> Self
pub fn with_definition_drift(self, drift: Option<DefinitionDrift>) -> Self
Reports a definition this build would render differently.
Sourcepub fn with_credential_rejection(self, since: Option<DateTime<Utc>>) -> Self
pub fn with_credential_rejection(self, since: Option<DateTime<Utc>>) -> Self
Reports that GitHub is rejecting the daemon’s credential.
Sourcepub const fn credential_rejected_since(&self) -> Option<DateTime<Utc>>
pub const fn credential_rejected_since(&self) -> Option<DateTime<Utc>>
Since when GitHub has rejected the service’s credential, if it has.
Sourcepub fn with_launches_blocked(self, blocked: Option<LaunchesBlocked>) -> Self
pub fn with_launches_blocked(self, blocked: Option<LaunchesBlocked>) -> Self
Reports that the daemon starts no runner because its launches are
blocked. See crate::launch_health.
Sourcepub const fn launches_blocked(&self) -> Option<&LaunchesBlocked>
pub const fn launches_blocked(&self) -> Option<&LaunchesBlocked>
Why the service starts no runner, when its launches are blocked.
Sourcepub fn with_credential_unreadable(self, since: Option<DateTime<Utc>>) -> Self
pub fn with_credential_unreadable(self, since: Option<DateTime<Utc>>) -> Self
Reports that the daemon cannot read its own stored credential, and the
exact command that ends it. See record_credential_unreadable.
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 with_host_unfit(self, unfit: Option<HostUnfitRecord>) -> Self
pub fn with_host_unfit(self, unfit: Option<HostUnfitRecord>) -> Self
Reports that the daemon starts no runner because a required host check
fails from its own session. That is the service not doing its job, so
it is a problem: a host whose daemon refused every runner used to read
verdict healthy.
Sourcepub fn with_stall(self, stall: Option<String>) -> Self
pub fn with_stall(self, stall: Option<String>) -> Self
Reports a daemon that is running and has stopped making progress. See
crate::daemon_heartbeat: launchd, systemd and the SCM all report
such a daemon running, so this used to read verdict healthy.
Sourcepub fn with_unattended_gap(self, gap: Option<UnattendedGap>) -> Self
pub fn with_unattended_gap(self, gap: Option<UnattendedGap>) -> Self
Records whether this registration comes back by itself after an
unattended restart, as a note. See unattended_gap.
Sourcepub const fn unattended_gap(&self) -> Option<&UnattendedGap>
pub const fn unattended_gap(&self) -> Option<&UnattendedGap>
Why this registration does not come back by itself after an unattended restart, when it does not.
Sourcepub fn restart_command(&self) -> String
pub fn restart_command(&self) -> String
The service manager’s command that restarts this registration, for its
start mode (boot when unknown). See ServiceIdentity::restart_command.
Sourcepub fn start_mode(&self) -> Option<StartMode>
pub fn start_mode(&self) -> Option<StartMode>
The recorded start mode. Journey 5 step 4. For another installation’s service whose record this account cannot read, the mode the service manager’s domain implies.
Sourcepub fn service_binary(&self) -> Option<PathBuf>
pub fn service_binary(&self) -> Option<PathBuf>
The binary the service runs: the recorded one, or for another installation’s service whose record this account cannot read, the one the service manager names.
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.