Get the ceiling for a tenant (if defined).
(&self, tenant_id: u64)
| 56 | |
| 57 | /// Get the ceiling for a tenant (if defined). |
| 58 | pub fn get(&self, tenant_id: u64) -> Option<TenantCeiling> { |
| 59 | let ceilings = self.ceilings.read().unwrap_or_else(|p| p.into_inner()); |
| 60 | ceilings.get(&tenant_id).cloned() |
| 61 | } |
| 62 | |
| 63 | /// Check if creating a new collection would exceed the ceiling. |
| 64 | pub fn check_collection_limit(&self, tenant_id: u64, current_count: u64) -> crate::Result<()> { |