Module: Fluent::Helper::PluginEmitStub
- Defined in:
- lib/fluent/helper/plugin_spec.rb
Class Method Summary collapse
Class Method Details
.emit_event(tag, time, record) ⇒ Object
34 35 36 37 |
# 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) ⇒ Object
27 28 29 30 31 32 |
# 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) ⇒ Object
39 40 41 |
# File 'lib/fluent/helper/plugin_spec.rb', line 39 def self.stored(tag) @@store[Thread.current][@@current_target] || {} end |