class Flux::BufferedWriter

Defined in:

flux/buffered_writer.cr

Constant Summary

Log = ::Log.for(self)

Constructors

Instance Method Summary

Constructor Detail

def self.new(client : Flux::Client, bucket : String, batch_size : Int32 = 5000, flush_delay : Time::Span = 1.seconds) #

Creates a new buffered writer for storing points in bucket via client.

Writes to the underlying client are deferred until batch_size points are cached or no additional write call is made for flush_delay.


[View source]

Instance Method Detail

def enqueue(point : Point) : Nil #

Enqueue a point for writing.


[View source]
def flush : Nil #

Flush any fully buffered writes, or schedules a task for partials.


[View source]