class Fluent::MemoryBufferChunk
def <<(data)
def <<(data) data.force_encoding('ASCII-8BIT') @data << data end
def close
def close end
def initialize(key, data='')
def initialize(key, data='') @data = data @data.force_encoding('ASCII-8BIT') now = Time.now.utc u1 = ((now.to_i*1000*1000+now.usec) << 12 | rand(0xfff)) @unique_id = [u1 >> 32, u1 & 0xffffffff, rand(0xffffffff), rand(0xffffffff)].pack('NNNN') super(key) end
def msgpack_each(&block)
def msgpack_each(&block) u = Fluent::Engine.msgpack_factory.unpacker u.feed_each(@data, &block) end
def open(&block)
def open(&block) StringIO.open(@data, &block) end
def purge
def purge end
def read
def read @data end
def size
def size @data.bytesize end
def write_to(io)
def write_to(io) io.write @data end