add Broker#to_s

This commit is contained in:
Ben Osheroff 2015-06-11 15:25:01 -07:00
parent e7e1a2a7ac
commit 7edd297071
1 changed files with 6 additions and 1 deletions

View File

@ -3,7 +3,12 @@ require 'hermann_lib'
module Hermann
module Discovery
class Metadata
Broker = Struct.new(:id, :host, :port)
Broker = Struct.new(:id, :host, :port) do
def to_s
"#{host}:#{port}"
end
end
Topic = Struct.new(:name, :partitions)
Partition = Struct.new(:id, :leader, :replicas, :insync_replicas)