pub struct BootstrapCacheConfig {
pub cache_dir: PathBuf,
pub max_peers: usize,
pub epsilon: f64,
pub stale_threshold: Duration,
pub save_interval: Duration,
pub quality_update_interval: Duration,
pub cleanup_interval: Duration,
pub min_peers_to_save: usize,
pub enable_file_locking: bool,
pub weights: QualityWeights,
}Expand description
Configuration for the bootstrap cache
Fields§
§cache_dir: PathBufDirectory for cache files
max_peers: usizeMaximum number of peers to cache (default: 20,000)
epsilon: f64Epsilon for exploration rate (default: 0.1 = 10%) Higher values = more exploration of unknown peers
stale_threshold: DurationTime after which peers are considered stale (default: 7 days)
save_interval: DurationInterval between background save operations (default: 5 minutes)
quality_update_interval: DurationInterval between quality score recalculations (default: 1 hour)
cleanup_interval: DurationInterval between stale peer cleanup (default: 6 hours)
min_peers_to_save: usizeMinimum peers required before saving (prevents empty cache overwrite)
enable_file_locking: boolEnable file locking for multi-process safety
weights: QualityWeightsQuality score weights
Implementations§
Source§impl BootstrapCacheConfig
impl BootstrapCacheConfig
Sourcepub fn builder() -> BootstrapCacheConfigBuilder
pub fn builder() -> BootstrapCacheConfigBuilder
Create a new configuration builder
Trait Implementations§
Source§impl Clone for BootstrapCacheConfig
impl Clone for BootstrapCacheConfig
Source§fn clone(&self) -> BootstrapCacheConfig
fn clone(&self) -> BootstrapCacheConfig
Returns a duplicate of the value. Read more
1.0.0 · 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 BootstrapCacheConfig
impl Debug for BootstrapCacheConfig
Auto Trait Implementations§
impl Freeze for BootstrapCacheConfig
impl RefUnwindSafe for BootstrapCacheConfig
impl Send for BootstrapCacheConfig
impl Sync for BootstrapCacheConfig
impl Unpin for BootstrapCacheConfig
impl UnwindSafe for BootstrapCacheConfig
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