View Source KafkaEx.Protocol.Kayrock.DeleteTopics.ResponseHelpers (kafka_ex v1.0.0-rc.1)

Shared helper functions for parsing DeleteTopics responses across all versions.

Summary

Functions

Builds DeleteTopics struct from parsed topic results.

Parses topic error codes from Kayrock response format to TopicResult structs.

Parses a V0 DeleteTopics response (no throttle_time_ms).

Parses a V1+ DeleteTopics response (includes throttle_time_ms).

Functions

Link to this function

build_response(topic_results, throttle_time_ms \\ nil)

View Source

Builds DeleteTopics struct from parsed topic results.

Link to this function

parse_topic_results(topic_error_codes)

View Source
@spec parse_topic_results(list()) :: [KafkaEx.Messages.DeleteTopics.TopicResult.t()]

Parses topic error codes from Kayrock response format to TopicResult structs.

Link to this function

parse_v0_response(response)

View Source
@spec parse_v0_response(map()) :: {:ok, KafkaEx.Messages.DeleteTopics.t()}

Parses a V0 DeleteTopics response (no throttle_time_ms).

Link to this function

parse_v1_plus_response(response)

View Source
@spec parse_v1_plus_response(map()) :: {:ok, KafkaEx.Messages.DeleteTopics.t()}

Parses a V1+ DeleteTopics response (includes throttle_time_ms).