pub struct DaemonSection {
pub log_json: bool,
pub log_level: LogLevel,
pub environment: String,
pub socket: Option<PathBuf>,
pub enabled_dogs: Vec<String>,
pub adopted_dogs: BTreeMap<String, PathBuf>,
pub channel_dogs: Vec<String>,
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
environment: StringThe environment every sheep resolves in unless it sets its own.
A shepherd supervising real processes on a host is production unless somebody says otherwise.
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.
channel_dogs: Vec<String>Adopted dogs whose --version answer asked for the shepherd channel,
so they are spawned with channel and shutdown_with_message set.
shep adopt writes this from the dog’s own answer, never from an
operator’s flag, and shep rehome removes it. Here rather than in
dogs.toml for the reason Self::adopted_dogs gives. A name
absent from Self::adopted_dogs is inert here.
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§impl Debug for DaemonSection
impl Debug for DaemonSection
Source§impl Default for DaemonSection
Not derived: DaemonSection::environment defaults to "production",
which String’s own Default cannot express.
impl Default for DaemonSection
Not derived: DaemonSection::environment defaults to "production",
which String’s own Default cannot express.