relay_knowledge/storage/partitioned/
diagnostics.rs1use std::path::Path;
2
3use crate::paths::RuntimePaths;
4use crate::storage::{StorageError, StorageTopologySnapshot};
5
6use super::{
7 PartitionedSqliteKnowledgeStore,
8 catalog::{catalog_has_active_repositories, catalog_topology_snapshot},
9};
10
11impl PartitionedSqliteKnowledgeStore {
12 pub fn has_active_catalog(control_path: impl AsRef<Path>) -> Result<bool, StorageError> {
13 catalog_has_active_repositories(control_path.as_ref())
14 }
15
16 pub async fn topology_snapshot(&self) -> Result<StorageTopologySnapshot, StorageError> {
17 self.catalog.topology_snapshot().await
18 }
19
20 pub fn topology_snapshot_from_catalog(
21 control_path: impl AsRef<Path>,
22 paths: &RuntimePaths,
23 ) -> Result<StorageTopologySnapshot, StorageError> {
24 catalog_topology_snapshot(control_path.as_ref(), paths)
25 }
26}