class Flux::BufferedWriter
- Flux::BufferedWriter
- Reference
- Object
Defined in:
flux/buffered_writer.crConstant Summary
-
Log =
::Log.for(self)
Constructors
-
.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.
Instance Method Summary
-
#enqueue(point : Point) : Nil
Enqueue a point for writing.
-
#flush : Nil
Flush any fully buffered writes, or schedules a task for partials.
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.