Skip to main content

encode_vote_response

Function encode_vote_response 

Source
pub fn encode_vote_response(
    top_level_error: i16,
    partition_error: i16,
    vote_granted: bool,
    leader: &QuorumLeader,
    version: i16,
) -> Bytes
Expand description

Encodes a Vote response body (api 52) at version, the version of the request it answers.

A top_level_error other than 0 is Kafka’s bare error response: the code and nothing else. Otherwise the body names the metadata partition with partition_error, the grant and the responder’s leader view.