Module: Servicy::ExtraMethods
- Defined in:
- lib/api.rb
Instance Method Summary collapse
-
#search_query ⇒ Object
This method is used by the client discovery to build the query that can be used to find remote instances of this service.
Instance Method Details
#search_query ⇒ Object
This method is used by the client discovery to build the query that can be used to find remote instances of this service
130 131 132 133 134 135 136 137 138 |
# File 'lib/api.rb', line 130 def search_query domain = self.const_get(:DOMAIN) rescue `hostname`.strip name = "#{domain}.#{self.to_s.downcase}" version = self.const_get(:VERSION) rescue '1.0.0' port = self.const_get(:PORT) rescue 1234 heartbeat_port = self.const_get(:HEARTBEAT_PORT) rescue port { name: name, host: 'localhost', port: port, version: version, heartbeat_port: heartbeat_port } end |