Class: TempmailSdk::RetryConfig
- Inherits:
-
Object
- Object
- TempmailSdk::RetryConfig
- Defined in:
- lib/tempmail_sdk/types.rb
Overview
重试配置
Instance Attribute Summary collapse
-
#initial_delay ⇒ Object
Returns the value of attribute initial_delay.
-
#max_delay ⇒ Object
Returns the value of attribute max_delay.
-
#max_retries ⇒ Object
Returns the value of attribute max_retries.
-
#timeout ⇒ Object
Returns the value of attribute timeout.
Instance Method Summary collapse
-
#initialize(max_retries: 2, initial_delay: 1.0, max_delay: 5.0, timeout: 15.0) ⇒ RetryConfig
constructor
A new instance of RetryConfig.
Constructor Details
#initialize(max_retries: 2, initial_delay: 1.0, max_delay: 5.0, timeout: 15.0) ⇒ RetryConfig
Returns a new instance of RetryConfig.
110 111 112 113 114 115 |
# File 'lib/tempmail_sdk/types.rb', line 110 def initialize(max_retries: 2, initial_delay: 1.0, max_delay: 5.0, timeout: 15.0) @max_retries = max_retries @initial_delay = initial_delay @max_delay = max_delay @timeout = timeout end |
Instance Attribute Details
#initial_delay ⇒ Object
Returns the value of attribute initial_delay.
104 105 106 |
# File 'lib/tempmail_sdk/types.rb', line 104 def initial_delay @initial_delay end |
#max_delay ⇒ Object
Returns the value of attribute max_delay.
104 105 106 |
# File 'lib/tempmail_sdk/types.rb', line 104 def max_delay @max_delay end |
#max_retries ⇒ Object
Returns the value of attribute max_retries.
104 105 106 |
# File 'lib/tempmail_sdk/types.rb', line 104 def max_retries @max_retries end |
#timeout ⇒ Object
Returns the value of attribute timeout.
104 105 106 |
# File 'lib/tempmail_sdk/types.rb', line 104 def timeout @timeout end |