reactive_graph/server/daemon/
args.rs

1use clap::Parser;
2
3#[derive(Parser, Debug)]
4pub struct DaemonArguments {
5    /// Sets the name of the daemon.
6    #[arg(long, env = "REACTIVE_GRAPH_DAEMON_NAME")]
7    pub daemon_name: Option<String>,
8
9    /// The location of the daemon PID file.
10    /// By default, no PID file will be created.
11    #[arg(long, env = "REACTIVE_GRAPH_DAEMON_PID")]
12    pub daemon_pid: Option<String>,
13
14    /// The working directory of the daemon.
15    #[arg(long, env = "REACTIVE_GRAPH_DAEMON_WORKING_DIRECTORY")]
16    pub daemon_working_directory: Option<String>,
17
18    /// Stdout will be written into this file.
19    #[arg(long, env = "REACTIVE_GRAPH_DAEMON_STDOUT")]
20    pub daemon_stdout: Option<String>,
21
22    /// Stderr will be written into this file.
23    #[arg(long, env = "REACTIVE_GRAPH_DAEMON_STDERR")]
24    pub daemon_stderr: Option<String>,
25
26    /// If set will drop privileges to the specified user.
27    /// Note: Both must be given: user and group.
28    #[arg(long, env = "REACTIVE_GRAPH_DAEMON_USER")]
29    pub daemon_user: Option<String>,
30
31    /// If set will drop privileges to the specified group.
32    /// Note: Both must be given: user and group.
33    #[arg(long, env = "REACTIVE_GRAPH_DAEMON_GROUP")]
34    pub daemon_group: Option<String>,
35}