Class: EVSS::VSOSearch::Configuration

Inherits:
Configuration show all
Defined in:
lib/evss/vso_search/configuration.rb

Overview

HTTP client configuration for the Service, sets the base path and a service name for breakers and metrics.

Constant Summary collapse

API_VERSION =
Settings.evss.versions.common

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

Methods inherited from Configuration

#cert?, #client_cert, #client_key, #connection, #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_pathString

Returns Base path for VSO search URLs.

Returns:

  • (String)

    Base path for VSO search URLs.



17
18
19
# File 'lib/evss/vso_search/configuration.rb', line 17

def base_path
  "#{Settings.evss.url}/wss-common-services-web-#{API_VERSION}/rest/vsoSearch/#{API_VERSION}/"
end

#mock_enabled?Boolean

HTTP client configuration for the Service, sets the base path, a default timeout, and a service name for breakers and metrics.

Returns:

  • (Boolean)


32
33
34
# File 'lib/evss/vso_search/configuration.rb', line 32

def mock_enabled?
  Settings.evss.mock_vso_search || false
end

#service_nameString

Returns Service name to use in breakers and metrics.

Returns:

  • (String)

    Service name to use in breakers and metrics.



24
25
26
# File 'lib/evss/vso_search/configuration.rb', line 24

def service_name
  'EVSS/VSOSearch'
end