hyperlane-plugin-sse 23.1.0

A Server-Sent Events (SSE) streaming and topic pub/sub plugin for the Hyperlane framework with Last-Event-ID replay, heartbeat, and CRLF-safe event framing.
Documentation
//! hyperlane-plugin-sse
//!
//! High-concurrency Server-Sent Events (SSE) framing, 64-way sharded topic
//! pub/sub fan-out, bounded `Last-Event-ID` replay, and zero-allocation
//! streaming heartbeats for Hyperlane.

mod r#const;
mod r#enum;
mod r#fn;
mod r#impl;
mod r#static;
mod r#struct;
mod r#type;

#[cfg(test)]
#[path = "../tests/mod.rs"]
mod tests;

pub use {r#const::*, r#enum::*, r#struct::*};

pub(crate) use {r#fn::*, r#static::*, r#type::*};

use std::{
    array::from_fn,
    collections::{HashMap, VecDeque},
    error::Error,
    fmt::{self, Display, Formatter},
    hash::{BuildHasherDefault, Hasher},
    str::from_utf8,
    sync::{
        Arc, Mutex, MutexGuard, OnceLock, RwLock, RwLockReadGuard,
        atomic::{AtomicU64, AtomicUsize, Ordering},
    },
    time::Duration,
};

use {
    hyperlane::{
        CACHE_CONTROL, CONTENT_TYPE, Context, ResponseError, Stream,
        tokio::{
            select,
            sync::broadcast::{
                self, Receiver, Sender,
                error::{RecvError, TryRecvError},
            },
            time::{Instant, Interval, MissedTickBehavior, interval},
        },
    },
    lombok_macros::*,
};