Class: CARMA::Client::MuleSoftConfiguration
Instance Attribute Summary
#open_timeout, #read_timeout, #request_types, #user_agent
Instance Method Summary
collapse
#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
39
40
41
|
# File 'lib/carma/client/mule_soft_configuration.rb', line 39
def base_path
"#{settings.host}/va-carma-caregiver-papi/api/"
end
|
6
7
8
9
10
11
|
# File 'lib/carma/client/mule_soft_configuration.rb', line 6
def
super.merge({
client_id: settings.client_id,
client_secret: settings.client_secret
})
end
|
#connection ⇒ Object
13
14
15
16
17
18
19
|
# File 'lib/carma/client/mule_soft_configuration.rb', line 13
def connection
Faraday.new(base_path) do |conn|
conn.use :breakers
conn.request :instrumentation, name: service_name
conn.adapter Faraday.default_adapter
end
end
|
#service_name ⇒ Object
21
22
23
|
# File 'lib/carma/client/mule_soft_configuration.rb', line 21
def service_name
self.class.name
end
|
#settings ⇒ Config::Options
32
33
34
|
# File 'lib/carma/client/mule_soft_configuration.rb', line 32
def settings
Settings.form_10_10cg.carma.mulesoft
end
|
#timeout ⇒ Integer
setting. Defaults to 10 if unset.
27
28
29
|
# File 'lib/carma/client/mule_soft_configuration.rb', line 27
def timeout
settings.key?(:timeout) ? settings.timeout : 10
end
|