liminal-server 0.20.1

Standalone server for the liminal messaging bus
Documentation
//! The tap (SRV-011 R2): a sampled, bounded view of live traffic.
//!
//! A [`TapSubscription`] names the traffic it wants with a [`TapFilter`] and
//! holds a [`BoundedRing`] of kept messages. The server samples `1 in N` per
//! subscription: N doubles whenever the subscriber's ring is more than half
//! full after a push and halves each time the subscriber drains. Every kept
//! message remembers the N it was kept under, and a drain closes a batch
//! wherever N changed, so each [`TapBatch`] has one divisor that is true of
//! every message in it. The ring drops its oldest message with a count when
//! full, so a slow subscriber costs at most `capacity` messages of memory, and
//! each batch says how many were lost since the one before.
//!
//! The hook is [`Tap::observe`], called once at the server's publish return.
//! With no subscriber it costs one atomic load.

pub mod error;
pub mod message;
pub mod ring;
pub mod subscription;

pub use error::TapError;
pub use message::{
    Hop, PayloadGrant, PublishFact, Reached, Recorded, TapBatch, TapFilter, TapIdent, TapMessage,
    TapOutcome, TapSource,
};
pub use ring::BoundedRing;
pub use subscription::{DEFAULT_TAP_CAPACITY, MAX_SAMPLE_ONE_IN, Tap, TapSubscription, TapWaker};

#[cfg(test)]
mod tests;