pub rc Config
This commit is contained in:
@@ -20,13 +20,13 @@ const CFG_PATH: &str = "/etc/direktil/rc.yaml";
|
||||
const SOCK_PATH: &str = "/run/dkl-rc/ctl.sock"; // Path::new when stable
|
||||
|
||||
#[derive(Default, serde::Serialize, serde::Deserialize)]
|
||||
struct Config {
|
||||
pub struct Config {
|
||||
#[serde(default, skip_serializing_if = "Map::is_empty")]
|
||||
cgroups: Map<String, CgroupConfig>,
|
||||
}
|
||||
|
||||
#[derive(serde::Serialize, serde::Deserialize)]
|
||||
struct CgroupConfig {
|
||||
pub struct CgroupConfig {
|
||||
controllers: String,
|
||||
#[serde(default, skip_serializing_if = "Map::is_empty")]
|
||||
settings: Map<String, String>,
|
||||
@@ -34,7 +34,7 @@ struct CgroupConfig {
|
||||
services: Map<String, Service>,
|
||||
}
|
||||
|
||||
type Service = Vec<String>;
|
||||
pub type Service = Vec<String>;
|
||||
|
||||
static MANAGER: LazyLock<RwLock<Manager>> = LazyLock::new(|| RwLock::new(Manager::default()));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user