class Fluent::Plugin::OSSOutput::Compressor

Compression base class.

Attributes

log[R]

Public Class Methods

new(opts = {}) click to toggle source
Calls superclass method
# File lib/fluent/plugin/out_oss.rb, line 328
def initialize(opts = {})
  super()
  @buffer_type = opts[:buffer_type]
  @log = opts[:log]
end

Public Instance Methods

compress(chunk, file) click to toggle source
# File lib/fluent/plugin/out_oss.rb, line 342
def compress(chunk, file); end
configure(conf) click to toggle source
Calls superclass method
# File lib/fluent/plugin/out_oss.rb, line 334
def configure(conf)
  super
end
content_type() click to toggle source
# File lib/fluent/plugin/out_oss.rb, line 340
def content_type; end
ext() click to toggle source
# File lib/fluent/plugin/out_oss.rb, line 338
def ext; end

Private Instance Methods

check_command(command, encode = nil) click to toggle source
# File lib/fluent/plugin/out_oss.rb, line 346
def check_command(command, encode = nil)
  require 'open3'

  encode = command if encode.nil?
  begin
    Open3.capture3("#{command} -V")
  rescue Errno::ENOENT
    raise Fluent::ConfigError,
          "'#{command}' utility must be in PATH for #{encode} compression"
  end
end