Class: Kafka::Protocol::FindCoordinatorResponse

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

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(error_code:, error_message:, coordinator_id:, coordinator_host:, coordinator_port:) ⇒ FindCoordinatorResponse

Returns a new instance of FindCoordinatorResponse.



10
11
12
13
14
15
# File 'lib/kafka/protocol/find_coordinator_response.rb', line 10

def initialize(error_code:, error_message:, 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.



8
9
10
# File 'lib/kafka/protocol/find_coordinator_response.rb', line 8

def coordinator_host
  @coordinator_host
end

#coordinator_idObject (readonly)

Returns the value of attribute coordinator_id.



8
9
10
# File 'lib/kafka/protocol/find_coordinator_response.rb', line 8

def coordinator_id
  @coordinator_id
end

#coordinator_portObject (readonly)

Returns the value of attribute coordinator_port.



8
9
10
# File 'lib/kafka/protocol/find_coordinator_response.rb', line 8

def coordinator_port
  @coordinator_port
end

#error_codeObject (readonly)

Returns the value of attribute error_code.



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

def error_code
  @error_code
end

#error_messageObject (readonly)

Returns the value of attribute error_message.



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

def error_message
  @error_message
end

Class Method Details

.decode(decoder) ⇒ Object



17
18
19
20
21
22
23
24
25
26
# File 'lib/kafka/protocol/find_coordinator_response.rb', line 17

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