Class: EzNemo::Monitor
- Inherits:
-
Object
- Object
- EzNemo::Monitor
- Defined in:
- lib/eznemo/monitor.rb
Overview
Maintains an array of all the monitor plugins
Instance Method Summary collapse
-
#initialize ⇒ Monitor
constructor
A new instance of Monitor.
-
#register(plugin) ⇒ Object
Registers a plugin; usually called by the plugin itself.
-
#report(result) ⇒ Object
Report result; usually called by the plugin.
-
#start_checks(checks) ⇒ Object
Starts check loops in the reactor.
Constructor Details
#initialize ⇒ Monitor
Returns a new instance of Monitor.
12 13 14 |
# File 'lib/eznemo/monitor.rb', line 12 def initialize @plugins = {} end |
Instance Method Details
#register(plugin) ⇒ Object
Registers a plugin; usually called by the plugin itself
18 19 20 21 |
# File 'lib/eznemo/monitor.rb', line 18 def register(plugin) @plugins[plugin.name] = plugin plugin.registered(self) end |