pub struct Daemon {Show 50 fields
pub id: DaemonId,
pub title: Option<String>,
pub pid: Option<u32>,
pub start_time: Option<u64>,
pub boot_time: Option<u64>,
pub shell_pid: Option<u32>,
pub status: DaemonStatus,
pub dir: Option<PathBuf>,
pub cmd: Option<Vec<String>>,
pub run: Option<String>,
pub autostop: bool,
pub cron_schedule: Option<String>,
pub cron_retrigger: Option<CronRetrigger>,
pub cron_immediate: Option<bool>,
pub last_cron_triggered: Option<DateTime<Local>>,
pub last_exit_success: Option<bool>,
pub retry: Retry,
pub retry_count: u32,
pub ready_delay: Option<u64>,
pub ready_output: Option<ReadyOutput>,
pub ready_http: Option<ReadyHttp>,
pub ready_port: Option<ReadyPort>,
pub ready_cmd: Option<ReadyCmd>,
pub health_cmd: Option<HealthCmd>,
pub health_http: Option<HealthHttp>,
pub health_port: Option<HealthPort>,
pub port: Option<PortConfig>,
pub resolved_port: Vec<u16>,
pub active_port: Option<u16>,
pub slug: Option<String>,
pub proxy: Option<bool>,
pub depends: Vec<DaemonId>,
pub env: Option<IndexMap<String, String>>,
pub watch: Vec<String>,
pub watch_mode: WatchMode,
pub watch_base_dir: Option<PathBuf>,
pub mise: Option<bool>,
pub user: Option<String>,
pub memory_limit: Option<MemoryLimit>,
pub cpu_limit: Option<CpuLimit>,
pub stop_signal: Option<StopConfig>,
pub archive_hook: Option<String>,
pub log_format: Option<String>,
pub pty: Option<bool>,
pub config_registered: bool,
pub oneshot: bool,
pub proxy_idle_timeout_ms: Option<u64>,
pub last_cron_run: Option<DateTime<Local>>,
pub no_shell: bool,
pub scheduled_from_config: bool,
}Fields§
§id: DaemonId§title: Option<String>§pid: Option<u32>§start_time: Option<u64>High-resolution kernel start token recorded at spawn. Together with
pid this identifies the process across a supervisor crash: a recycled
PID has a different token, so orphan cleanup can tell a genuine orphan
from an unrelated process.
boot_time: Option<u64>System boot time (seconds since epoch) recorded at spawn. Lets orphan
reconciliation tell a daemon that died under a crashed supervisor
during this boot from one whose process died with the machine, which
need different terminal states. Unlike start_time this is a
wall-clock value comparable across processes and platforms.
shell_pid: Option<u32>§status: DaemonStatus§dir: Option<PathBuf>§cmd: Option<Vec<String>>§run: Option<String>Original shell command string, persisted for retry/watch restarts.
autostop: bool§cron_schedule: Option<String>§cron_retrigger: Option<CronRetrigger>§cron_immediate: Option<bool>§last_cron_triggered: Option<DateTime<Local>>§last_exit_success: Option<bool>§retry: Retry§retry_count: u32§ready_delay: Option<u64>§ready_output: Option<ReadyOutput>§ready_http: Option<ReadyHttp>§ready_port: Option<ReadyPort>§ready_cmd: Option<ReadyCmd>§health_cmd: Option<HealthCmd>§health_http: Option<HealthHttp>§health_port: Option<HealthPort>§port: Option<PortConfig>Port configuration (expected ports and auto-bump settings)
resolved_port: Vec<u16>Resolved ports actually used after auto-bump (may differ from expected)
active_port: Option<u16>The first port the process is actually listening on (detected at runtime via listeners crate). This is the source of truth for the reverse proxy. Cleared when the daemon stops.
slug: Option<String>Optional stable slug alias for this daemon (used in proxy URLs and CLI commands).
proxy: Option<bool>Whether to proxy this daemon (None = inherit global proxy.enable setting).
depends: Vec<DaemonId>§env: Option<IndexMap<String, String>>§watch: Vec<String>§watch_mode: WatchMode§watch_base_dir: Option<PathBuf>§mise: Option<bool>Whether to use mise for this daemon (None = inherit global general.mise setting).
§Schema compatibility note
This field changed from bool to Option<bool> with skip_serializing_if = "Option::is_none".
- Upgrade (old → new): safe — old files contain
mise = true/false, which deserialize correctly asSome(true)/Some(false). - Downgrade (new → old): if
miseisNone(inherit global), the key is omitted from the state file. An old binary reads the missing key asfalse, ignoringgeneral.mise = true. Any daemon that relied on the global setting would silently stop using mise after a downgrade.
user: Option<String>Unix user to run this daemon as.
memory_limit: Option<MemoryLimit>Memory limit for the daemon process (e.g. “50MB”, “1GiB”)
cpu_limit: Option<CpuLimit>CPU usage limit as a percentage (e.g. 80 for 80%, 200 for 2 cores)
stop_signal: Option<StopConfig>Unix signal to send for graceful shutdown (default: SIGTERM)
archive_hook: Option<String>Archive hook command invoked before retention prunes this daemon’s logs.
log_format: Option<String>Log format for this daemon.
pty: Option<bool>Allocate a pseudo-terminal for the daemon process.
config_registered: boolTrue for daemons auto-registered from config by the cron watcher, not yet started. Treated as “available” by list/status/stats.
oneshot: boolRun-to-completion task rather than a long-running service. Readiness is
a zero exit code, and the terminal state is completed instead of
stopped. See DaemonStatus::Completed.
Appended rather than grouped with status: IPC encodes this struct
positionally, so a field inserted in the middle shifts every field
after it for a peer that does not have it.
proxy_idle_timeout_ms: Option<u64>Set when the proxy started this run and it may be stopped for
inactivity: how long, in milliseconds, it may go without proxy
activity. None for a daemon started any other way, or claimed since
by an explicit start.
Appended last for the positional IPC encoding, like oneshot.
last_cron_run: Option<DateTime<Local>>When the cron watcher last actually started this daemon.
Distinct from last_cron_triggered, which advances on every scheduled
tick the watcher observes – including the anchoring tick that
immediate = false uses to skip the first window, and ticks where the
retrigger policy declines to run. Only this field means “it ran”,
which is what last_exit_success describes the outcome of.
Appended after proxy_idle_timeout_ms for the positional IPC encoding.
no_shell: boolStart cmd directly, without a shell. See RunOptions::no_shell.
Appended after last_cron_run for the positional IPC encoding.
scheduled_from_config: boolRegistered from config by the cron watcher and only ever started by its schedule since, so each scheduled run is built from the current config, templates rendered, rather than from what was stored at registration. Cleared once a client starts the daemon: a run it asked for carries its own options, which the schedule then keeps.
Appended after no_shell for the positional IPC encoding.
Implementations§
Source§impl Daemon
impl Daemon
Sourcepub fn next_cron_run(&self, now: DateTime<Local>) -> Option<DateTime<Local>>
pub fn next_cron_run(&self, now: DateTime<Local>) -> Option<DateTime<Local>>
The next time the cron watcher will consider this daemon due, or
None when it has no schedule or the schedule does not parse.
Anchored exactly the way check_cron_schedules anchors itself, so the
answer is what the watcher will actually do rather than an independent
reading of the schedule. That includes the case where the supervisor
was down across a window: the anchor is still the old tick, so the
result is a time in the past – the overdue run the watcher takes on
its next check.
Sourcepub fn to_run_options(&self, cmd: Vec<String>) -> RunOptions
pub fn to_run_options(&self, cmd: Vec<String>) -> RunOptions
Build RunOptions from persisted daemon state.
Carries over all configuration fields from the daemon state. Callers can override specific fields on the returned value.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Daemon
impl<'de> Deserialize<'de> for Daemon
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Auto Trait Implementations§
impl Freeze for Daemon
impl RefUnwindSafe for Daemon
impl Send for Daemon
impl Sync for Daemon
impl Unpin for Daemon
impl UnsafeUnpin for Daemon
impl UnwindSafe for Daemon
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
impl<T> ErasedDestructor for Twhere
T: 'static,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<D> OwoColorize for D
impl<D> OwoColorize for D
Source§fn fg<C>(&self) -> FgColorDisplay<'_, C, Self>where
C: Color,
fn fg<C>(&self) -> FgColorDisplay<'_, C, Self>where
C: Color,
Source§fn bg<C>(&self) -> BgColorDisplay<'_, C, Self>where
C: Color,
fn bg<C>(&self) -> BgColorDisplay<'_, C, Self>where
C: Color,
Source§fn black(&self) -> FgColorDisplay<'_, Black, Self>
fn black(&self) -> FgColorDisplay<'_, Black, Self>
Source§fn on_black(&self) -> BgColorDisplay<'_, Black, Self>
fn on_black(&self) -> BgColorDisplay<'_, Black, Self>
Source§fn red(&self) -> FgColorDisplay<'_, Red, Self>
fn red(&self) -> FgColorDisplay<'_, Red, Self>
Source§fn on_red(&self) -> BgColorDisplay<'_, Red, Self>
fn on_red(&self) -> BgColorDisplay<'_, Red, Self>
Source§fn green(&self) -> FgColorDisplay<'_, Green, Self>
fn green(&self) -> FgColorDisplay<'_, Green, Self>
Source§fn on_green(&self) -> BgColorDisplay<'_, Green, Self>
fn on_green(&self) -> BgColorDisplay<'_, Green, Self>
Source§fn yellow(&self) -> FgColorDisplay<'_, Yellow, Self>
fn yellow(&self) -> FgColorDisplay<'_, Yellow, Self>
Source§fn on_yellow(&self) -> BgColorDisplay<'_, Yellow, Self>
fn on_yellow(&self) -> BgColorDisplay<'_, Yellow, Self>
Source§fn blue(&self) -> FgColorDisplay<'_, Blue, Self>
fn blue(&self) -> FgColorDisplay<'_, Blue, Self>
Source§fn on_blue(&self) -> BgColorDisplay<'_, Blue, Self>
fn on_blue(&self) -> BgColorDisplay<'_, Blue, Self>
Source§fn magenta(&self) -> FgColorDisplay<'_, Magenta, Self>
fn magenta(&self) -> FgColorDisplay<'_, Magenta, Self>
Source§fn on_magenta(&self) -> BgColorDisplay<'_, Magenta, Self>
fn on_magenta(&self) -> BgColorDisplay<'_, Magenta, Self>
Source§fn purple(&self) -> FgColorDisplay<'_, Magenta, Self>
fn purple(&self) -> FgColorDisplay<'_, Magenta, Self>
Source§fn on_purple(&self) -> BgColorDisplay<'_, Magenta, Self>
fn on_purple(&self) -> BgColorDisplay<'_, Magenta, Self>
Source§fn cyan(&self) -> FgColorDisplay<'_, Cyan, Self>
fn cyan(&self) -> FgColorDisplay<'_, Cyan, Self>
Source§fn on_cyan(&self) -> BgColorDisplay<'_, Cyan, Self>
fn on_cyan(&self) -> BgColorDisplay<'_, Cyan, Self>
Source§fn white(&self) -> FgColorDisplay<'_, White, Self>
fn white(&self) -> FgColorDisplay<'_, White, Self>
Source§fn on_white(&self) -> BgColorDisplay<'_, White, Self>
fn on_white(&self) -> BgColorDisplay<'_, White, Self>
Source§fn default_color(&self) -> FgColorDisplay<'_, Default, Self>
fn default_color(&self) -> FgColorDisplay<'_, Default, Self>
Source§fn on_default_color(&self) -> BgColorDisplay<'_, Default, Self>
fn on_default_color(&self) -> BgColorDisplay<'_, Default, Self>
Source§fn bright_black(&self) -> FgColorDisplay<'_, BrightBlack, Self>
fn bright_black(&self) -> FgColorDisplay<'_, BrightBlack, Self>
Source§fn on_bright_black(&self) -> BgColorDisplay<'_, BrightBlack, Self>
fn on_bright_black(&self) -> BgColorDisplay<'_, BrightBlack, Self>
Source§fn bright_red(&self) -> FgColorDisplay<'_, BrightRed, Self>
fn bright_red(&self) -> FgColorDisplay<'_, BrightRed, Self>
Source§fn on_bright_red(&self) -> BgColorDisplay<'_, BrightRed, Self>
fn on_bright_red(&self) -> BgColorDisplay<'_, BrightRed, Self>
Source§fn bright_green(&self) -> FgColorDisplay<'_, BrightGreen, Self>
fn bright_green(&self) -> FgColorDisplay<'_, BrightGreen, Self>
Source§fn on_bright_green(&self) -> BgColorDisplay<'_, BrightGreen, Self>
fn on_bright_green(&self) -> BgColorDisplay<'_, BrightGreen, Self>
Source§fn bright_yellow(&self) -> FgColorDisplay<'_, BrightYellow, Self>
fn bright_yellow(&self) -> FgColorDisplay<'_, BrightYellow, Self>
Source§fn on_bright_yellow(&self) -> BgColorDisplay<'_, BrightYellow, Self>
fn on_bright_yellow(&self) -> BgColorDisplay<'_, BrightYellow, Self>
Source§fn bright_blue(&self) -> FgColorDisplay<'_, BrightBlue, Self>
fn bright_blue(&self) -> FgColorDisplay<'_, BrightBlue, Self>
Source§fn on_bright_blue(&self) -> BgColorDisplay<'_, BrightBlue, Self>
fn on_bright_blue(&self) -> BgColorDisplay<'_, BrightBlue, Self>
Source§fn bright_magenta(&self) -> FgColorDisplay<'_, BrightMagenta, Self>
fn bright_magenta(&self) -> FgColorDisplay<'_, BrightMagenta, Self>
Source§fn on_bright_magenta(&self) -> BgColorDisplay<'_, BrightMagenta, Self>
fn on_bright_magenta(&self) -> BgColorDisplay<'_, BrightMagenta, Self>
Source§fn bright_purple(&self) -> FgColorDisplay<'_, BrightMagenta, Self>
fn bright_purple(&self) -> FgColorDisplay<'_, BrightMagenta, Self>
Source§fn on_bright_purple(&self) -> BgColorDisplay<'_, BrightMagenta, Self>
fn on_bright_purple(&self) -> BgColorDisplay<'_, BrightMagenta, Self>
Source§fn bright_cyan(&self) -> FgColorDisplay<'_, BrightCyan, Self>
fn bright_cyan(&self) -> FgColorDisplay<'_, BrightCyan, Self>
Source§fn on_bright_cyan(&self) -> BgColorDisplay<'_, BrightCyan, Self>
fn on_bright_cyan(&self) -> BgColorDisplay<'_, BrightCyan, Self>
Source§fn bright_white(&self) -> FgColorDisplay<'_, BrightWhite, Self>
fn bright_white(&self) -> FgColorDisplay<'_, BrightWhite, Self>
Source§fn on_bright_white(&self) -> BgColorDisplay<'_, BrightWhite, Self>
fn on_bright_white(&self) -> BgColorDisplay<'_, BrightWhite, Self>
Source§fn bold(&self) -> BoldDisplay<'_, Self>
fn bold(&self) -> BoldDisplay<'_, Self>
Source§fn dimmed(&self) -> DimDisplay<'_, Self>
fn dimmed(&self) -> DimDisplay<'_, Self>
Source§fn italic(&self) -> ItalicDisplay<'_, Self>
fn italic(&self) -> ItalicDisplay<'_, Self>
Source§fn underline(&self) -> UnderlineDisplay<'_, Self>
fn underline(&self) -> UnderlineDisplay<'_, Self>
Source§fn blink(&self) -> BlinkDisplay<'_, Self>
fn blink(&self) -> BlinkDisplay<'_, Self>
Source§fn blink_fast(&self) -> BlinkFastDisplay<'_, Self>
fn blink_fast(&self) -> BlinkFastDisplay<'_, Self>
Source§fn reversed(&self) -> ReversedDisplay<'_, Self>
fn reversed(&self) -> ReversedDisplay<'_, Self>
Source§fn strikethrough(&self) -> StrikeThroughDisplay<'_, Self>
fn strikethrough(&self) -> StrikeThroughDisplay<'_, Self>
Source§fn color<Color>(&self, color: Color) -> FgDynColorDisplay<'_, Color, Self>where
Color: DynColor,
fn color<Color>(&self, color: Color) -> FgDynColorDisplay<'_, Color, Self>where
Color: DynColor,
OwoColorize::fg or
a color-specific method, such as OwoColorize::green, Read moreSource§fn on_color<Color>(&self, color: Color) -> BgDynColorDisplay<'_, Color, Self>where
Color: DynColor,
fn on_color<Color>(&self, color: Color) -> BgDynColorDisplay<'_, Color, Self>where
Color: DynColor,
OwoColorize::bg or
a color-specific method, such as OwoColorize::on_yellow, Read moreSource§fn fg_rgb<const R: u8, const G: u8, const B: u8>(
&self,
) -> FgColorDisplay<'_, CustomColor<R, G, B>, Self>
fn fg_rgb<const R: u8, const G: u8, const B: u8>( &self, ) -> FgColorDisplay<'_, CustomColor<R, G, B>, Self>
Source§fn bg_rgb<const R: u8, const G: u8, const B: u8>(
&self,
) -> BgColorDisplay<'_, CustomColor<R, G, B>, Self>
fn bg_rgb<const R: u8, const G: u8, const B: u8>( &self, ) -> BgColorDisplay<'_, CustomColor<R, G, B>, Self>
Source§fn truecolor(&self, r: u8, g: u8, b: u8) -> FgDynColorDisplay<'_, Rgb, Self>
fn truecolor(&self, r: u8, g: u8, b: u8) -> FgDynColorDisplay<'_, Rgb, Self>
Source§fn on_truecolor(&self, r: u8, g: u8, b: u8) -> BgDynColorDisplay<'_, Rgb, Self>
fn on_truecolor(&self, r: u8, g: u8, b: u8) -> BgDynColorDisplay<'_, Rgb, Self>
Source§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<T> ToCompactString for Twhere
T: Display,
impl<T> ToCompactString for Twhere
T: Display,
Source§fn try_to_compact_string(&self) -> Result<CompactString, ToCompactStringError>
fn try_to_compact_string(&self) -> Result<CompactString, ToCompactStringError>
ToCompactString::to_compact_string() Read moreSource§fn to_compact_string(&self) -> CompactString
fn to_compact_string(&self) -> CompactString
CompactString. Read more