pub enum BackpressureStrategy {
Drop,
Block,
FallbackSink(Arc<dyn AuditSink>),
}Expand description
SP-observability-completeness-v1 Axis B. How a sink behaves when its
internal queue is full at on_call time.
Variants§
Drop
Drop the event, increment drops(). The SP-concurrency-baseline
default — protects dispatch throughput; correct for the 90%
non-compliance case. “log loss >> dispatch stall.”
Block
Block the dispatch path until the queue accepts the event. For compliance adopters (HIPAA §164.528) where a dropped audit record is unacceptable: dispatch slows under audit backpressure rather than losing the disclosure record. Requires a multi-thread runtime (the ref binaries use one) so a blocked worker doesn’t starve accept.
FallbackSink(Arc<dyn AuditSink>)
On queue-full, write the event synchronously to a fallback sink (e.g. stderr / a second file) instead of dropping. Bounds the hot path (no indefinite block) with no silent loss. The fallback SHOULD be a synchronous sink, never another queueing sink (avoid chained blocking).
Trait Implementations§
Source§impl Clone for BackpressureStrategy
impl Clone for BackpressureStrategy
Source§fn clone(&self) -> BackpressureStrategy
fn clone(&self) -> BackpressureStrategy
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more