class Fluent::Plugin::ReckonerCdpOutput
Constants
- MAXIMUM_QUERY_STRING_LENGTH
Public Instance Methods
configure(conf)
click to toggle source
Calls superclass method
# File lib/fluent/plugin/out_reckoner_cdp.rb, line 18 def configure(conf) super @token = conf['token'] @endpoint = conf['endpoint'] @client_id = conf['client_id'] end
start()
click to toggle source
Calls superclass method
# File lib/fluent/plugin/out_reckoner_cdp.rb, line 25 def start super @client = Reckoner::Cdp::Client.new(token, endpoint: @endpoint, client_id: @client_id) end
write(chunk)
click to toggle source
# File lib/fluent/plugin/out_reckoner_cdp.rb, line 30 def write(chunk) data = [] chunk.each do |_, record| data << record if data.join.length >= MAXIMUM_QUERY_STRING_LENGTH data.delete_at(-1) @client.streaming_insert(@workflow_id, data) data = [record] end end @client.streaming_insert(@workflow_id, data) end