cgroups-rs 0.5.0

Native Rust crate for managing control groups on Linux
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
// Copyright (c) 2025 Ant Group
//
// SPDX-License-Identifier: Apache-2.0 or MIT
//

use zbus::blocking::Connection;
use zbus::Result;

use crate::systemd::dbus::systemd_manager_proxy::ManagerProxyBlocking as SystemManager;

pub(crate) fn systemd_manager_proxy<'a>() -> Result<SystemManager<'a>> {
    let connection = Connection::system()?;
    let proxy = SystemManager::new(&connection)?;

    Ok(proxy)
}