Kayrock.CreatePartitions.V1.Request (kayrock v1.0.1)

Copy Markdown View Source

Kayrock-generated request struct for Kafka create_partitions v1 API messages

The schema of this API is

[
  topic_partitions: {:array,
   [
     topic: :string,
     new_partitions: [count: :int32, assignment: {:array, {:array, :int32}}]
   ]},
  timeout: :int32,
  validate_only: :boolean
]

Summary

Types

t()

Request struct for the Kafka create_partitions API v1

Functions

Returns the Kafka API key for this API

Returns the API version (1) implemented by this module

Returns a function that can be used to deserialize the wire response from the broker for this message type

Returns the schema of this message

Serialize a message to binary data for transfer to a Kafka broker

Types

t()

@type t() :: %Kayrock.CreatePartitions.V1.Request{
  client_id: nil | binary(),
  correlation_id: nil | integer(),
  timeout: nil | integer(),
  topic_partitions: [
    %{
      topic: nil | binary(),
      new_partitions: %{count: nil | integer(), assignment: [[nil | integer()]]}
    }
  ],
  validate_only: nil | integer()
}

Request struct for the Kafka create_partitions API v1

Functions

api_key()

@spec api_key() :: integer()

Returns the Kafka API key for this API

api_vsn()

@spec api_vsn() :: integer()

Returns the API version (1) implemented by this module

response_deserializer()

@spec response_deserializer() :: (binary() ->
                              {Kayrock.CreatePartitions.V1.Response.t(),
                               binary()})

Returns a function that can be used to deserialize the wire response from the broker for this message type

schema()

@spec schema() :: term()

Returns the schema of this message

See above.

serialize(struct)

@spec serialize(t()) :: iodata()

Serialize a message to binary data for transfer to a Kafka broker