Class: CARMA::Client::MuleSoftAuthTokenConfiguration
Instance Attribute Summary
#base_request_headers, #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 ⇒ Object
28
29
30
|
# File 'lib/carma/client/mule_soft_auth_token_configuration.rb', line 28
def base_path
"#{settings.token_url}/"
end
|
#connection ⇒ Object
6
7
8
9
10
11
12
|
# File 'lib/carma/client/mule_soft_auth_token_configuration.rb', line 6
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
14
15
16
|
# File 'lib/carma/client/mule_soft_auth_token_configuration.rb', line 14
def service_name
self.class.name
end
|
#settings ⇒ Object
22
23
24
|
# File 'lib/carma/client/mule_soft_auth_token_configuration.rb', line 22
def settings
Settings.form_10_10cg.carma.mulesoft.auth
end
|
#timeout ⇒ Object
18
19
20
|
# File 'lib/carma/client/mule_soft_auth_token_configuration.rb', line 18
def timeout
settings.key?(:timeout) ? settings.timeout : 30
end
|