rustsim_io/lib.rs
1//! I/O utilities for rustsim - Arrow batch building, CSV bridging, and ClickHouse writing.
2//!
3//! This crate provides the data pipeline components:
4//!
5//! - **[`ArrowBatchBuilder`](arrow::ArrowBatchBuilder)** - incrementally builds Arrow
6//! [`RecordBatch`](arrow_array::RecordBatch) values from typed rows.
7//! - **[`CollectArrowBridge`](bridge::CollectArrowBridge)** - auto-flushing bridge that
8//! accumulates rows and produces batches at a configurable size.
9//! - **[`ClickHouseWriter`](clickhouse::ClickHouseWriter)** - background writer that
10//! sends Arrow IPC batches to ClickHouse via HTTP with bounded-channel backpressure
11//! and exponential-backoff retry.
12
13pub mod arrow;
14pub mod bridge;
15pub mod clickhouse;
16
17/// Re-exports of key I/O types.
18pub mod prelude {
19 pub use crate::arrow::{
20 schema_from_fields, ArrowBatchBuilder, ArrowValue, RecordBatchCollector,
21 };
22 pub use crate::bridge::{BridgeError, BridgeMetrics, CollectArrowBridge};
23 pub use crate::clickhouse::{
24 ClickHouseConfig, ClickHouseError, ClickHouseWriter, WriterMetricsSnapshot, WriterStats,
25 };
26}