class LogStash::Outputs::LogstashAzureBlobOutput::TemporaryFileFactory::IOWrappedGzip
clas for the encoding
Attributes
file_io[R]
gzip_writer[R]
Public Class Methods
new(file_io)
click to toggle source
initialize the class for encoding
# File lib/logstash/outputs/blob/temporary_file_factory.rb, line 104 def initialize(file_io) @file_io = file_io @gzip_writer = Zlib::GzipWriter.open(file_io) end
Public Instance Methods
fsync()
click to toggle source
gets the fsync
# File lib/logstash/outputs/blob/temporary_file_factory.rb, line 128 def fsync @gzip_writer.to_io.fsync end
path()
click to toggle source
gets the path
# File lib/logstash/outputs/blob/temporary_file_factory.rb, line 110 def path @gzip_writer.to_io.path end
size()
click to toggle source
gets the file size
# File lib/logstash/outputs/blob/temporary_file_factory.rb, line 115 def size # to get the current file size if @gzip_writer.pos.zero? # Ensure a zero file size is returned when nothing has # yet been written to the gzip file. 0 else @gzip_writer.flush @gzip_writer.to_io.size end end