pub struct TenantManager { /* private fields */ }Expand description
Tenant manager
Implementations§
Source§impl TenantManager
impl TenantManager
Sourcepub fn create_tenant(
&self,
id: String,
name: String,
quotas: TenantQuotas,
) -> Result<Tenant>
pub fn create_tenant( &self, id: String, name: String, quotas: TenantQuotas, ) -> Result<Tenant>
Create tenant
Sourcepub fn get_tenant(&self, tenant_id: &str) -> Result<Tenant>
pub fn get_tenant(&self, tenant_id: &str) -> Result<Tenant>
Get tenant
Sourcepub fn update_quotas(&self, tenant_id: &str, quotas: TenantQuotas) -> Result<()>
pub fn update_quotas(&self, tenant_id: &str, quotas: TenantQuotas) -> Result<()>
Update tenant quotas
Sourcepub fn deactivate_tenant(&self, tenant_id: &str) -> Result<()>
pub fn deactivate_tenant(&self, tenant_id: &str) -> Result<()>
Deactivate tenant
Sourcepub fn activate_tenant(&self, tenant_id: &str) -> Result<()>
pub fn activate_tenant(&self, tenant_id: &str) -> Result<()>
Activate tenant
Sourcepub fn delete_tenant(&self, tenant_id: &str) -> Result<()>
pub fn delete_tenant(&self, tenant_id: &str) -> Result<()>
Delete tenant
Sourcepub fn list_tenants(&self) -> Vec<Tenant>
pub fn list_tenants(&self) -> Vec<Tenant>
List all tenants
Sourcepub fn check_can_ingest(&self, tenant_id: &str) -> Result<()>
pub fn check_can_ingest(&self, tenant_id: &str) -> Result<()>
Check if tenant can ingest event
Sourcepub fn record_ingestion(&self, tenant_id: &str, size_bytes: u64) -> Result<()>
pub fn record_ingestion(&self, tenant_id: &str, size_bytes: u64) -> Result<()>
Record event ingestion
Sourcepub fn check_can_query(&self, tenant_id: &str) -> Result<()>
pub fn check_can_query(&self, tenant_id: &str) -> Result<()>
Check if tenant can query
Sourcepub fn record_query(&self, tenant_id: &str) -> Result<()>
pub fn record_query(&self, tenant_id: &str) -> Result<()>
Record query execution
Trait Implementations§
Auto Trait Implementations§
impl Freeze for TenantManager
impl !RefUnwindSafe for TenantManager
impl Send for TenantManager
impl Sync for TenantManager
impl Unpin for TenantManager
impl !UnwindSafe for TenantManager
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more