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.
33 34 35 36 |
# File 'lib/kafka/protocol/api_versions_response.rb', line 33 def initialize(error_code:, apis:) @error_code = error_code @apis = apis end |
Instance Attribute Details
#apis ⇒ Object (readonly)
Returns the value of attribute apis.
31 32 33 |
# File 'lib/kafka/protocol/api_versions_response.rb', line 31 def apis @apis end |
#error_code ⇒ Object (readonly)
Returns the value of attribute error_code.
31 32 33 |
# File 'lib/kafka/protocol/api_versions_response.rb', line 31 def error_code @error_code end |
Class Method Details
.decode(decoder) ⇒ Object
38 39 40 41 42 43 44 45 46 47 48 49 50 |
# File 'lib/kafka/protocol/api_versions_response.rb', line 38 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 |