crabka-client-admin 0.3.2

Operator-side admin client for Crabka clusters
Documentation

crabka-client-admin

Crates.io Docs.rs CI

Operator-side admin client for Crabka clusters.

This crate is part of Crabka, a Rust implementation of Kafka-compatible infrastructure and clients.

Install

crabka-client-admin = "0.3.2"

For workspace development, use the path dependency from this repository instead.

Usage example

Create a topic and fetch its metadata from the controller:

use std::collections::BTreeMap;
use crabka_client_admin::{AdminClient, CreateTopicSpec};

# async fn run() -> Result<(), Box<dyn std::error::Error>> {
let mut admin = AdminClient::connect(&["127.0.0.1:9092".to_string()]).await?;
admin.create_topics(&[CreateTopicSpec {
    name: "orders".into(),
    partitions: 3,
    replicas: 1,
    configs: BTreeMap::new(),
}], 30_000).await?;

let metadata = admin.metadata(&["orders"]).await?;
println!("topics: {:?}", metadata.topics);
# Ok(())
# }

Documentation

API documentation is published on docs.rs/crabka-client-admin. The repository README contains project-wide setup, development, and release notes.

License

Apache-2.0. See the repository LICENSE and NOTICE files for details.