pub struct WhistleSection {
pub allow_control: bool,
}Expand description
The [whistle] section
One key, and it is a gate rather than a tuning knob: shep whistle’s four
control tools (start_sheep, stop_sheep, restart_sheep,
reload_sheep) exist only when this is true, and its five read-only
tools exist regardless.
This lives in the shepherd’s config file and nowhere else. There is no
--allow-control flag and no SHEP_* variable, deliberately: spec §14.7
rules that whistle’s gate is daemon config because config is auditable and
flags are per-invocation. That is a legibility argument, not a
containment one — --home/SHEP_HOME already choose which shep.toml
gets read, so a flag would open nothing those don’t already; a boolean in
a file just leaves a diff and an mtime an operator can audit.
The shepherd itself never reads this key — shep whistle reads the file
directly, at startup, in its own process. It is here because this struct is
the grammar of shep.toml: RawDaemonConfig denies unknown fields, so a
[whistle] section the grammar does not know about would refuse the whole
file to boot rather than being silently ignored.
Debug is derived rather than redacted (IR-41): one boolean, no secret,
nothing a {:?} could leak.
Fields§
§allow_control: boolWhether shep whistle offers its control tools. Default false.
Trait Implementations§
Source§impl Clone for WhistleSection
impl Clone for WhistleSection
Source§fn clone(&self) -> WhistleSection
fn clone(&self) -> WhistleSection
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for WhistleSection
Source§impl Debug for WhistleSection
impl Debug for WhistleSection
Source§impl Default for WhistleSection
impl Default for WhistleSection
Source§fn default() -> WhistleSection
fn default() -> WhistleSection
Source§impl<'de> Deserialize<'de> for WhistleSectionwhere
WhistleSection: Default,
impl<'de> Deserialize<'de> for WhistleSectionwhere
WhistleSection: Default,
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>,
impl Eq for WhistleSection
Source§impl PartialEq for WhistleSection
impl PartialEq for WhistleSection
impl StructuralPartialEq for WhistleSection
Auto Trait Implementations§
impl Freeze for WhistleSection
impl RefUnwindSafe for WhistleSection
impl Send for WhistleSection
impl Sync for WhistleSection
impl Unpin for WhistleSection
impl UnsafeUnpin for WhistleSection
impl UnwindSafe for WhistleSection
Blanket Implementations§
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>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.