Class: Kafka::BrokerInfo

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(node_id:, host:, port:) ⇒ BrokerInfo

Returns a new instance of BrokerInfo


6
7
8
9
10
# File 'lib/kafka/broker_info.rb', line 6

def initialize(node_id:, host:, port:)
  @node_id = node_id
  @host = host
  @port = port
end

Instance Attribute Details

#hostObject (readonly)

Returns the value of attribute host


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

def host
  @host
end

#node_idObject (readonly)

Returns the value of attribute node_id


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

def node_id
  @node_id
end

#portObject (readonly)

Returns the value of attribute port


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

def port
  @port
end

Instance Method Details

#to_sObject


12
13
14
# File 'lib/kafka/broker_info.rb', line 12

def to_s
  "#{host}:#{port} (node_id=#{node_id})"
end