Class: UAT::Discovery::Configuration

Inherits:
Object
  • Object
show all
Defined in:
lib/uat/discovery/configuration.rb

Instance Method Summary collapse

Constructor Details

#initialize(config_hash) ⇒ Configuration

Returns a new instance of Configuration.

Parameters:

  • config_hash (Hash)


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_pathString

Returns path that will be appended to discovery host/port, no matter what service name.

Returns:

  • (String)

    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

Returns:

  • (Boolean)


20
21
22
# File 'lib/uat/discovery/configuration.rb', line 20

def discover_paths?
  @config_hash['discover_paths']
end

#local_mode?Boolean

Returns:

  • (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_nameHash<String, Array<String>>

Returns:

  • (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_pathString

Returns the property name in discovery key/value metadata hash containing a service’s path.

Returns:

  • (String)

    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

#protocolString

Returns:

  • (String)


25
26
27
# File 'lib/uat/discovery/configuration.rb', line 25

def protocol
  @config_hash['protocol']
end

#service_metadata_key_value_prefixString

Returns the prefix to prepend to a service name, used to retrieve discovery key value requests for a service.

Returns:

  • (String)

    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

#urlString

Returns:

  • (String)


45
46
47
# File 'lib/uat/discovery/configuration.rb', line 45

def url
  @config_hash['url']
end