Class: Kafka::Protocol::DeleteTopicsResponse

Inherits:
Object
  • Object
show all
Defined in:
lib/kafka/protocol/delete_topics_response.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(errors:) ⇒ DeleteTopicsResponse

Returns a new instance of DeleteTopicsResponse.



9
10
11
# File 'lib/kafka/protocol/delete_topics_response.rb', line 9

def initialize(errors:)
  @errors = errors
end

Instance Attribute Details

#errorsObject (readonly)

Returns the value of attribute errors.



7
8
9
# File 'lib/kafka/protocol/delete_topics_response.rb', line 7

def errors
  @errors
end

Class Method Details

.decode(decoder) ⇒ Object



13
14
15
16
17
18
19
20
21
22
# File 'lib/kafka/protocol/delete_topics_response.rb', line 13

def self.decode(decoder)
  errors = decoder.array do
    topic = decoder.string
    error_code = decoder.int16

    [topic, error_code]
  end

  new(errors: errors)
end