guts_storage/
lib.rs

1//! Git object storage for Guts.
2//!
3//! This crate provides content-addressed storage for git objects
4//! (blobs, trees, commits) and reference management.
5//!
6//! # Features
7//!
8//! - `memory` - In-memory storage backend (default)
9//! - `rocksdb-backend` - RocksDB persistent storage backend
10//! - `full` - All features enabled
11//!
12//! # Storage Backends
13//!
14//! The crate supports multiple storage backends:
15//!
16//! - [`ObjectStore`] - In-memory storage (fast but volatile)
17//! - [`RocksDbStorage`] - Persistent storage using RocksDB (requires `rocksdb-backend` feature)
18//! - [`CachedStorage`] - LRU cache wrapper for any storage backend
19//! - [`HybridStorage`] - Hot/cold tiering with automatic migration
20
21mod cache;
22mod compression;
23mod error;
24mod hybrid;
25mod object;
26mod pool;
27mod refs;
28#[cfg(feature = "rocksdb-backend")]
29mod rocksdb;
30mod store;
31mod traits;
32
33pub use cache::{CacheConfig, CacheMetrics, CacheStats, CachedStorage};
34pub use compression::{CompressionLevel, CompressionStats};
35pub use error::StorageError;
36pub use hybrid::{HybridConfig, HybridStatsSnapshot, HybridStorage};
37pub use object::{GitObject, ObjectId, ObjectType};
38pub use pool::{ObjectPool, PooledBuffer, IO_BUFFER_POOL, PACK_BUFFER_POOL};
39pub use refs::{RefStore, Reference};
40#[cfg(feature = "rocksdb-backend")]
41pub use rocksdb::{RocksDbConfig, RocksDbStorage};
42pub use store::{ObjectStore, RepoStore, Repository};
43pub use traits::{ObjectStoreBackend, StorageBackend, StorageStats};
44
45/// Result type for storage operations.
46pub type Result<T> = std::result::Result<T, StorageError>;