pub fn route_until_reporting<const N: usize, W: WaitStrategy>(
router: &FanoutRouter<N>,
cfg: RouterLoopConfig,
wait: &mut W,
should_stop: impl FnMut() -> bool,
report_period: Duration,
report: impl FnMut(RouterCounters),
) -> RouterCountersExpand description
Run a fanout router until should_stop() returns true, periodically reporting counters.
Notes:
- Reporting is best-effort and uses
std::time::Instant, so this isstd-only. reportis invoked at most once perreport_period, and once at the end.