View Source Electric.ShapeCache.LogChunker (electric v0.9.5)
Summary
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()
Link to this function
fit_into_chunk(chunk_bytes, total_chunk_size, chunk_bytes_threshold \\ 10_485_760)
View Source@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.