Skip to main content

DaemonSection

Struct DaemonSection 

Source
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: bool

Emit the daemon’s own logs as JSON lines

§log_level: LogLevel

Lowest 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

Source§

fn clone(&self) -> DaemonSection

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for DaemonSection

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for DaemonSection

Source§

fn default() -> DaemonSection

Returns the “default value” for a type. Read more
Source§

impl<'de> Deserialize<'de> for DaemonSection

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl PartialEq for DaemonSection

Source§

fn eq(&self, other: &DaemonSection) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for DaemonSection

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

impl<T> DynClone for T
where T: Clone,

Source§

fn __clone_box(&self, _: Private) -> *mut ()

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.