Module: Fluent::PluginMixin::ChunkJsonStreamer
- Defined in:
- lib/fluent/plugin_mixin/chunk_json_streamer.rb
Instance Method Summary collapse
-
#records ⇒ Object
Iterate over records in chunk.
-
#to_json_stream ⇒ Object
Serialize the chunk to a Json object.
Instance Method Details
#records ⇒ Object
Iterate over records in chunk
7 8 9 10 11 12 13 |
# File 'lib/fluent/plugin_mixin/chunk_json_streamer.rb', line 7 def records records = [] each do |time, record| records << record end records end |
#to_json_stream ⇒ Object
Serialize the chunk to a Json object
18 19 20 |
# File 'lib/fluent/plugin_mixin/chunk_json_streamer.rb', line 18 def to_json_stream json_serializer_proc.call(records) end |