pub struct FetcherConfig { /* private fields */ }Expand description
Runtime configuration for the block fetcher pipeline.
All instances must be constructed via FetcherConfig::builder or FetcherConfig::new
so invariants are validated before any consumer observes the values.
Implementations§
Source§impl FetcherConfig
impl FetcherConfig
Sourcepub fn builder() -> FetcherConfigBuilder
pub fn builder() -> FetcherConfigBuilder
Returns a builder to incrementally construct and validate a configuration.
Sourcepub fn new(params: FetcherConfigParams) -> Result<Self>
pub fn new(params: FetcherConfigParams) -> Result<Self>
Constructs a configuration directly from the provided values.
Prefer FetcherConfig::builder for ergonomics when many values use defaults.
Callers that already have concrete runtime parameters can use this method to enforce
validation without going through the builder.
Sourcepub fn rpc_password(&self) -> &str
pub fn rpc_password(&self) -> &str
RPC password.
Sourcepub fn thread_count(&self) -> usize
pub fn thread_count(&self) -> usize
Number of worker threads configured for the fetcher.
Sourcepub fn max_batch_size_mb(&self) -> usize
pub fn max_batch_size_mb(&self) -> usize
Maximum megabytes per batch that workers target.
Sourcepub fn reorg_window_size(&self) -> usize
pub fn reorg_window_size(&self) -> usize
Number of blocks tracked in the reorg window.
Sourcepub fn start_height(&self) -> u64
pub fn start_height(&self) -> u64
Starting height requested when the pipeline boots.
Sourcepub fn rpc_timeout(&self) -> Duration
pub fn rpc_timeout(&self) -> Duration
Per-RPC timeout applied to the JSON-RPC client.
Sourcepub fn metrics_interval(&self) -> Duration
pub fn metrics_interval(&self) -> Duration
Interval used by the telemetry reporter.
Sourcepub fn queue_max_size_mb(&self) -> usize
pub fn queue_max_size_mb(&self) -> usize
Maximum megabytes of queued block data allowed in the ordered queue.
Sourcepub fn tip_idle_backoff(&self) -> Duration
pub fn tip_idle_backoff(&self) -> Duration
Idle backoff used when workers poll near the blockchain tip.
Sourcepub fn tip_refresh_interval(&self) -> Duration
pub fn tip_refresh_interval(&self) -> Duration
Interval between background tip refresh RPC calls.
Sourcepub fn rpc_max_request_body_bytes(&self) -> usize
pub fn rpc_max_request_body_bytes(&self) -> usize
Maximum allowed HTTP request body bytes for RPC calls.
Sourcepub fn rpc_max_response_body_bytes(&self) -> usize
pub fn rpc_max_response_body_bytes(&self) -> usize
Maximum allowed HTTP response body bytes for RPC calls.
Trait Implementations§
Source§impl Clone for FetcherConfig
impl Clone for FetcherConfig
Source§fn clone(&self) -> FetcherConfig
fn clone(&self) -> FetcherConfig
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for FetcherConfig
impl Debug for FetcherConfig
Source§impl PartialEq for FetcherConfig
impl PartialEq for FetcherConfig
impl Eq for FetcherConfig
impl StructuralPartialEq for FetcherConfig
Auto Trait Implementations§
impl Freeze for FetcherConfig
impl RefUnwindSafe for FetcherConfig
impl Send for FetcherConfig
impl Sync for FetcherConfig
impl Unpin for FetcherConfig
impl UnwindSafe for FetcherConfig
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,
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.