Class: Triglav::Agent::Base::Monitor
- Inherits:
-
Object
- Object
- Triglav::Agent::Base::Monitor
- Defined in:
- lib/triglav/agent/base/monitor.rb
Overview
An abstract class of Monitor.
Monitor your storage and send messages to triglav.
You have to implement following methods:
-
initialize
-
process
An instance is created per a `resource`. Connection is shared among same `resource_uri_prefix`.
Note that multiple instances would be created, one instance for one parallel thread basically, and `#process` is ran concurrently.
Instance Method Summary collapse
-
#initialize(connection, resource) ⇒ Monitor
constructor
A new instance of Monitor.
- #process {|events| ... } ⇒ Object
Constructor Details
#initialize(connection, resource) ⇒ Monitor
Returns a new instance of Monitor
21 22 23 |
# File 'lib/triglav/agent/base/monitor.rb', line 21 def initialize(connection, resource) raise NotImplementedError end |
Instance Method Details
#process {|events| ... } ⇒ Object
26 27 28 29 |
# File 'lib/triglav/agent/base/monitor.rb', line 26 def process(&block) raise NotImplementedError # yield(events) if block_given? end |