Skip to main content

DomainStatsSource

Type Alias DomainStatsSource 

Source
pub type DomainStatsSource = Arc<dyn Fn() -> HashMap<String, u64> + Send + Sync>;
Expand description

Callback type used to feed the per-recipient-domain counter from a queue.

The closure must return a fresh snapshot each time it is called. The metrics layer is responsible for invoking it (either on every scrape or via the periodic refresh task spawned by MetricsCollector::spawn_domain_stats_refresher).

Aliased Type§

pub struct DomainStatsSource { /* private fields */ }