pub struct StorageConfig {
pub mode: String,
pub shared_data_dir: Option<String>,
pub media_dir: String,
pub vector: VectorBackendConfig,
pub graph: GraphBackendConfig,
}Expand description
Storage backend configuration.
Fields§
§mode: StringStorage mode: “embedded” (default) or “external”.
Shared data directory for multi-instance mode.
When mode = "shared", all instances must point to the same directory.
Both vector and graph backends will use sub-directories under this path.
If set, overrides vector.data_dir and graph.data_dir.
media_dir: StringDirectory for persisting uploaded media files (images, audio, video).
Defaults to “data/media”. Files are stored as {node_id}.{ext}.
vector: VectorBackendConfigVector backend configuration.
graph: GraphBackendConfigGraph backend configuration.
Implementations§
Source§impl StorageConfig
impl StorageConfig
Sourcepub fn effective_vector_data_dir(&self) -> &str
pub fn effective_vector_data_dir(&self) -> &str
Returns the effective data directory for vector storage.
In shared mode with shared_data_dir set, returns the shared path.
Otherwise returns the backend’s own data_dir.
Sourcepub fn effective_graph_data_dir(&self) -> &str
pub fn effective_graph_data_dir(&self) -> &str
Returns the effective data directory for graph storage.
In shared mode with shared_data_dir set, returns the shared path.
Otherwise returns the backend’s own data_dir.
Sourcepub fn effective_media_dir(&self) -> &str
pub fn effective_media_dir(&self) -> &str
Returns the media storage directory path.
Trait Implementations§
Source§impl Clone for StorageConfig
impl Clone for StorageConfig
Source§fn clone(&self) -> StorageConfig
fn clone(&self) -> StorageConfig
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more