Class: AllMyCircuits::Notifiers::AbstractNotifier
- Inherits:
-
Object
- Object
- AllMyCircuits::Notifiers::AbstractNotifier
- Defined in:
- lib/all_my_circuits/notifiers/abstract_notifier.rb
Overview
Public: notifies some service about change of breaker’s state. For example, one could send a Librato metric whenever a circuit breaker is opened or closed.
Direct Known Subclasses
Instance Method Summary collapse
-
#closed ⇒ Object
Public: called once the circuit is closed.
-
#initialize(breaker_name, **kwargs) ⇒ AbstractNotifier
constructor
A new instance of AbstractNotifier.
-
#opened ⇒ Object
Public: called once the circuit is tripped open.
Constructor Details
#initialize(breaker_name, **kwargs) ⇒ AbstractNotifier
Returns a new instance of AbstractNotifier.
9 10 11 |
# File 'lib/all_my_circuits/notifiers/abstract_notifier.rb', line 9 def initialize(breaker_name, **kwargs) @breaker_name = breaker_name end |
Instance Method Details
#closed ⇒ Object
Public: called once the circuit is closed.
21 22 23 |
# File 'lib/all_my_circuits/notifiers/abstract_notifier.rb', line 21 def closed raise NotImplementedError end |
#opened ⇒ Object
Public: called once the circuit is tripped open.
15 16 17 |
# File 'lib/all_my_circuits/notifiers/abstract_notifier.rb', line 15 def opened raise NotImplementedError end |