class Fluent::Plugin::NullOutput

Attributes

delayed[RW]
feed_proc[RW]

Public Class Methods

new() click to toggle source
Calls superclass method Fluent::Compat::Output::new
# File lib/fluent/plugin/out_null.rb, line 43
def initialize
  super
  @delayed = false
  @feed_proc = nil
end

Public Instance Methods

multi_workers_ready?() click to toggle source
# File lib/fluent/plugin/out_null.rb, line 49
def multi_workers_ready?
  true
end
prefer_buffered_processing() click to toggle source
# File lib/fluent/plugin/out_null.rb, line 33
def prefer_buffered_processing
  false
end
prefer_delayed_commit() click to toggle source
# File lib/fluent/plugin/out_null.rb, line 37
def prefer_delayed_commit
  @delayed
end
process(tag, es) click to toggle source
# File lib/fluent/plugin/out_null.rb, line 53
def process(tag, es)
  raise "failed to flush" if @never_flush
  # Do nothing
end
try_write(chunk) click to toggle source
# File lib/fluent/plugin/out_null.rb, line 65
def try_write(chunk)
  raise "failed to flush" if @never_flush
  if @feed_proc
    @feed_proc.call(chunk)
  end
  # not to commit chunks for testing
  # commit_write(chunk.unique_id)
end
write(chunk) click to toggle source
# File lib/fluent/plugin/out_null.rb, line 58
def write(chunk)
  raise "failed to flush" if @never_flush
  if @feed_proc
    @feed_proc.call(chunk)
  end
end