Crate grafana

Crate grafana 

Source
Expand description

Async-first Rust SDK for the Grafana HTTP API.

§Quick start

Async (default):

use grafana::{Auth, Client};

let client = Client::builder("https://grafana.example.com")?
    .auth(Auth::bearer("TOKEN"))
    .build()?;

let health = client.health().get().await?;
println!("{health:?}");

Blocking (feature = blocking):

use grafana::{Auth, BlockingClient};

let client = BlockingClient::builder("https://grafana.example.com")?
    .auth(Auth::bearer("TOKEN"))
    .build()?;

let health = client.health().get()?;
println!("{health:?}");

Re-exports§

pub use auth::Auth;
pub use client::Client;
pub use error::Error;
pub use request_options::RequestOptions;
pub use response::ResponseBytes;

Modules§

api
Grafana API endpoint groups (service layer).
auth
client
error
request_options
response
types
Data types (request/response models).

Type Aliases§

Result