cortexdb_client/lib.rs
1//! Typed gRPC client for the CortexDB sidecar (`cortexdb-grpc`).
2//!
3//! ```no_run
4//! # async fn demo() -> Result<(), Box<dyn std::error::Error + Send + Sync>> {
5//! use cortexdb_client::CortexClient;
6//! let client = CortexClient::builder("http://127.0.0.1:47821")
7//! .token("s3cret")
8//! .connect()
9//! .await?;
10//! let info = client.admin().info(cortexdb_client::proto::InfoRequest {}).await?;
11//! println!("server version: {}", info.into_inner().version);
12//! # Ok(()) }
13//! ```
14
15mod client;
16#[cfg(feature = "managed-server")]
17pub mod sidecar;
18
19pub use client::{AuthInterceptor, CortexClient, CortexClientBuilder};
20
21/// Generated protobuf/tonic types for `cortexdb.v1`.
22pub mod proto {
23 include!("gen/cortexdb.v1.rs");
24}