Module: Fluent::ChunkMessagePackEventStreamer
- Defined in:
- lib/fluent/event.rb
Instance Method Summary collapse
-
#each(unpacker: nil, &block) ⇒ Object
(also: #msgpack_each)
chunk.extend(ChunkEventStreamer) => chunk.each{|time, record| … }.
- #to_msgpack_stream(time_int: false, packer: nil) ⇒ Object
Instance Method Details
#each(unpacker: nil, &block) ⇒ Object Also known as: msgpack_each
chunk.extend(ChunkEventStreamer)
=> chunk.each{|time, record| ... }
313 314 315 316 317 318 |
# File 'lib/fluent/event.rb', line 313 def each(unpacker: nil, &block) open do |io| (unpacker || Fluent::MessagePackFactory.msgpack_unpacker(io)).each(&block) end nil end |
#to_msgpack_stream(time_int: false, packer: nil) ⇒ Object
321 322 323 324 |
# File 'lib/fluent/event.rb', line 321 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 |