Class: SourceMonitor::Configuration::HTTPSettings
- Inherits:
-
Object
- Object
- SourceMonitor::Configuration::HTTPSettings
- Defined in:
- lib/source_monitor/configuration/http_settings.rb
Instance Attribute Summary collapse
-
#headers ⇒ Object
Returns the value of attribute headers.
-
#max_redirects ⇒ Object
Returns the value of attribute max_redirects.
-
#open_timeout ⇒ Object
Returns the value of attribute open_timeout.
-
#proxy ⇒ Object
Returns the value of attribute proxy.
-
#retry_backoff_factor ⇒ Object
Returns the value of attribute retry_backoff_factor.
-
#retry_interval ⇒ Object
Returns the value of attribute retry_interval.
-
#retry_interval_randomness ⇒ Object
Returns the value of attribute retry_interval_randomness.
-
#retry_max ⇒ Object
Returns the value of attribute retry_max.
-
#retry_statuses ⇒ Object
Returns the value of attribute retry_statuses.
-
#ssl_ca_file ⇒ Object
Returns the value of attribute ssl_ca_file.
-
#ssl_ca_path ⇒ Object
Returns the value of attribute ssl_ca_path.
-
#ssl_verify ⇒ Object
Returns the value of attribute ssl_verify.
-
#timeout ⇒ Object
Returns the value of attribute timeout.
-
#user_agent ⇒ Object
Returns the value of attribute user_agent.
Instance Method Summary collapse
-
#initialize ⇒ HTTPSettings
constructor
A new instance of HTTPSettings.
- #reset! ⇒ Object
Constructor Details
#initialize ⇒ HTTPSettings
Returns a new instance of HTTPSettings.
21 22 23 |
# File 'lib/source_monitor/configuration/http_settings.rb', line 21 def initialize reset! end |
Instance Attribute Details
#headers ⇒ Object
Returns the value of attribute headers.
6 7 8 |
# File 'lib/source_monitor/configuration/http_settings.rb', line 6 def headers @headers end |
#max_redirects ⇒ Object
Returns the value of attribute max_redirects.
6 7 8 |
# File 'lib/source_monitor/configuration/http_settings.rb', line 6 def max_redirects @max_redirects end |
#open_timeout ⇒ Object
Returns the value of attribute open_timeout.
6 7 8 |
# File 'lib/source_monitor/configuration/http_settings.rb', line 6 def open_timeout @open_timeout end |
#proxy ⇒ Object
Returns the value of attribute proxy.
6 7 8 |
# File 'lib/source_monitor/configuration/http_settings.rb', line 6 def proxy @proxy end |
#retry_backoff_factor ⇒ Object
Returns the value of attribute retry_backoff_factor.
6 7 8 |
# File 'lib/source_monitor/configuration/http_settings.rb', line 6 def retry_backoff_factor @retry_backoff_factor end |
#retry_interval ⇒ Object
Returns the value of attribute retry_interval.
6 7 8 |
# File 'lib/source_monitor/configuration/http_settings.rb', line 6 def retry_interval @retry_interval end |
#retry_interval_randomness ⇒ Object
Returns the value of attribute retry_interval_randomness.
6 7 8 |
# File 'lib/source_monitor/configuration/http_settings.rb', line 6 def retry_interval_randomness @retry_interval_randomness end |
#retry_max ⇒ Object
Returns the value of attribute retry_max.
6 7 8 |
# File 'lib/source_monitor/configuration/http_settings.rb', line 6 def retry_max @retry_max end |
#retry_statuses ⇒ Object
Returns the value of attribute retry_statuses.
6 7 8 |
# File 'lib/source_monitor/configuration/http_settings.rb', line 6 def retry_statuses @retry_statuses end |
#ssl_ca_file ⇒ Object
Returns the value of attribute ssl_ca_file.
6 7 8 |
# File 'lib/source_monitor/configuration/http_settings.rb', line 6 def ssl_ca_file @ssl_ca_file end |
#ssl_ca_path ⇒ Object
Returns the value of attribute ssl_ca_path.
6 7 8 |
# File 'lib/source_monitor/configuration/http_settings.rb', line 6 def ssl_ca_path @ssl_ca_path end |
#ssl_verify ⇒ Object
Returns the value of attribute ssl_verify.
6 7 8 |
# File 'lib/source_monitor/configuration/http_settings.rb', line 6 def ssl_verify @ssl_verify end |
#timeout ⇒ Object
Returns the value of attribute timeout.
6 7 8 |
# File 'lib/source_monitor/configuration/http_settings.rb', line 6 def timeout @timeout end |
#user_agent ⇒ Object
Returns the value of attribute user_agent.
6 7 8 |
# File 'lib/source_monitor/configuration/http_settings.rb', line 6 def user_agent @user_agent end |
Instance Method Details
#reset! ⇒ Object
25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 |
# File 'lib/source_monitor/configuration/http_settings.rb', line 25 def reset! @timeout = 15 @open_timeout = 5 @max_redirects = 5 @user_agent = default_user_agent @proxy = nil @headers = {} @retry_max = 4 @retry_interval = 0.5 @retry_interval_randomness = 0.5 @retry_backoff_factor = 2 @retry_statuses = nil @ssl_ca_file = nil @ssl_ca_path = nil @ssl_verify = true end |