Module: Fluent::ChunkMessagePackEventStreamer

Includes:
MessagePackFactory::Mixin
Defined in:
lib/fluent/event.rb

Instance Method Summary collapse

Methods included from MessagePackFactory::Mixin

#msgpack_factory, #msgpack_packer, #msgpack_unpacker

Instance Method Details

#each(&block) ⇒ Object Also known as: msgpack_each

chunk.extend(ChunkEventStreamer)

=> chunk.each{|time, record| ... }


321
322
323
324
325
326
# File 'lib/fluent/event.rb', line 321

def each(&block)
  open do |io|
    msgpack_unpacker(io).each(&block)
  end
  nil
end

#to_msgpack_stream(time_int: false) ⇒ Object



329
330
331
332
# File 'lib/fluent/event.rb', line 329

def to_msgpack_stream(time_int: false)
  # time_int is always ignored because data is already packed and written in chunk
  read
end