Class: EVSS::Dependents::Configuration
- Inherits:
-
Configuration
- Object
- Common::Client::Configuration::Base
- Common::Client::Configuration::REST
- Configuration
- EVSS::Dependents::Configuration
- Defined in:
- lib/evss/dependents/configuration.rb
Overview
HTTP client configuration for the Service, sets the base path and a service name for breakers and metrics.
Instance Attribute Summary
Attributes inherited from Common::Client::Configuration::Base
#base_request_headers, #open_timeout, #read_timeout, #request_types, #user_agent
Instance Method Summary collapse
-
#base_path ⇒ String
Base path for dependents URLs.
-
#connection ⇒ Faraday::Connection
Creates the a connection with middleware for mapping errors, parsing json, and adding breakers functionality.
-
#service_name ⇒ String
Service name to use in breakers and metrics.
Methods inherited from Configuration
#cert?, #client_cert, #client_key, #mock_enabled?, #root_ca, #set_evss_middlewares, #ssl_options
Methods inherited from Common::Client::Configuration::Base
#breakers_error_threshold, #breakers_exception_handler, #breakers_matcher, #breakers_service, #create_new_breakers_service, #current_module, #request_options, #service_exception
Instance Method Details
#base_path ⇒ String
Returns Base path for dependents URLs.
15 16 17 |
# File 'lib/evss/dependents/configuration.rb', line 15 def base_path "#{Settings.evss.url}/wss-686-services-web-2.6/rest/" end |
#connection ⇒ Faraday::Connection
Creates the a connection with middleware for mapping errors, parsing json, and adding breakers functionality.
31 32 33 34 35 |
# File 'lib/evss/dependents/configuration.rb', line 31 def connection @conn ||= Faraday.new(base_path, request: , ssl: ) do |faraday| set_evss_middlewares(faraday, snakecase: false) end end |
#service_name ⇒ String
Returns Service name to use in breakers and metrics.
22 23 24 |
# File 'lib/evss/dependents/configuration.rb', line 22 def service_name 'EVSS/Dependents' end |