module Fluent::Helper::PluginEmitStub

Public Class Methods

emit_event(tag, time, record) click to toggle source
# File lib/fluent/helper/plugin_spec.rb, line 34
def self.emit_event(tag, time, record)
  @@store[Thread.current][@@current_target][tag] ||= []
  @@store[Thread.current][@@current_target][tag].push( PluginSpec::Event.new(time, record) )
end
register_target(klass) click to toggle source
# File lib/fluent/helper/plugin_spec.rb, line 27
def self.register_target(klass)
  @@current_target = klass
  @@store ||= {}
  @@store[Thread.current] ||= {}
  @@store[Thread.current][klass] = {} # tag => [events]
end
stored(tag) click to toggle source
# File lib/fluent/helper/plugin_spec.rb, line 39
def self.stored(tag)
  @@store[Thread.current][@@current_target] || {}
end