pub struct NamesSection {
pub spec: Option<String>,
pub fallback: Option<String>,
pub number_encoding: Option<String>,
pub hold_days: Option<i64>,
}Expand description
How agents are named.
Reload: needs a restart. The namer is built once and handed to the provisioner.
Fields§
§spec: Option<String>A --names-shaped spec: hostname, a +-joined word-list spec,
toml:<path>, cmd:<program args...>, or one of the generated
forms. Mirrors --names, and takes exactly the same spellings —
--help lists them and says what each one discloses.
fallback: Option<String>A second naming to fall back on, same shapes as spec. Mirrors
--names-if-down.
number_encoding: Option<String>How a number is written into a label: the n and t slots, and
the counter and timestamp namings. Mirrors
--number-encoding. One key rather than one per number, because
a label carrying a count and a time should read in one number
system rather than two.
Reasonable values: decimal or base32. decimal (the
default) writes the count as anyone would write it, up to twenty
characters. base32 is lowercase Crockford, which drops the four
symbols a person misreads and fits the same range in thirteen
characters; a deployment past a million accounts, or one whose
template already spends most of a DNS label on words, gets shorter
names from it. Both are legal in a label at every count, so the
choice is about length and readability rather than validity.
hold_days: Option<i64>Days a released name stays held before it can be taken again.
Mirrors --name-hold.
Reasonable range: 1 to 365. The hold is what keeps a name from being handed to a second agent while callers still have the first one cached, so the low end is however long anything caches a name — a day covers a DNS TTL and a restart. The high end holds a name for a year, which suits a deployment where a name is a published identity somebody wrote down. The cost of a long hold is names: a word-list naming with a small pool runs out of unheld names sooner. The built-in default is 30 days.
Trait Implementations§
Source§impl Clone for NamesSection
impl Clone for NamesSection
Source§fn clone(&self) -> NamesSection
fn clone(&self) -> NamesSection
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for NamesSection
impl Debug for NamesSection
Source§impl Default for NamesSection
impl Default for NamesSection
Source§fn default() -> NamesSection
fn default() -> NamesSection
Source§impl<'de> Deserialize<'de> for NamesSection
impl<'de> Deserialize<'de> for NamesSection
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>,
Source§impl PartialEq for NamesSection
impl PartialEq for NamesSection
Source§fn eq(&self, other: &NamesSection) -> bool
fn eq(&self, other: &NamesSection) -> bool
self and other values to be equal, and is used by ==.