Skip to main content

to_kraft

Function to_kraft 

Source
pub fn to_kraft(
    rec: &MetadataRecord,
    image: &MetadataImage,
) -> Result<KraftMetadataRecord, TranslateError>
Expand description

Convert a single MetadataRecord to its KIP-631 counterpart.

Whole-map config variants may fan out to N Config records; callers that must preserve every key must use to_kraft_records. For a fanned record, this function returns only the first translated key.

ยงErrors

TranslateError::NoCounterpart for raft control records and delete-ACL filters, TranslateError::UnknownTopicName when a topic/partition references a topic absent from image, TranslateError::InvalidValue for out-of-range enum values and node ids that exceed i32, and TranslateError::InvalidReference for a partition absent from image or a broker that is not one of its replicas.