Class: SupportOps::Slack::Configuration::Config

Inherits:
Object
  • Object
show all
Defined in:
lib/support_ops_slack/slack/configuration.rb

Overview

Defined the class Config within the module SupportOps::Slack::Configuration

Author:

  • Jason Colyer

Since:

  • 1.0.0

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#retry_backoffInteger

multiplier applied to the retry_interval after each retry attempt, causing exponential backoff. Defaults to 2

Returns:

  • (Integer)

    the current value of retry_backoff



54
55
56
# File 'lib/support_ops_slack/slack/configuration.rb', line 54

def retry_backoff
  @retry_backoff
end

#retry_exceptionsArray

Specifies which types of exceptions or errors should trigger the retry mechanism.

Returns:

  • (Array)

    the current value of retry_exceptions



54
55
56
# File 'lib/support_ops_slack/slack/configuration.rb', line 54

def retry_exceptions
  @retry_exceptions
end

#retry_intervalInteger

The base time interval (typically in seconds or milliseconds) between retry attempts. Defaults to 1

Returns:

  • (Integer)

    the current value of retry_interval



54
55
56
# File 'lib/support_ops_slack/slack/configuration.rb', line 54

def retry_interval
  @retry_interval
end

#retry_maxInteger

The maximum number of retry attempts that will be made when an operation fails. Defaults to 5

Returns:

  • (Integer)

    the current value of retry_max



54
55
56
# File 'lib/support_ops_slack/slack/configuration.rb', line 54

def retry_max
  @retry_max
end

#retry_randomnessFloat

Adds a random element to the retry interval to prevent “thundering herd” problems where many systems retry simultaneously. Defaults to 0.5

Returns:

  • (Float)

    the current value of retry_randomness



54
55
56
# File 'lib/support_ops_slack/slack/configuration.rb', line 54

def retry_randomness
  @retry_randomness
end

#urlString

The URL to use

Returns:

  • (String)

    the current value of url



54
55
56
# File 'lib/support_ops_slack/slack/configuration.rb', line 54

def url
  @url
end

Instance Method Details

#clientObject

Since:

  • 1.0.0



66
67
68
69
70
71
72
73
74
75
# File 'lib/support_ops_slack/slack/configuration.rb', line 66

def client
  @client ||= Client.new(
    retry_max: retry_max,
    retry_interval: retry_interval,
    retry_randomness: retry_randomness,
    retry_backoff: retry_backoff,
    retry_exceptions: retry_exceptions,
    url: url
  )
end