Class: Fluent::Plugin::RdsMysqlLogInput::TimerWatcher

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

Instance Method Summary collapse

Constructor Details

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

Returns a new instance of TimerWatcher.



263
264
265
266
267
# File 'lib/fluent/plugin/in_rds_mysql_log.rb', line 263

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

Instance Method Details

#on_timerObject



269
270
271
# File 'lib/fluent/plugin/in_rds_mysql_log.rb', line 269

def on_timer
  @callback.call
end