Class: Lighthouse::Facilities::Configuration
Instance Attribute Summary
#base_request_headers, #open_timeout, #read_timeout, #request_types, #user_agent
Class Method Summary
collapse
Instance Method Summary
collapse
#breakers_error_threshold, #breakers_exception_handler, #breakers_matcher, #breakers_service, #create_new_breakers_service, #current_module, #request_options, #service_exception
Class Method Details
18
19
20
|
# File 'lib/lighthouse/facilities/configuration.rb', line 18
def self.
super.merge('apiKey' => Settings.lighthouse.facilities.api_key)
end
|
Instance Method Details
#base_path ⇒ Object
10
11
12
|
# File 'lib/lighthouse/facilities/configuration.rb', line 10
def base_path
Settings.lighthouse.facilities.url
end
|
#connection ⇒ Object
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
|
# File 'lib/lighthouse/facilities/configuration.rb', line 22
def connection
Faraday.new(base_path, headers: , request: request_options) do |conn|
conn.use :breakers
conn.request :instrumentation, name: 'lighthouse.facilities.request.faraday'
conn.response :raise_custom_error, error_prefix: service_name
conn.response :lighthouse_facilities_errors
conn.adapter Faraday.default_adapter
end
end
|
#service_name ⇒ Object
14
15
16
|
# File 'lib/lighthouse/facilities/configuration.rb', line 14
def service_name
'Lighthouse_Facilities'
end
|