Class: BreakerMachines::DSL::ParallelFallbackWrapper

Inherits:
Object
  • Object
show all
Defined in:
lib/breaker_machines/dsl/parallel_fallback_wrapper.rb

Overview

Wrapper to indicate parallel execution for fallbacks

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(fallbacks) ⇒ ParallelFallbackWrapper

Returns a new instance of ParallelFallbackWrapper.



9
10
11
# File 'lib/breaker_machines/dsl/parallel_fallback_wrapper.rb', line 9

def initialize(fallbacks)
  @fallbacks = fallbacks
end

Instance Attribute Details

#fallbacksObject (readonly)

Returns the value of attribute fallbacks.



7
8
9
# File 'lib/breaker_machines/dsl/parallel_fallback_wrapper.rb', line 7

def fallbacks
  @fallbacks
end

Instance Method Details

#call(error) ⇒ Object

Raises:

  • (NotImplementedError)


13
14
15
16
17
# File 'lib/breaker_machines/dsl/parallel_fallback_wrapper.rb', line 13

def call(error)
  # This will be handled by the circuit's fallback mechanism
  # to execute fallbacks in parallel
  raise NotImplementedError, 'ParallelFallbackWrapper should be handled by Circuit'
end