Kayrock.Metadata.V1.Response (kayrock v0.1.12) View Source

Kayrock-generated response struct for Kafka metadata v1 API messages

The schema of this API is

[
  brokers: {:array,
   [node_id: :int32, host: :string, port: :int32, rack: :nullable_string]},
  controller_id: :int32,
  topic_metadata: {:array,
   [
     error_code: :int16,
     topic: :string,
     is_internal: :boolean,
     partition_metadata: {:array,
      [
        error_code: :int16,
        partition: :int32,
        leader: :int32,
        replicas: {:array, :int32},
        isr: {:array, :int32}
      ]}
   ]}
]

Link to this section Summary

Types

t()

Response struct for the Kafka metadata API v1

Functions

Returns the Kafka API key for this API

Returns the API version (1) implemented by this module

Deserialize data for this version of this API

Returns the schema of this message

Link to this section Types

Specs

t() :: %Kayrock.Metadata.V1.Response{
  brokers: [
    %{
      node_id: nil | integer(),
      host: nil | binary(),
      port: nil | integer(),
      rack: nil | binary()
    }
  ],
  controller_id: nil | integer(),
  correlation_id: integer(),
  topic_metadata: [
    %{
      error_code: nil | integer(),
      topic: nil | binary(),
      is_internal: nil | integer(),
      partition_metadata: [
        %{
          error_code: nil | integer(),
          partition: nil | integer(),
          leader: nil | integer(),
          replicas: [nil | integer()],
          isr: [nil | integer()]
        }
      ]
    }
  ]
}

Response struct for the Kafka metadata API v1

Link to this section Functions

Specs

api_key() :: integer()

Returns the Kafka API key for this API

Specs

api_vsn() :: integer()

Returns the API version (1) implemented by this module

Specs

deserialize(binary()) :: {t(), binary()}

Deserialize data for this version of this API

Specs

schema() :: term()

Returns the schema of this message

See above.