pub struct BackfillEngine { /* private fields */ }Expand description
Parallel backfill engine.
Construct with BackfillEngine::new and execute with BackfillEngine::run.
Implementations§
Source§impl BackfillEngine
impl BackfillEngine
Sourcepub fn new(
config: BackfillConfig,
provider: Arc<dyn BlockDataProvider>,
filter: EventFilter,
chain: impl Into<String>,
) -> Self
pub fn new( config: BackfillConfig, provider: Arc<dyn BlockDataProvider>, filter: EventFilter, chain: impl Into<String>, ) -> Self
Create a new engine. The provider is shared across all worker tasks.
Sourcepub async fn progress(&self) -> BackfillProgress
pub async fn progress(&self) -> BackfillProgress
Return a snapshot of the current progress.
Safe to call from any task while [run] is executing.
Sourcepub async fn run(&self) -> Result<BackfillResult, IndexerError>
pub async fn run(&self) -> Result<BackfillResult, IndexerError>
Execute the backfill.
Spawns up to config.concurrency concurrent worker tasks, each
processing one segment at a time. Blocks until all segments have
either completed or exhausted their retry budget.
Auto Trait Implementations§
impl Freeze for BackfillEngine
impl !RefUnwindSafe for BackfillEngine
impl Send for BackfillEngine
impl Sync for BackfillEngine
impl Unpin for BackfillEngine
impl UnsafeUnpin for BackfillEngine
impl !UnwindSafe for BackfillEngine
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