MCPcopy Create free account
hub / github.com/deventlab/d-engine / StorageEngine

Interface StorageEngine

d-engine-core/src/storage/storage_engine.rs:24–36  ·  view source on GitHub ↗

High-performance storage abstraction for Raft consensus Design principles: - Zero-cost abstractions through static dispatch - Physical separation of log and metadata stores - Async-ready for I/O parallelism - Minimal interface for maximum performance

Source from the content-addressed store, hash-verified

22/// - Async-ready for I/O parallelism
23/// - Minimal interface for maximum performance
24pub trait StorageEngine: Send + Sync + 'static {
25 /// Associated log store type
26 type LogStore: LogStore;
27
28 /// Associated metadata store type
29 type MetaStore: MetaStore;
30
31 /// Get log storage handle
32 fn log_store(&self) -> Arc<Self::LogStore>;
33
34 /// Get metadata storage handle
35 fn meta_store(&self) -> Arc<Self::MetaStore>;
36}
37
38#[cfg_attr(any(test, feature = "__test_support"), automock)]
39#[async_trait]

Callers

nothing calls this directly

Implementers 4

mock_storage_engine.rsd-engine-core/src/test_utils/mock/mock
file_storage_engine.rsd-engine-server/src/storage/adaptors/f
rocksdb_storage_engine.rsd-engine-server/src/storage/adaptors/r
sled_storage_engine.rsexamples/sled-cluster/src/sled_storage

Calls

no outgoing calls

Tested by

no test coverage detected