class Metrux::Commands::PeriodicGauge::Reporter

Attributes

agent[R]
config[R]
supervisor[R]

Public Class Methods

new(command, registry, config) click to toggle source
# File lib/metrux/commands/periodic_gauge/reporter.rb, line 7
def initialize(command, registry, config)
  @agent = Agent.new(command, registry, config)
  @supervisor = Supervisor.new(agent, config)
  @config = config
end

Public Instance Methods

start() click to toggle source
# File lib/metrux/commands/periodic_gauge/reporter.rb, line 13
def start
  return false unless config.active?

  agent.start
  supervisor.start

  true
end
stop() click to toggle source
# File lib/metrux/commands/periodic_gauge/reporter.rb, line 22
def stop
  supervisor.stop
  agent.stop
end