feat(cluster): add shard healing, drive health heartbeats, and clustered policy directory support
This commit is contained in:
@@ -811,14 +811,18 @@ impl StorageBackend {
|
||||
pub fn policies_dir(&self) -> std::path::PathBuf {
|
||||
match self {
|
||||
StorageBackend::Standalone(fs) => fs.policies_dir(),
|
||||
StorageBackend::Clustered(_) => PathBuf::from(".policies"), // TODO: proper policies in cluster mode
|
||||
StorageBackend::Clustered(ds) => ds.policies_dir(),
|
||||
}
|
||||
}
|
||||
|
||||
pub async fn initialize(&self) -> Result<()> {
|
||||
match self {
|
||||
StorageBackend::Standalone(fs) => fs.initialize().await,
|
||||
StorageBackend::Clustered(_) => Ok(()), // Cluster init happens separately
|
||||
StorageBackend::Clustered(ds) => {
|
||||
// Ensure policies directory exists
|
||||
tokio::fs::create_dir_all(ds.policies_dir()).await?;
|
||||
Ok(())
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user