pub struct TenantProjectionManager { /* private fields */ }Expand description
Manager for tenant-scoped projections
Implementations§
Source§impl TenantProjectionManager
impl TenantProjectionManager
pub fn new( tenant_id: TenantId, isolation: Arc<TenantIsolation>, quota: Arc<TenantQuota>, ) -> Self
Sourcepub fn register_projection(
&self,
name: String,
projection: Arc<dyn Projection + Send + Sync>,
) -> Result<Arc<TenantScopedProjection>>
pub fn register_projection( &self, name: String, projection: Arc<dyn Projection + Send + Sync>, ) -> Result<Arc<TenantScopedProjection>>
Register a new projection for this tenant
Sourcepub fn get_projection(&self, name: &str) -> Option<Arc<TenantScopedProjection>>
pub fn get_projection(&self, name: &str) -> Option<Arc<TenantScopedProjection>>
Get a projection by name
Sourcepub fn list_projections(&self) -> Vec<String>
pub fn list_projections(&self) -> Vec<String>
List all projections for this tenant
Sourcepub fn remove_projection(&self, name: &str) -> Result<()>
pub fn remove_projection(&self, name: &str) -> Result<()>
Remove a projection
Sourcepub fn get_aggregated_metrics(&self) -> TenantProjectionMetrics
pub fn get_aggregated_metrics(&self) -> TenantProjectionMetrics
Get aggregated metrics for all projections
Sourcepub async fn process_event(&self, event: Event) -> Result<()>
pub async fn process_event(&self, event: Event) -> Result<()>
Process an event through all registered projections
pub fn get_registry(&self) -> TenantProjectionRegistry
Auto Trait Implementations§
impl Freeze for TenantProjectionManager
impl RefUnwindSafe for TenantProjectionManager
impl Send for TenantProjectionManager
impl Sync for TenantProjectionManager
impl Unpin for TenantProjectionManager
impl UnwindSafe for TenantProjectionManager
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