Module: Philiprehberger::RetryKit

Defined in:
lib/philiprehberger/retry_kit.rb,
lib/philiprehberger/retry_kit/budget.rb,
lib/philiprehberger/retry_kit/backoff.rb,
lib/philiprehberger/retry_kit/version.rb,
lib/philiprehberger/retry_kit/executor.rb,
lib/philiprehberger/retry_kit/circuit_breaker.rb

Defined Under Namespace

Modules: Backoff Classes: Budget, CircuitBreaker, DeadlineExceededError, Error, Executor, TotalTimeoutError

Constant Summary collapse

VERSION =
'0.4.0'

Class Method Summary collapse

Class Method Details

.run(**options) { ... } ⇒ Object

Execute a block with retry logic.

Parameters:

  • options (Hash)

    options passed to Executor.new

Yields:

  • the block to execute

Returns:

  • the block’s return value

See Also:



22
23
24
# File 'lib/philiprehberger/retry_kit.rb', line 22

def self.run(**options, &)
  Executor.new(**options).call(&)
end