Module: Fluent::ChunkMessagePackEventStreamer

Includes:
MessagePackFactory::Mixin
Included in:
Plugin::Buffer::Chunk
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| ... }


274
275
276
277
278
279
# File 'lib/fluent/event.rb', line 274

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

#to_msgpack_stream(time_int: false) ⇒ Object



282
283
284
285
# File 'lib/fluent/event.rb', line 282

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