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

Shared helper functions for building DeleteTopics requests across all versions.

Summary

Functions

Builds a DeleteTopics request from a template struct and options.

Extracts common fields from request options.

Functions

Link to this function

build_request_from_template(request_template, opts)

View Source
@spec build_request_from_template(map(), Keyword.t()) :: map()

Builds a DeleteTopics request from a template struct and options.

Populates topic_names and timeout_ms on the template from the :topics and :timeout options. Works for all versions (V0-V4) since the request schema only differs in encoding (handled by Kayrock).

Link to this function

extract_common_fields(opts)

View Source
@spec extract_common_fields(Keyword.t()) :: map()

Extracts common fields from request options.

Required Options

  • :topics - List of topic names to delete
  • :timeout - Request timeout in milliseconds

Returns

A map with extracted fields.