pub struct Assembler {Show 13 fields
pub quiet: bool,
pub(crate) manifest: Manifest,
pub(crate) canonical: Canonical,
pub(crate) evidence: BTreeMap<(UnitId, ProbeId), Evidence>,
pub(crate) last_run: BTreeMap<(UnitId, ProbeId), Timestamp>,
pub(crate) on_demand: BTreeSet<(UnitId, ProbeId)>,
pub failed_since: BTreeMap<UnitId, Timestamp>,
pub known_drivers: BTreeMap<UnitId, DriverRef>,
pub sessions: Vec<SessionInfo>,
pub(crate) session_seen: BTreeMap<String, Timestamp>,
pub on_battery: bool,
pub slow_ticks: u64,
pub slow_tick: Option<(Millis, Vec<String>)>,
}Fields§
§quiet: boolQuiet mode (§12f): Readiness probes of units foreground work does not depend on drop to their slowest interval.
manifest: Manifest§canonical: Canonical§evidence: BTreeMap<(UnitId, ProbeId), Evidence>§last_run: BTreeMap<(UnitId, ProbeId), Timestamp>§on_demand: BTreeSet<(UnitId, ProbeId)>§failed_since: BTreeMap<UnitId, Timestamp>§known_drivers: BTreeMap<UnitId, DriverRef>§sessions: Vec<SessionInfo>§session_seen: BTreeMap<String, Timestamp>When each session id was first observed (stands in for an unknown creation time).
on_battery: bool§slow_ticks: u64Ticks that went over budget (logged by the daemon).
slow_tick: Option<(Millis, Vec<String>)>The last tick over budget, if the daemon has not reported it yet: how long it took and the probes that ran in it (P9).
Implementations§
Source§impl Assembler
impl Assembler
pub fn new(manifest: Manifest, canonical: Canonical) -> Assembler
Sourcepub fn set_manifest(&mut self, manifest: Manifest)
pub fn set_manifest(&mut self, manifest: Manifest)
A new generation’s manifest (after a commit, revert or boot).
pub fn manifest(&self) -> &Manifest
Sourcepub fn defs(&self) -> UnitDefs
pub fn defs(&self) -> UnitDefs
System units plus one instance of each user template per user with an established session (§10: a user service is desired only while that user’s session exists).
Sourcepub fn request(&mut self, unit: &UnitId, probe: &ProbeId)
pub fn request(&mut self, unit: &UnitId, probe: &ProbeId)
Run a Diagnostic (or any) probe on the next tick: user-initiated diagnostics (§10).
Sourcepub fn reprobe(&mut self, unit: &UnitId)
pub fn reprobe(&mut self, unit: &UnitId)
Re-run every Readiness probe of unit now (diagnostic incident: re-observe).
pub(crate) fn interval(&self, p: &ProbeDef) -> Option<Millis>
pub(crate) fn stale_after(&self, p: &ProbeDef) -> Millis
Sourcepub(crate) fn quieted(
&self,
def: &UnitDef,
p: &ProbeDef,
now: Timestamp,
) -> bool
pub(crate) fn quieted( &self, def: &UnitDef, p: &ProbeDef, now: Timestamp, ) -> bool
Quiet mode holds back a probe of a unit foreground work does not plausibly depend on (audio, the compositor, input devices, the network), to once a minute.
pub(crate) fn due(&self, unit: &UnitId, p: &ProbeDef, now: Timestamp) -> bool
pub(crate) fn observe_unit<B: Backends>( &mut self, b: &B, def: &UnitDef, devices: &BTreeMap<UnitId, Option<DriverRef>>, ) -> Observed
Sourcepub(crate) fn session_of(&self, id: &UnitId) -> Option<&SessionInfo>
pub(crate) fn session_of(&self, id: &UnitId) -> Option<&SessionInfo>
The logind session a session-bound unit instance belongs to.
Sourcepub(crate) fn session_up<B: Backends>(
&self,
b: &B,
target: &str,
s: &SessionInfo,
) -> bool
pub(crate) fn session_up<B: Backends>( &self, b: &B, target: &str, s: &SessionInfo, ) -> bool
Whether this session’s desktop is up (§9): the compositor in the session’s own cgroup is running, when the backend can see that; else the target in the user’s manager, which is only corroboration (for a second session of the same uid it was reached already).
Sourcepub(crate) fn observe_session_target<B: Backends>(
&self,
b: &B,
target: &str,
within: Millis,
now: Timestamp,
s: &SessionInfo,
) -> Observed
pub(crate) fn observe_session_target<B: Backends>( &self, b: &B, target: &str, within: Millis, now: Timestamp, s: &SessionInfo, ) -> Observed
§9 graphical-session, for one session: up within within of the
session’s creation. Before the deadline it is Transitioning; a missed
deadline makes it inactive, and its probe fails.