Skip to main content

IsolationHandler

Trait IsolationHandler 

Source
pub trait IsolationHandler: Send + Sync {
    // Required methods
    fn get_routing(
        &self,
        tenant: &TenantId,
        config: &TenantConfig,
    ) -> RoutingDecision;
    fn can_access_table(
        &self,
        tenant: &TenantId,
        table: &str,
        config: &TenantConfig,
    ) -> bool;
    fn strategy_name(&self) -> &'static str;
}
Expand description

Trait for isolation strategy handlers

Required Methods§

Source

fn get_routing( &self, tenant: &TenantId, config: &TenantConfig, ) -> RoutingDecision

Get routing decision for tenant

Source

fn can_access_table( &self, tenant: &TenantId, table: &str, config: &TenantConfig, ) -> bool

Check if tenant can access a table

Source

fn strategy_name(&self) -> &'static str

Get isolation strategy name

Implementors§