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§
Sourcefn scan_partition(
&self,
client: &Client,
partition: u16,
) -> impl Future<Output = ScanResult> + Send
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.