Skip to main content

Scanner

Trait Scanner 

Source
pub trait Scanner:
    Send
    + Sync
    + 'static {
    // Required methods
    fn name(&self) -> &'static str;
    fn interval(&self) -> Duration;
    fn scan_partition(
        &self,
        client: &Client,
        partition: u16,
    ) -> impl Future<Output = ScanResult> + Send;
}
Expand description

Trait for background partition scanners.

Each implementation scans one aspect of execution state (lease expiry, delayed promotion, index consistency) across all partitions at a configured interval.

Required Methods§

Source

fn name(&self) -> &'static str

Human-readable name for logging.

Source

fn interval(&self) -> Duration

How often to run a full scan across all partitions.

Source

fn scan_partition( &self, client: &Client, partition: u16, ) -> impl Future<Output = ScanResult> + Send

Scan a single partition. Called once per partition per cycle.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§