class LogStash::Outputs::Qingstor::TemporaryFileFactory::IOWrappedGzip
Attributes
file_io[RW]
gzip_writer[RW]
Public Class Methods
new(file_io)
click to toggle source
# File lib/logstash/outputs/qingstor/temporary_file_factory.rb, line 92 def initialize(file_io) @file_io = file_io @gzip_writer = Zlib::GzipWriter.open(file_io) end
Public Instance Methods
fsync()
click to toggle source
# File lib/logstash/outputs/qingstor/temporary_file_factory.rb, line 110 def fsync @gzip_writer.to_io.fsync end
path()
click to toggle source
# File lib/logstash/outputs/qingstor/temporary_file_factory.rb, line 97 def path @gzip_writer.to_io.path end
size()
click to toggle source
# File lib/logstash/outputs/qingstor/temporary_file_factory.rb, line 101 def size if @gzip_writer.pos == 0 0 else @gzip_writer.flush @gzip_writer.to_io.size end end