pub struct DaemonSection {
pub log_json: bool,
pub log_level: LogLevel,
pub socket: Option<PathBuf>,
pub enabled_dogs: Vec<String>,
pub adopted_dogs: BTreeMap<String, PathBuf>,
pub boot_first_dogs: Vec<String>,
pub max_cron_sleep: Option<UpDuration>,
}Expand description
The [daemon] section
Fields§
§log_json: boolEmit the daemon’s own logs as JSON lines
log_level: LogLevelLowest severity of the daemon’s own records that reaches its log
socket: Option<PathBuf>Control-socket path override (default: $SHEP_HOME/run/shep.sock)
enabled_dogs: Vec<String>Dogs to autostart with the daemon (shep enable writes this)
adopted_dogs: BTreeMap<String, PathBuf>Where an adopted dog’s binary lives, keyed by dog name
(shep adopt writes this; shep rehome removes it).
A name in Self::enabled_dogs with no entry here is a built-in
dog, an argv branch of the shep binary itself. Not recorded inside
[dog.<name>]: that table is the dog’s own opaque configuration,
and a shep-owned key inside it would collide with a third-party
dog’s schema.
boot_first_dogs: Vec<String>Dogs that run before every sheep, rather than after the flock.
The default position for a dog is a final stage, for the reason
boot.rs gives: a metrics dog must not answer for a flock that is not
up yet. A log-rotation dog is the opposite case, since it has to be
running before a sheep starts writing. shep cannot tell which is
which, because an adopted dog is a third-party binary, so the
operator says.
Here rather than in dogs.toml for the reason Self::adopted_dogs
gives: that file’s [<name>] table is the dog’s own opaque
configuration and a shep-owned key inside it would collide with a
third-party dog’s schema.
A name absent from Self::enabled_dogs is inert here.
max_cron_sleep: Option<UpDuration>Longest a cron worker sleeps before re-deriving its next occurrence.
Shorter recovers faster from a suspended laptop or an NTP step and costs proportionally more wakeups per cron-configured sheep; longer is cheaper and drifts further. Unset means the daemon’s own default. There is no upper bound: a very long value only degrades to sleeping straight through to the occurrence, which still fires.
Trait Implementations§
Source§impl Clone for DaemonSection
impl Clone for DaemonSection
Source§fn clone(&self) -> DaemonSection
fn clone(&self) -> DaemonSection
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more