Skip to main content

run_schema_validator

Function run_schema_validator 

Source
async fn run_schema_validator(
    tx: UnboundedSender<SchemaValidationError>,
    interval: impl Fn() -> Duration,
    validate: impl AsyncFnMut() -> Vec<SchemaValidationError>,
)
Expand description

Runs validate once per interval and sends each failure to tx once.

Stops after the first failure that ends the whole source, or once the receiver is dropped.