pub struct MultiTenantWorkspaceRegistry { /* private fields */ }Will be extracted to mockforge-workspace crate
Expand description
Multi-tenant workspace registry for managing multiple isolated workspaces
Implementations§
Source§impl MultiTenantWorkspaceRegistry
impl MultiTenantWorkspaceRegistry
Sourcepub fn new(config: MultiTenantConfig) -> Self
👎Deprecated: Will be extracted to mockforge-workspace crate
pub fn new(config: MultiTenantConfig) -> Self
Will be extracted to mockforge-workspace crate
Create a new multi-tenant workspace registry
Sourcepub fn with_default_workspace(workspace_name: String) -> Self
👎Deprecated: Will be extracted to mockforge-workspace crate
pub fn with_default_workspace(workspace_name: String) -> Self
Will be extracted to mockforge-workspace crate
Create with default configuration
Sourcepub fn register_workspace(
&mut self,
workspace_id: String,
workspace: Workspace,
) -> Result<()>
👎Deprecated: Will be extracted to mockforge-workspace crate
pub fn register_workspace( &mut self, workspace_id: String, workspace: Workspace, ) -> Result<()>
Will be extracted to mockforge-workspace crate
Register a new workspace
Sourcepub fn get_workspace(&self, workspace_id: &str) -> Result<TenantWorkspace>
👎Deprecated: Will be extracted to mockforge-workspace crate
pub fn get_workspace(&self, workspace_id: &str) -> Result<TenantWorkspace>
Will be extracted to mockforge-workspace crate
Get a workspace by ID
Sourcepub fn get_default_workspace(&self) -> Result<TenantWorkspace>
👎Deprecated: Will be extracted to mockforge-workspace crate
pub fn get_default_workspace(&self) -> Result<TenantWorkspace>
Will be extracted to mockforge-workspace crate
Get the default workspace
Sourcepub fn update_workspace(
&mut self,
workspace_id: &str,
workspace: Workspace,
) -> Result<()>
👎Deprecated: Will be extracted to mockforge-workspace crate
pub fn update_workspace( &mut self, workspace_id: &str, workspace: Workspace, ) -> Result<()>
Will be extracted to mockforge-workspace crate
Update workspace
Sourcepub fn remove_workspace(&mut self, workspace_id: &str) -> Result<()>
👎Deprecated: Will be extracted to mockforge-workspace crate
pub fn remove_workspace(&mut self, workspace_id: &str) -> Result<()>
Will be extracted to mockforge-workspace crate
Remove a workspace
Sourcepub fn list_workspaces(&self) -> Result<Vec<(String, TenantWorkspace)>>
👎Deprecated: Will be extracted to mockforge-workspace crate
pub fn list_workspaces(&self) -> Result<Vec<(String, TenantWorkspace)>>
Will be extracted to mockforge-workspace crate
List all workspaces
Sourcepub fn resolve_workspace(
&self,
workspace_id: Option<&str>,
) -> Result<TenantWorkspace>
👎Deprecated: Will be extracted to mockforge-workspace crate
pub fn resolve_workspace( &self, workspace_id: Option<&str>, ) -> Result<TenantWorkspace>
Will be extracted to mockforge-workspace crate
Get workspace by ID or default
Sourcepub fn touch_workspace(&mut self, workspace_id: &str) -> Result<()>
👎Deprecated: Will be extracted to mockforge-workspace crate
pub fn touch_workspace(&mut self, workspace_id: &str) -> Result<()>
Will be extracted to mockforge-workspace crate
Update workspace last accessed time
Sourcepub fn update_workspace_stats(
&mut self,
workspace_id: &str,
response_time_ms: f64,
) -> Result<()>
👎Deprecated: Will be extracted to mockforge-workspace crate
pub fn update_workspace_stats( &mut self, workspace_id: &str, response_time_ms: f64, ) -> Result<()>
Will be extracted to mockforge-workspace crate
Update workspace statistics
Sourcepub fn workspace_count(&self) -> Result<usize>
👎Deprecated: Will be extracted to mockforge-workspace crate
pub fn workspace_count(&self) -> Result<usize>
Will be extracted to mockforge-workspace crate
Get workspace count
Sourcepub fn workspace_exists(&self, workspace_id: &str) -> bool
👎Deprecated: Will be extracted to mockforge-workspace crate
pub fn workspace_exists(&self, workspace_id: &str) -> bool
Will be extracted to mockforge-workspace crate
Check if workspace exists
Sourcepub fn set_workspace_enabled(
&mut self,
workspace_id: &str,
enabled: bool,
) -> Result<()>
👎Deprecated: Will be extracted to mockforge-workspace crate
pub fn set_workspace_enabled( &mut self, workspace_id: &str, enabled: bool, ) -> Result<()>
Will be extracted to mockforge-workspace crate
Enable/disable a workspace
Sourcepub fn global_logger(&self) -> &Arc<CentralizedRequestLogger>
👎Deprecated: Will be extracted to mockforge-workspace crate
pub fn global_logger(&self) -> &Arc<CentralizedRequestLogger>
Will be extracted to mockforge-workspace crate
Get the global request logger
Sourcepub fn config(&self) -> &MultiTenantConfig
👎Deprecated: Will be extracted to mockforge-workspace crate
pub fn config(&self) -> &MultiTenantConfig
Will be extracted to mockforge-workspace crate
Get configuration
Sourcepub fn extract_workspace_id_from_path(&self, path: &str) -> Option<String>
👎Deprecated: Will be extracted to mockforge-workspace crate
pub fn extract_workspace_id_from_path(&self, path: &str) -> Option<String>
Will be extracted to mockforge-workspace crate
Extract workspace ID from request path
Sourcepub fn strip_workspace_prefix(&self, path: &str, workspace_id: &str) -> String
👎Deprecated: Will be extracted to mockforge-workspace crate
pub fn strip_workspace_prefix(&self, path: &str, workspace_id: &str) -> String
Will be extracted to mockforge-workspace crate
Strip workspace prefix from path
Trait Implementations§
Source§impl Clone for MultiTenantWorkspaceRegistry
impl Clone for MultiTenantWorkspaceRegistry
Source§fn clone(&self) -> MultiTenantWorkspaceRegistry
fn clone(&self) -> MultiTenantWorkspaceRegistry
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl Freeze for MultiTenantWorkspaceRegistry
impl !RefUnwindSafe for MultiTenantWorkspaceRegistry
impl Send for MultiTenantWorkspaceRegistry
impl Sync for MultiTenantWorkspaceRegistry
impl Unpin for MultiTenantWorkspaceRegistry
impl UnsafeUnpin for MultiTenantWorkspaceRegistry
impl !UnwindSafe for MultiTenantWorkspaceRegistry
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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>
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>
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