Class: Pinot::BrokerDto

Inherits:
Object
  • Object
show all
Defined in:
lib/pinot/controller_response.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(hash) ⇒ BrokerDto

Returns a new instance of BrokerDto.



5
6
7
8
9
# File 'lib/pinot/controller_response.rb', line 5

def initialize(hash)
  @host = hash["host"]
  @port = hash["port"].to_i
  @instance_name = hash["instanceName"]
end

Instance Attribute Details

#hostObject (readonly)

Returns the value of attribute host.



3
4
5
# File 'lib/pinot/controller_response.rb', line 3

def host
  @host
end

#instance_nameObject (readonly)

Returns the value of attribute instance_name.



3
4
5
# File 'lib/pinot/controller_response.rb', line 3

def instance_name
  @instance_name
end

#portObject (readonly)

Returns the value of attribute port.



3
4
5
# File 'lib/pinot/controller_response.rb', line 3

def port
  @port
end

Instance Method Details

#broker_addressObject



11
12
13
# File 'lib/pinot/controller_response.rb', line 11

def broker_address
  "#{@host}:#{@port}"
end