Class: Fluent::Plugin::FileServiceDiscovery::StatWatcher
- Inherits:
- 
      Coolio::StatWatcher
      
        - Object
- Coolio::StatWatcher
- Fluent::Plugin::FileServiceDiscovery::StatWatcher
 
- Defined in:
- lib/fluent/plugin/sd_file.rb
Instance Method Summary collapse
- 
  
    
      #initialize(path, log, &callback)  ⇒ StatWatcher 
    
    
  
  
  
    constructor
  
  
  
  
  
  
  
    A new instance of StatWatcher. 
- #on_change(prev_stat, cur_stat) ⇒ Object
Constructor Details
#initialize(path, log, &callback) ⇒ StatWatcher
| 141 142 143 144 145 146 | # File 'lib/fluent/plugin/sd_file.rb', line 141 def initialize(path, log, &callback) @path = path @log = log @callback = callback super(@path) end | 
Instance Method Details
#on_change(prev_stat, cur_stat) ⇒ Object
| 148 149 150 151 152 | # File 'lib/fluent/plugin/sd_file.rb', line 148 def on_change(prev_stat, cur_stat) @callback.call(prev_stat, cur_stat) rescue => e @log.error(e) end |