systemd: make unit_status read-only (GetUnit only, never LoadUnit)
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01YShymaPrXmc3KYRUg2HMSs
This commit is contained in:
1 parent
85af4659f1
commit
74802efd0e
7 files changed
+15
-12
No files matched your search
+2
-1
@@ -83,7 +83,8 @@ pub trait SystemdSource: Send + Sync {
|
||||
async fn list_units(&self, state: Option<&str>) -> Result<Vec<UnitSummary>, AppError>;
|
||||
/// List `.timer` units with their schedule.
|
||||
async fn list_timers(&self) -> Result<Vec<TimerInfo>, AppError>;
|
||||
/// Status of one unit. Unknown unit is `AppError::NotFound`.
|
||||
/// Status of one unit. Read-only: never asks systemd to load a unit, so a
|
||||
/// unit that is not loaded (or unknown) is `AppError::NotFound`.
|
||||
async fn unit_status(&self, name: &str) -> Result<UnitStatus, AppError>;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user