Skip to main content

bunny_syslog_receiver/
lib.rs

1//! Embedded RFC 5424 / 3164 syslog TCP receiver used by
2//! `hoppy container logs` to capture log-forwarding traffic from Bunny
3//! Magic Containers.
4//!
5//! Two layers:
6//!
7//! * [`receiver`] — a `tokio` TCP listener that accepts framed syslog
8//!   messages (RFC 6587 octet-counted **or** non-transparent LF framing,
9//!   detected per-connection on the first byte) and forwards parsed
10//!   [`LogEvent`]s through an `mpsc` channel.
11//! * [`tunnel`] — a [`Tunnel`] trait + a [`BoreTunnel`] implementation
12//!   that exposes the local listener via the `bore` CLI.
13//!
14//! The crate is transport-only: pretty-printing, redaction, and lifecycle
15//! orchestration live in the consuming binary.
16
17pub mod framing;
18pub mod receiver;
19pub mod tunnel;
20
21pub use receiver::{LocalListener, LogEvent, Severity, run_receiver, spawn_receiver};
22pub use tunnel::{BoreTunnel, NoopTunnel, StaticTunnel, Tunnel, TunnelHandle};