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