class Triglav::Agent::Base::Monitor

An abstract class of Monitor.

Monitor your storage and send messages to triglav.

You have to implement following methods:

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.

Public Class Methods

new(connection, resource) click to toggle source

@param [Triglav::Agent::Base::Connection] connection @param [TriglavClient::ResourceResponse] resource

# File lib/triglav/agent/base/monitor.rb, line 21
def initialize(connection, resource)
  raise NotImplementedError
end

Public Instance Methods

process(&block) click to toggle source

@yield [events] Gives an array of events

# File lib/triglav/agent/base/monitor.rb, line 26
def process(&block)
  raise NotImplementedError
  # yield(events) if block_given?
end