pub async fn label_values(
    host: &str,
    label: &str,
    selectors: Option<Vec<Selector<'_>>>,
    start: Option<i64>,
    end: Option<i64>
) -> Result<Vec<String>, Error>
Expand description

Retrieve all label values for a label name (or use Selectors to select the time series to read label values from)

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

use prometheus_http_query::{label_values, Error};

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

    assert!(response.is_ok());

    Ok(())
}