Class: Malevich::Responder::Riemann

Inherits:
Object
  • Object
show all
Includes:
Mixin
Defined in:
lib/malevich/responders/riemann.rb

Constant Summary collapse

INTERVAL_FLUSH =
0.5

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Mixin

#log, #malevich

Constructor Details

#initializeRiemann

Returns a new instance of Riemann.



14
15
16
17
# File 'lib/malevich/responders/riemann.rb', line 14

def initialize
  @riemanns = Array.new
  @name = 'riemann client'
end

Instance Attribute Details

#nameObject (readonly)

Returns the value of attribute name.



12
13
14
# File 'lib/malevich/responders/riemann.rb', line 12

def name
  @name
end

Instance Method Details

#run!Object



19
20
21
22
23
24
25
# File 'lib/malevich/responders/riemann.rb', line 19

def run!
  make_clients
  loop do
    flush
    sleep INTERVAL_FLUSH
  end
end