pub fn label_values(
    host: &str,
    label: &str
) -> Result<LabelValuesQueryBuilder, Error>
Expand description

Create a LabelValuesQueryBuilder to apply filters to a query for the label values endpoint before sending it to Prometheus.

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

use prometheus_http_query::label_values;

#[tokio::main(flavor = "current_thread")]
async fn main() -> Result<(), anyhow::Error> {
    let response = label_values("http://localhost:9090", "job")?.get().await;

    assert!(response.is_ok());

    Ok(())
}