crabka-metadata 0.3.4

Versioned metadata record types + immutable image for Crabka
Documentation

crabka-metadata

Crates.io Docs.rs CI

Versioned metadata record types + immutable image for Crabka.

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

Install

crabka-metadata = "0.3.2"

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

Usage example

Apply controller records to build an immutable metadata image:

use crabka_metadata::{MetadataImage, MetadataRecord, TopicRecord};
use uuid::Uuid;

let mut image = MetadataImage::new(Uuid::new_v4());
let topic_id = Uuid::new_v4();
image.apply(&MetadataRecord::V1Topic(TopicRecord {
    name: "orders".into(),
    topic_id,
    partitions: 3,
    replication_factor: 1,
}));

assert_eq!(image.topic("orders").unwrap().topic_id, topic_id);

Documentation

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

License

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