Documentation
¶
Overview ¶
Package rowbuffer provides thread-safe row batching for ClickHouse inserts. It pools rows in memory across concurrent tasks and flushes when hitting a row limit or timer interval.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Buffer ¶
type Buffer[R any] struct { // contains filtered or unexported fields }
Buffer provides thread-safe row batching for ClickHouse inserts.
func (*Buffer[R]) Submit ¶
Submit adds rows to the buffer and blocks until they are successfully flushed. Returns an error if the flush fails or the context is cancelled.
func (*Buffer[R]) WaiterCount ¶
WaiterCount returns the current number of waiting tasks.
Click to show internal directories.
Click to hide internal directories.