class Fluent::Plugin::KinesisFirehoseOutput
Constants
- BatchRequestLimitCount
- BatchRequestLimitSize
- RequestType
Public Instance Methods
configure(conf)
click to toggle source
Calls superclass method
Fluent::Plugin::KinesisHelper::API::BatchRequest#configure
# File lib/fluent/plugin/out_kinesis_firehose.rb, line 30 def configure(conf) super if @append_new_line org_data_formatter = @data_formatter @data_formatter = ->(tag, time, record) { org_data_formatter.call(tag, time, record).chomp + "\n" } end end
format(tag, time, record)
click to toggle source
# File lib/fluent/plugin/out_kinesis_firehose.rb, line 40 def format(tag, time, record) format_for_api do [@data_formatter.call(tag, time, record)] end end
write(chunk)
click to toggle source
# File lib/fluent/plugin/out_kinesis_firehose.rb, line 46 def write(chunk) delivery_stream_name = extract_placeholders(@delivery_stream_name, chunk) write_records_batch(chunk, delivery_stream_name) do |batch| records = batch.map{|(data)| { data: data } } client.put_record_batch( delivery_stream_name: delivery_stream_name, records: records, ) end end