Class: Kafka::Protocol::GroupCoordinatorResponse

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

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(error_code:, coordinator_id:, coordinator_host:, coordinator_port:) ⇒ GroupCoordinatorResponse

Returns a new instance of GroupCoordinatorResponse.



8
9
10
11
12
13
# File 'lib/kafka/protocol/group_coordinator_response.rb', line 8

def initialize(error_code:, coordinator_id:, coordinator_host:, coordinator_port:)
  @error_code = error_code
  @coordinator_id = coordinator_id
  @coordinator_host = coordinator_host
  @coordinator_port = coordinator_port
end

Instance Attribute Details

#coordinator_hostObject (readonly)

Returns the value of attribute coordinator_host.



6
7
8
# File 'lib/kafka/protocol/group_coordinator_response.rb', line 6

def coordinator_host
  @coordinator_host
end

#coordinator_idObject (readonly)

Returns the value of attribute coordinator_id.



6
7
8
# File 'lib/kafka/protocol/group_coordinator_response.rb', line 6

def coordinator_id
  @coordinator_id
end

#coordinator_portObject (readonly)

Returns the value of attribute coordinator_port.



6
7
8
# File 'lib/kafka/protocol/group_coordinator_response.rb', line 6

def coordinator_port
  @coordinator_port
end

#error_codeObject (readonly)

Returns the value of attribute error_code.



4
5
6
# File 'lib/kafka/protocol/group_coordinator_response.rb', line 4

def error_code
  @error_code
end

Class Method Details

.decode(decoder) ⇒ Object



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

def self.decode(decoder)
  new(
    error_code: decoder.int16,
    coordinator_id: decoder.int32,
    coordinator_host: decoder.string,
    coordinator_port: decoder.int32,
  )
end