mod counter;
mod gauge;
mod histogram;
mod labels;
mod registry;

use pyo3::prelude::*;

#[pymodule]
fn _promrs(m: &Bound<'_, PyModule>) -> PyResult<()> {
    m.add_class::<registry::PyRegistry>()?;
    m.add("REGISTRY", registry::DEFAULT_REGISTRY.clone())?;
    m.add_class::<counter::PyCounter>()?;
    m.add_class::<counter::PyCounterChild>()?;
    m.add_class::<gauge::PyGauge>()?;
    m.add_class::<gauge::PyGaugeChild>()?;
    m.add_class::<histogram::PyHistogram>()?;
    m.add_class::<histogram::PyHistogramChild>()?;
    m.add_function(wrap_pyfunction!(registry::generate_latest, m)?)?;
    m.add(
        "CONTENT_TYPE_LATEST",
        "application/openmetrics-text; version=1.0.0; charset=utf-8",
    )?;
    Ok(())
}
