drasi_index_rocksdb/lib.rs
1#![allow(unexpected_cfgs)]
2// Copyright 2024 The Drasi Authors.
3//
4// Licensed under the Apache License, Version 2.0 (the "License");
5// you may not use this file except in compliance with the License.
6// You may obtain a copy of the License at
7//
8// http://www.apache.org/licenses/LICENSE-2.0
9//
10// Unless required by applicable law or agreed to in writing, software
11// distributed under the License is distributed on an "AS IS" BASIS,
12// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13// See the License for the specific language governing permissions and
14// limitations under the License.
15
16//! RocksDB Index Backend for Drasi
17//!
18//! This crate provides a persistent storage backend for Drasi queries using RocksDB.
19//!
20//! # Usage
21//!
22//! ```ignore
23//! use drasi_index_rocksdb::RocksDbIndexProvider;
24//! use drasi_lib::DrasiLib;
25//! use std::sync::Arc;
26//!
27//! let provider = RocksDbIndexProvider::new("/data/drasi", true, false);
28//! let drasi = DrasiLib::builder()
29//! .with_index_provider(Arc::new(provider))
30//! .build()?;
31//! ```
32
33pub mod element_index;
34pub mod future_queue;
35mod plugin;
36pub mod result_index;
37mod session_state;
38mod storage_models;
39
40// Re-export the plugin provider and unified DB opener for easy access
41pub use plugin::open_unified_db;
42pub use plugin::RocksDbIndexProvider;
43
44// Re-export session types
45pub use session_state::RocksDbSessionControl;
46pub use session_state::RocksDbSessionState;