module Fluent::ChunkMessagePackEventStreamer
Public Instance Methods
each(unpacker: nil, &block)
click to toggle source
chunk.extend(ChunkMessagePackEventStreamer
)
=> chunk.each{|time, record| ... }
# File lib/fluent/event.rb, line 313 def each(unpacker: nil, &block) # Note: If need to use `unpacker`, then implement it, # e.g., `unpacker.feed_each(io.read, &block)` (Not tested) raise NotImplementedError, "'unpacker' argument is not implemented." if unpacker open do |io| Fluent::MessagePackFactory.msgpack_unpacker(io).each(&block) end nil end
Also aliased as: msgpack_each
to_msgpack_stream(time_int: false, packer: nil)
click to toggle source
# File lib/fluent/event.rb, line 325 def to_msgpack_stream(time_int: false, packer: nil) # time_int is always ignored because data is already packed and written in chunk read end