pub struct TenantPoolManager { /* private fields */ }Expand description
Manager for tenant connection pools.
This is a placeholder struct that would be implemented with actual database driver integration (tokio-postgres, sqlx, etc.).
Implementations§
Source§impl TenantPoolManager
impl TenantPoolManager
Sourcepub fn new(config: PoolConfig) -> Self
pub fn new(config: PoolConfig) -> Self
Create a new pool manager with the given config.
Sourcepub fn builder() -> TenantPoolManagerBuilder
pub fn builder() -> TenantPoolManagerBuilder
Create a builder.
Sourcepub fn get_or_create(&self, tenant_id: &TenantId) -> Arc<TenantPoolEntry>
pub fn get_or_create(&self, tenant_id: &TenantId) -> Arc<TenantPoolEntry>
Get or create a pool entry for a tenant.
Sourcepub fn global_stats(&self) -> PoolStats
pub fn global_stats(&self) -> PoolStats
Get global statistics.
Sourcepub fn active_pools(&self) -> usize
pub fn active_pools(&self) -> usize
Get number of active tenant pools.
Sourcepub fn evict_expired(&self) -> usize
pub fn evict_expired(&self) -> usize
Evict expired tenant pools.
Sourcepub fn config(&self) -> &PoolConfig
pub fn config(&self) -> &PoolConfig
Get the pool configuration.
Auto Trait Implementations§
impl !Freeze for TenantPoolManager
impl !RefUnwindSafe for TenantPoolManager
impl Send for TenantPoolManager
impl Sync for TenantPoolManager
impl Unpin for TenantPoolManager
impl !UnwindSafe for TenantPoolManager
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more