Class: Kafka::Protocol::ApiVersionsResponse
- Inherits:
-
Object
- Object
- Kafka::Protocol::ApiVersionsResponse
- Defined in:
- lib/kafka/protocol/api_versions_response.rb
Defined Under Namespace
Classes: ApiInfo
Instance Attribute Summary collapse
-
#apis ⇒ Object
readonly
Returns the value of attribute apis.
-
#error_code ⇒ Object
readonly
Returns the value of attribute error_code.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(error_code:, apis:) ⇒ ApiVersionsResponse
constructor
A new instance of ApiVersionsResponse.
Constructor Details
#initialize(error_code:, apis:) ⇒ ApiVersionsResponse
Returns a new instance of ApiVersionsResponse.
27 28 29 30 |
# File 'lib/kafka/protocol/api_versions_response.rb', line 27 def initialize(error_code:, apis:) @error_code = error_code @apis = apis end |
Instance Attribute Details
#apis ⇒ Object (readonly)
Returns the value of attribute apis.
25 26 27 |
# File 'lib/kafka/protocol/api_versions_response.rb', line 25 def apis @apis end |
#error_code ⇒ Object (readonly)
Returns the value of attribute error_code.
25 26 27 |
# File 'lib/kafka/protocol/api_versions_response.rb', line 25 def error_code @error_code end |
Class Method Details
.decode(decoder) ⇒ Object
32 33 34 35 36 37 38 39 40 41 42 43 44 |
# File 'lib/kafka/protocol/api_versions_response.rb', line 32 def self.decode(decoder) error_code = decoder.int16 apis = decoder.array do ApiInfo.new( api_key: decoder.int16, min_version: decoder.int16, max_version: decoder.int16, ) end new(error_code: error_code, apis: apis) end |