use super::Namespace;
use crate::types::NamespaceMetadata;
impl Namespace {
pub async fn get_metadata(&self) -> NamespaceMetadata {
self.metadata.clone()
}
pub async fn get_shard_key_counts(&self) -> Vec<usize> {
let shards_guard = self.shards.read().await;
let mut counts = Vec::with_capacity(shards_guard.len());
for shard in shards_guard.iter() {
let data = shard.read().await;
counts.push(data.len());
}
counts
}
}