pg_exporter 0.4.2

PostgreSQL metric exporter for Prometheus
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
use crate::cli::actions::Action;
use crate::exporter::new;
use anyhow::Result;

/// Handle the create action
pub async fn handle(action: Action) -> Result<()> {
    match action {
        Action::Run {
            port,
            dsn,
            collectors,
        } => {
            new(port, dsn, collectors).await?;
        }
    }

    Ok(())
}