Electric.ShapeCache.LogChunker (electric v1.0.15)
View SourceSummary
Functions
Check if adding the given number of bytes to the current chunk would exceed the threshold.
Functions
@spec default_chunk_size_threshold() :: non_neg_integer()
@spec fit_into_chunk(non_neg_integer(), non_neg_integer(), non_neg_integer()) :: {:ok | :threshold_exceeded, non_neg_integer()}
Check if adding the given number of bytes to the current chunk would exceed the threshold.
Returns either an ok-tuple with the new total chunk size or a threshold_exceeded-tuple with the new chunk size of 0.