Skip to main content

apply_unit_details

Function apply_unit_details 

Source
pub async fn apply_unit_details(
    socket_path: &str,
    locked_machine_stats: &Arc<RwLock<MachineStats>>,
    config: &Config,
    fs_root: &str,
    timer_names: &[String],
) -> Result<()>
Expand description

Collect per-unit detail over varlink: ServiceStats for the [services] list, the tracked timers, and the service types the oneshot health override needs.

Both come from io.systemd.Unit.List, through one connection and one cache, so a unit wanted by both is fetched once. This replaces the per-service and oneshot-type D-Bus fetches the varlink path used to fall back to.

Selection runs under a read lock and the varlink round trips hold no lock at all, matching how the D-Bus override behaved.