Class: Murakumo::HealthCheckNotifier
- Inherits:
-
Object
- Object
- Murakumo::HealthCheckNotifier
- Defined in:
- lib/srv/murakumo_health_check_notifier.rb
Instance Method Summary collapse
-
#initialize(address, name, logger, options) ⇒ HealthCheckNotifier
constructor
A new instance of HealthCheckNotifier.
- #notify_active ⇒ Object
- #notify_inactive ⇒ Object
Constructor Details
#initialize(address, name, logger, options) ⇒ HealthCheckNotifier
Returns a new instance of HealthCheckNotifier.
9 10 11 12 13 14 15 16 17 18 |
# File 'lib/srv/murakumo_health_check_notifier.rb', line 9 def initialize(address, name, logger, ) @address = address @name = name @logger = logger @args = [:args] @sender = [:sender] @recipients = [:recipients] @open_timeout = [:open_timeout] @read_timeout = [:read_timeout] end |
Instance Method Details
#notify_active ⇒ Object
20 21 22 |
# File 'lib/srv/murakumo_health_check_notifier.rb', line 20 def notify_active notify('healthy', "#{@name} became healthy :-)") end |
#notify_inactive ⇒ Object
24 25 26 |
# File 'lib/srv/murakumo_health_check_notifier.rb', line 24 def notify_inactive notify('unhealthy', "#{@name} became unhealthy :-(") end |