pub struct ParkSection {
pub ttl_seconds: Option<u64>,
pub rate_limit: Option<u32>,
pub rate_window_seconds: Option<u64>,
}Expand description
How bot.did.parkKey holds a key and bounds who may park one.
Reload: needs a restart. The values are read once, into the router’s own state.
Fields§
§ttl_seconds: Option<u64>How long a parked key is held, in seconds. Mirrors --park-key-ttl.
Reasonable range: 60 to 3600. The key waits for a person to run
didbot operate on another machine, so it has to outlast reading a
fingerprint off one screen and typing on another; past an hour a
park nobody admitted is holding a name against the next machine to
register it. Default 600.
rate_limit: Option<u32>How many parks and lookups one caller address may make per window.
Mirrors --park-key-rate-limit.
Reasonable range: 1 to 1000. A machine parks once; six covers one retrying through a flaky first boot. Default 6.
rate_window_seconds: Option<u64>The window the limit is measured over, in seconds. Mirrors
--park-key-rate-window.
Reasonable range: 1 to 86400. Default 600, matching the default hold, so one address gets as many parks per window as could be live at once.
Trait Implementations§
Source§impl Clone for ParkSection
impl Clone for ParkSection
Source§fn clone(&self) -> ParkSection
fn clone(&self) -> ParkSection
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 ParkSection
impl Debug for ParkSection
Source§impl Default for ParkSection
impl Default for ParkSection
Source§fn default() -> ParkSection
fn default() -> ParkSection
Source§impl<'de> Deserialize<'de> for ParkSection
impl<'de> Deserialize<'de> for ParkSection
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 ParkSection
impl PartialEq for ParkSection
Source§fn eq(&self, other: &ParkSection) -> bool
fn eq(&self, other: &ParkSection) -> bool
self and other values to be equal, and is used by ==.