pub struct BootstrapConfig {
pub channels: Vec<BootstrapChannel>,
pub max_descriptor_age: u64,
pub min_success_channels: usize,
pub refresh_interval: u64,
pub randomize_first_refresh: bool,
}Expand description
Configuration for multi-channel bootstrap descriptor distribution.
Fields§
§channels: Vec<BootstrapChannel>List of channels to try (in order of preference)
max_descriptor_age: u64Maximum age of descriptors to accept (seconds)
min_success_channels: usizeMinimum number of channels that must succeed
refresh_interval: u64Background refresh interval (seconds)
randomize_first_refresh: boolWhether to use random delay before first refresh
Implementations§
Source§impl BootstrapConfig
impl BootstrapConfig
Sourcepub fn new(channels: Vec<BootstrapChannel>) -> Self
pub fn new(channels: Vec<BootstrapChannel>) -> Self
Create a new bootstrap config with the given channels
Sourcepub fn with_cdn(
self,
url: impl Into<String>,
provider: impl Into<String>,
) -> Self
pub fn with_cdn( self, url: impl Into<String>, provider: impl Into<String>, ) -> Self
Add a CDN channel
Sourcepub fn with_telegram(self, bot_username: impl Into<String>) -> Self
pub fn with_telegram(self, bot_username: impl Into<String>) -> Self
Add a Telegram channel
Trait Implementations§
Source§impl Clone for BootstrapConfig
impl Clone for BootstrapConfig
Source§fn clone(&self) -> BootstrapConfig
fn clone(&self) -> BootstrapConfig
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for BootstrapConfig
impl Debug for BootstrapConfig
Source§impl Default for BootstrapConfig
impl Default for BootstrapConfig
Source§impl<'de> Deserialize<'de> for BootstrapConfig
impl<'de> Deserialize<'de> for BootstrapConfig
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>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for BootstrapConfig
impl RefUnwindSafe for BootstrapConfig
impl Send for BootstrapConfig
impl Sync for BootstrapConfig
impl Unpin for BootstrapConfig
impl UnsafeUnpin for BootstrapConfig
impl UnwindSafe for BootstrapConfig
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
Mutably borrows from an owned value. Read more