DbusSystemd: drop unused config/shutdown, derive Default
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
d022ebeae5
commit
e39d885fae
3 files changed
+6
-18
No files matched your search
@@ -1,17 +1,15 @@
|
||||
//! Dump systemd state from the live system bus as JSON.
|
||||
//! Usage: cargo run --example systemd_dump [unit-name]
|
||||
|
||||
use skyg_linux_tracker::config::Config;
|
||||
use skyg_linux_tracker::sources::systemd::DbusSystemd;
|
||||
use skyg_linux_tracker::sources::SystemdSource;
|
||||
use tokio_util::sync::CancellationToken;
|
||||
|
||||
#[tokio::main]
|
||||
async fn main() -> Result<(), Box<dyn std::error::Error>> {
|
||||
let unit = std::env::args()
|
||||
.nth(1)
|
||||
.unwrap_or_else(|| "dbus.service".to_string());
|
||||
let src = DbusSystemd::new(&Config::default(), CancellationToken::new());
|
||||
let src = DbusSystemd::default();
|
||||
let out = serde_json::json!({
|
||||
"units": src.list_units(None).await?,
|
||||
"failed": src.list_units(Some("failed")).await?,
|
||||
|
||||
Reference in new issue
Block a user