hyperi_rustlib/output/mod.rs
1// Project: hyperi-rustlib
2// File: src/output/mod.rs
3// Purpose: File output sink module
4// Language: Rust
5//
6// License: BUSL-1.1
7// Copyright: (c) 2026 HYPERI PTY LIMITED
8
9//! File output sink for local NDJSON event writing.
10//!
11//! Provides a simple file-based output for DFE services -- useful for testing,
12//! bare-metal deployments, and debugging where Kafka is not available.
13//!
14//! ## Example
15//!
16//! ```rust,no_run
17//! use hyperi_rustlib::output::{FileOutput, FileOutputConfig};
18//!
19//! let config = FileOutputConfig {
20//! enabled: true,
21//! path: "/tmp/dfe/output".into(),
22//! ..Default::default()
23//! };
24//!
25//! let output = FileOutput::new(&config, "my-service").expect("create output");
26//! output.write(b"{\"event\":\"login\"}").expect("write");
27//! ```
28
29mod config;
30mod error;
31mod file;
32
33pub use config::FileOutputConfig;
34pub use error::OutputError;
35pub use file::FileOutput;