Class: Kafka::Protocol::MetadataRequest
- Inherits:
-
Object
- Object
- Kafka::Protocol::MetadataRequest
- Defined in:
- lib/kafka/protocol/metadata_request.rb
Instance Method Summary collapse
- #api_key ⇒ Object
- #api_version ⇒ Object
- #encode(encoder) ⇒ Object
-
#initialize(topics: []) ⇒ MetadataRequest
constructor
A request for cluster metadata.
- #response_class ⇒ Object
Constructor Details
#initialize(topics: []) ⇒ MetadataRequest
A request for cluster metadata.
10 11 12 |
# File 'lib/kafka/protocol/metadata_request.rb', line 10 def initialize(topics: []) @topics = topics end |
Instance Method Details
#api_key ⇒ Object
14 15 16 |
# File 'lib/kafka/protocol/metadata_request.rb', line 14 def api_key TOPIC_METADATA_API end |
#api_version ⇒ Object
18 19 20 |
# File 'lib/kafka/protocol/metadata_request.rb', line 18 def api_version 1 end |
#encode(encoder) ⇒ Object
26 27 28 |
# File 'lib/kafka/protocol/metadata_request.rb', line 26 def encode(encoder) encoder.write_array(@topics) {|topic| encoder.write_string(topic) } end |
#response_class ⇒ Object
22 23 24 |
# File 'lib/kafka/protocol/metadata_request.rb', line 22 def response_class Protocol::MetadataResponse end |