Skip to main content

Module buffered

Module buffered 

Source
Expand description

Caller-owned, failure-aware buffering. Construction never starts work.

Records remain in memory until persistence acknowledges them. Sink errors pause the affected lane; only explicitly retryable failures can be resumed. Dropping the owner cancels/aborts its worker, while stop additionally joins it before dependencies may close.

Structs§

BufferStopReport
Drain result. Once returned, the worker is joined and database dependencies may close.
BufferedBatchConfig
Bounded in-memory buffering policy. Zero capacities normalize to one.
BufferedWriterSnapshot
Observable per-instance state. Counts include in-flight, unacknowledged records.
ManagedBatchWriter
Explicitly started and stopped buffering with one owned worker and bounded overflow.
WriteFailure
A failure retained alongside the unconfirmed records.

Enums§

BufferFlushError
Flush failure; inspect the snapshot and unconfirmed records before recovery.
BufferedWriterEvent
Low-cardinality events delivered with try_send; persistence never calls observer code.
BufferedWriterState
Writer lifecycle. A stopped writer cannot be restarted.
OverflowPolicy
Explicit admission policy when the bounded batch queue is full.
RecordAdmission
Successful admission does not imply batch durability.
RecordError
Admission failure. Rejected records are returned; accepted failed direct writes stay in memory.
WriteFailureCause
Original persistence error, or a worker-side interruption with unknown outcome.
WriteFailureClass
Whether an unacknowledged write can safely be replayed.