hyperi-rustlib 2.8.5

There's plenty of sage advice out there about how to run Rust services in production at scale — config cascades, structured logging, masking secrets, multi-backend secrets management, Prometheus, OpenTelemetry, Kafka transports, tiered disk-spillover sinks, adaptive worker pools, graceful shutdown — but almost none of it as code you can just install and use. This is that code. Opinionated, drop-in, working out of the box. The patterns from blog posts, watercooler chats and beers with your Google mates as actual library — not a framework you assemble from twenty crates and 8 weeks of munging.
Documentation
// Project:   hyperi-rustlib
// File:      src/io/mod.rs
// Purpose:   Shared NDJSON file I/O module
// Language:  Rust
//
// License:   BUSL-1.1
// Copyright: (c) 2026 HYPERI PTY LIMITED

//! Shared NDJSON file I/O primitives.
//!
//! Provides [`NdjsonWriter`] -- a rotating file writer for newline-delimited JSON.
//! Used by both the DLQ file backend and the file output sink.
//!
//! ## Design
//!
//! `NdjsonWriter` is a thin wrapper around `file-rotate` that handles:
//! - Rotating NDJSON files by time (hourly/daily)
//! - Optional gzip compression of rotated files
//! - Age-based cleanup of old files
//! - Atomic write counters for metrics
//!
//! It knows nothing about DLQ or output semantics -- callers serialise their
//! own types and hand raw `&[u8]` lines to the writer.

mod config;
mod ndjson_writer;

pub use config::{FileWriterConfig, RotationPeriod};
pub use ndjson_writer::{AsyncNdjsonWriter, NdjsonWriter};