Class: RudderAnalyticsSync::Configuration
- Inherits:
-
Object
- Object
- RudderAnalyticsSync::Configuration
- Defined in:
- lib/rudder_analytics_sync/configuration.rb
Constant Summary
Constants included from Utils
Utils::UTC_OFFSET_WITHOUT_COLON, Utils::UTC_OFFSET_WITH_COLON
Instance Attribute Summary collapse
-
#data_plane_url ⇒ Object
readonly
Returns the value of attribute data_plane_url.
-
#gzip ⇒ Object
readonly
Returns the value of attribute gzip.
-
#http_options ⇒ Object
readonly
Returns the value of attribute http_options.
-
#logger ⇒ Object
readonly
Returns the value of attribute logger.
-
#max_retries ⇒ Object
readonly
Returns the value of attribute max_retries.
-
#max_retry_delay ⇒ Object
readonly
Returns the value of attribute max_retry_delay.
-
#on_error ⇒ Object
readonly
Returns the value of attribute on_error.
-
#respect_retry_after ⇒ Object
readonly
Returns the value of attribute respect_retry_after.
-
#retry_base_delay ⇒ Object
readonly
Returns the value of attribute retry_base_delay.
-
#retry_enabled ⇒ Object
readonly
Returns the value of attribute retry_enabled.
-
#retry_jitter_ratio ⇒ Object
readonly
Returns the value of attribute retry_jitter_ratio.
-
#stub ⇒ Object
readonly
Returns the value of attribute stub.
-
#write_key ⇒ Object
readonly
Returns the value of attribute write_key.
Instance Method Summary collapse
-
#initialize(settings = {}) ⇒ Configuration
constructor
A new instance of Configuration.
Methods included from Logging
Methods included from Utils
#date_in_iso8601, #formatted_offset, included, #isoify_dates, #isoify_dates!, #maybe_datetime_in_iso8601, #seconds_to_utc_offset, #symbolize_keys, #time_in_iso8601, #uid, #valid_date?
Constructor Details
#initialize(settings = {}) ⇒ Configuration
Returns a new instance of Configuration.
14 15 16 17 18 19 20 21 22 23 24 25 26 27 |
# File 'lib/rudder_analytics_sync/configuration.rb', line 14 def initialize(settings = {}) symbolized_settings = symbolize_keys(settings) @write_key = symbolized_settings[:write_key] @data_plane_url = symbolized_settings[:data_plane_url] @on_error = symbolized_settings[:on_error] || proc {} @stub = symbolized_settings[:stub] @logger = default_logger(symbolized_settings[:logger]) @http_options = { use_ssl: true } .merge(symbolized_settings[:http_options] || {}) @gzip = symbolized_settings[:gzip] configure_retry(symbolized_settings) raise ArgumentError, 'Missing required option :write_key' \ unless @write_key end |
Instance Attribute Details
#data_plane_url ⇒ Object (readonly)
Returns the value of attribute data_plane_url.
10 11 12 |
# File 'lib/rudder_analytics_sync/configuration.rb', line 10 def data_plane_url @data_plane_url end |
#gzip ⇒ Object (readonly)
Returns the value of attribute gzip.
10 11 12 |
# File 'lib/rudder_analytics_sync/configuration.rb', line 10 def gzip @gzip end |
#http_options ⇒ Object (readonly)
Returns the value of attribute http_options.
10 11 12 |
# File 'lib/rudder_analytics_sync/configuration.rb', line 10 def @http_options end |
#logger ⇒ Object (readonly)
Returns the value of attribute logger.
10 11 12 |
# File 'lib/rudder_analytics_sync/configuration.rb', line 10 def logger @logger end |
#max_retries ⇒ Object (readonly)
Returns the value of attribute max_retries.
10 11 12 |
# File 'lib/rudder_analytics_sync/configuration.rb', line 10 def max_retries @max_retries end |
#max_retry_delay ⇒ Object (readonly)
Returns the value of attribute max_retry_delay.
10 11 12 |
# File 'lib/rudder_analytics_sync/configuration.rb', line 10 def max_retry_delay @max_retry_delay end |
#on_error ⇒ Object (readonly)
Returns the value of attribute on_error.
10 11 12 |
# File 'lib/rudder_analytics_sync/configuration.rb', line 10 def on_error @on_error end |
#respect_retry_after ⇒ Object (readonly)
Returns the value of attribute respect_retry_after.
10 11 12 |
# File 'lib/rudder_analytics_sync/configuration.rb', line 10 def respect_retry_after @respect_retry_after end |
#retry_base_delay ⇒ Object (readonly)
Returns the value of attribute retry_base_delay.
10 11 12 |
# File 'lib/rudder_analytics_sync/configuration.rb', line 10 def retry_base_delay @retry_base_delay end |
#retry_enabled ⇒ Object (readonly)
Returns the value of attribute retry_enabled.
10 11 12 |
# File 'lib/rudder_analytics_sync/configuration.rb', line 10 def retry_enabled @retry_enabled end |
#retry_jitter_ratio ⇒ Object (readonly)
Returns the value of attribute retry_jitter_ratio.
10 11 12 |
# File 'lib/rudder_analytics_sync/configuration.rb', line 10 def retry_jitter_ratio @retry_jitter_ratio end |
#stub ⇒ Object (readonly)
Returns the value of attribute stub.
10 11 12 |
# File 'lib/rudder_analytics_sync/configuration.rb', line 10 def stub @stub end |
#write_key ⇒ Object (readonly)
Returns the value of attribute write_key.
10 11 12 |
# File 'lib/rudder_analytics_sync/configuration.rb', line 10 def write_key @write_key end |