Class: UAT::Discovery::Configuration
- Inherits:
-
Object
- Object
- UAT::Discovery::Configuration
- Defined in:
- lib/uat/discovery/configuration.rb
Instance Method Summary collapse
-
#append_service_path ⇒ String
Path that will be appended to discovery host/port, no matter what service name.
- #discover_paths? ⇒ Boolean
-
#initialize(config_hash) ⇒ Configuration
constructor
A new instance of Configuration.
- #local_mode? ⇒ Boolean
- #local_service_urls_keyed_by_service_name ⇒ Hash<String, Array<String>>
-
#metadata_property_for_path ⇒ String
The property name in discovery key/value metadata hash containing a service’s path.
- #protocol ⇒ String
-
#service_metadata_key_value_prefix ⇒ String
The prefix to prepend to a service name, used to retrieve discovery key value requests for a service.
- #url ⇒ String
Constructor Details
#initialize(config_hash) ⇒ Configuration
Returns a new instance of Configuration.
5 6 7 |
# File 'lib/uat/discovery/configuration.rb', line 5 def initialize(config_hash) @config_hash = config_hash end |
Instance Method Details
#append_service_path ⇒ String
Returns path that will be appended to discovery host/port, no matter what service name.
30 31 32 |
# File 'lib/uat/discovery/configuration.rb', line 30 def append_service_path @config_hash['append_service_path'] end |
#discover_paths? ⇒ Boolean
20 21 22 |
# File 'lib/uat/discovery/configuration.rb', line 20 def discover_paths? @config_hash['discover_paths'] end |
#local_mode? ⇒ Boolean
15 16 17 |
# File 'lib/uat/discovery/configuration.rb', line 15 def local_mode? @config_hash['local_mode'] end |
#local_service_urls_keyed_by_service_name ⇒ Hash<String, Array<String>>
10 11 12 |
# File 'lib/uat/discovery/configuration.rb', line 10 def local_service_urls_keyed_by_service_name @config_hash['local_service_urls_keyed_by_service_name'] end |
#metadata_property_for_path ⇒ String
Returns the property name in discovery key/value metadata hash containing a service’s path.
40 41 42 |
# File 'lib/uat/discovery/configuration.rb', line 40 def @config_hash['metadata_property_for_path'] end |
#protocol ⇒ String
25 26 27 |
# File 'lib/uat/discovery/configuration.rb', line 25 def protocol @config_hash['protocol'] end |
#service_metadata_key_value_prefix ⇒ String
Returns the prefix to prepend to a service name, used to retrieve discovery key value requests for a service.
35 36 37 |
# File 'lib/uat/discovery/configuration.rb', line 35 def @config_hash['service_metadata_key_value_prefix'] end |
#url ⇒ String
45 46 47 |
# File 'lib/uat/discovery/configuration.rb', line 45 def url @config_hash['url'] end |