chronix_engine/storage/mod.rs
1//! # chronix-storage
2//!
3//! Pluggable storage backend for the Chronix time-series database.
4//!
5//! This crate defines the [`StorageBackend`] trait that abstracts segment file
6//! storage, and provides a [`LocalFsBackend`] implementation for local
7//! filesystem storage using atomic writes and positioned reads.
8//!
9//! ## Architecture
10//!
11//! Segment files are stored in a namespace-scoped, shard-based directory
12//! hierarchy for defense-in-depth tenant isolation:
13//! ```text
14//! {data_dir}/ns_{namespace}/shard_{id}/segment_name.csx
15//! ```
16//!
17//! The storage backend is designed to be `Send + Sync + 'static` for use
18//! across async tasks.
19
20#![warn(missing_docs)]
21#![deny(unsafe_code)]
22
23pub mod backend;
24pub mod encrypting;
25pub mod error;
26pub mod local;
27
28pub use backend::{SegmentPath, StorageBackend};
29pub use encrypting::EncryptingBackend;
30pub use error::StorageError;
31pub use local::LocalFsBackend;