mirror of https://github.com/reiseburo/hermann
add Broker#to_s
This commit is contained in:
parent
e7e1a2a7ac
commit
7edd297071
|
@ -3,7 +3,12 @@ require 'hermann_lib'
|
||||||
module Hermann
|
module Hermann
|
||||||
module Discovery
|
module Discovery
|
||||||
class Metadata
|
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)
|
Topic = Struct.new(:name, :partitions)
|
||||||
Partition = Struct.new(:id, :leader, :replicas, :insync_replicas)
|
Partition = Struct.new(:id, :leader, :replicas, :insync_replicas)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue