Class: Fluent::RdsErrorLogInput::TimerWatcher

Inherits:
Coolio::TimerWatcher
  • Object
show all
Defined in:
lib/fluent/plugin/in_rds_error_log.rb

Instance Method Summary collapse

Constructor Details

#initialize(interval, repeat, &callback) ⇒ TimerWatcher

Returns a new instance of TimerWatcher.



287
288
289
290
291
292
# File 'lib/fluent/plugin/in_rds_error_log.rb', line 287

def initialize(interval, repeat, &callback)
  require 'myslog'
  @callback = callback
  on_timer # first call
  super(interval, repeat)
end

Instance Method Details

#on_timerObject



294
295
296
# File 'lib/fluent/plugin/in_rds_error_log.rb', line 294

def on_timer
  @callback.call
end