class Fluent::RewriteImageOutput
Public Class Methods
new()
click to toggle source
Calls superclass method
# File lib/fluent/plugin/out_rewriteimage.rb, line 10 def initialize super end
Public Instance Methods
configure(conf)
click to toggle source
Calls superclass method
# File lib/fluent/plugin/out_rewriteimage.rb, line 18 def configure(conf) super if ( !remove_tag_prefix && !remove_tag_suffix && !add_tag_prefix && !add_tag_suffix ) raise ConfigError, "out_rewriteimage: At least one of remove_tag_prefix/remove_tag_suffix/add_tag_prefix/add_tag_suffix is required to be set." end end
emit(tag, es, chain)
click to toggle source
# File lib/fluent/plugin/out_rewriteimage.rb, line 41 def emit(tag, es, chain) es.each {|time,record| t = tag.dup filter_record(t, time, record) Engine.emit(t, time, record) } chain.next end
filter_record(tag, time, record)
click to toggle source
Calls superclass method
# File lib/fluent/plugin/out_rewriteimage.rb, line 51 def filter_record(tag, time, record) raw_media = open(record[@image_source_key], 'rb').read record[@image_key] = @base64encode ? Base64.encode64(raw_media) : raw_media super(tag, time, record) end
shutdown()
click to toggle source
Calls superclass method
# File lib/fluent/plugin/out_rewriteimage.rb, line 36 def shutdown super end
start()
click to toggle source
Calls superclass method
# File lib/fluent/plugin/out_rewriteimage.rb, line 31 def start super end