use anyhow::Result;
use prometheus::Registry;
use sqlx::PgPool;
use std::collections::HashMap;
#[macro_use]
mod register_macro;
pub trait Collector {
fn name(&self) -> &'static str;
fn register_metrics(&self, registry: &Registry) -> Result<()>;
fn collect(&self, pool: &PgPool) -> impl std::future::Future<Output = Result<()>> + Send;
fn enabled_by_default(&self) -> bool;
}
register_collectors! {
default => DefaultCollector,
vacuum => VacuumCollector
}
pub mod config;
pub mod registry;