Skip to main content

DaemonConfig

Type Alias DaemonConfig 

Source
pub type DaemonConfig = ProcessConfig;
Expand description

Alias for ProcessConfig (backward compatibility)

Aliased Type§

pub struct DaemonConfig {
    pub name: String,
    pub executable: PathBuf,
    pub args: Vec<OsString>,
    pub working_dir: Option<PathBuf>,
    pub env: Vec<(String, String)>,
    pub memory_limit: Option<String>,
    pub cpu_quota: Option<u32>,
    pub unit_properties: Vec<(String, String)>,
    pub restart_on_failure: bool,
    pub readiness: ProcessReadiness,
}

Fields§

§name: String

Human-readable name for the daemon (used in unit names).

§executable: PathBuf

Path to the executable.

§args: Vec<OsString>

Command-line arguments.

§working_dir: Option<PathBuf>

Working directory.

§env: Vec<(String, String)>

Environment variables (key=value).

§memory_limit: Option<String>

Memory limit (systemd only, e.g., “1G”, “512M”).

§cpu_quota: Option<u32>

CPU quota percentage (systemd only, e.g., 200 for 2 cores).

§unit_properties: Vec<(String, String)>

Custom unit properties (systemd only).

§restart_on_failure: bool

Whether to restart on failure (systemd only).

§readiness: ProcessReadiness

When the spawn may be reported as started (#1585).