pub fn series<'a, T>(
    host: &str,
    selectors: T
) -> Result<SeriesQueryBuilder, Error>
where T: IntoIterator, T::Item: Borrow<Selector<'a>>,
Expand description

Create a SeriesQueryBuilder to apply filters to a series metadata query before sending it to Prometheus.

This is just a convenience function for one-off requests, see Client::series.

use prometheus_http_query::{series, Selector};

#[tokio::main(flavor = "current_thread")]
async fn main() -> Result<(), anyhow::Error> {
    let select = Selector::new()
        .eq("handler", "/api/v1/query");

    let response = series("http://localhost:9090", &[select])?.get().await;

    assert!(response.is_ok());

    Ok(())
}