pub struct ProjectRegistry {
pub version: String,
pub projects: Vec<RegisteredProject>,
}Expand description
Global project registry for managing multiple Dashboard instances
Fields§
§version: String§projects: Vec<RegisteredProject>Implementations§
Source§impl ProjectRegistry
impl ProjectRegistry
Sourcepub fn allocate_port(&mut self) -> Result<u16>
pub fn allocate_port(&mut self) -> Result<u16>
Allocate port (always uses DEFAULT_PORT)
Sourcepub fn is_port_available(port: u16) -> bool
pub fn is_port_available(port: u16) -> bool
Check if a port is available on the system Tests binding to 0.0.0.0 to match the actual Dashboard bind address
Sourcepub fn register(&mut self, project: RegisteredProject)
pub fn register(&mut self, project: RegisteredProject)
Register a new project
Sourcepub fn unregister(&mut self, path: &PathBuf)
pub fn unregister(&mut self, path: &PathBuf)
Unregister a project by path
Sourcepub fn find_by_path(&self, path: &PathBuf) -> Option<&RegisteredProject>
pub fn find_by_path(&self, path: &PathBuf) -> Option<&RegisteredProject>
Find project by path
Sourcepub fn find_by_path_mut(
&mut self,
path: &PathBuf,
) -> Option<&mut RegisteredProject>
pub fn find_by_path_mut( &mut self, path: &PathBuf, ) -> Option<&mut RegisteredProject>
Find project by path (mutable)
Sourcepub fn find_by_port(&self, port: u16) -> Option<&RegisteredProject>
pub fn find_by_port(&self, port: u16) -> Option<&RegisteredProject>
Find project by port
Sourcepub fn list_all(&self) -> &[RegisteredProject]
pub fn list_all(&self) -> &[RegisteredProject]
Get all registered projects
Sourcepub fn register_mcp_connection(
&mut self,
path: &PathBuf,
agent_name: Option<String>,
) -> Result<()>
pub fn register_mcp_connection( &mut self, path: &PathBuf, agent_name: Option<String>, ) -> Result<()>
Register or update MCP connection for a project This will create a project entry if none exists (for MCP-only projects)
Sourcepub fn update_mcp_heartbeat(&mut self, path: &PathBuf) -> Result<()>
pub fn update_mcp_heartbeat(&mut self, path: &PathBuf) -> Result<()>
Update MCP heartbeat If the project doesn’t exist, it will be auto-registered as an MCP-only project
Sourcepub fn unregister_mcp_connection(&mut self, path: &PathBuf) -> Result<()>
pub fn unregister_mcp_connection(&mut self, path: &PathBuf) -> Result<()>
Unregister MCP connection
Sourcepub fn cleanup_dead_processes(&mut self)
pub fn cleanup_dead_processes(&mut self)
Clean up projects with dead PIDs
Sourcepub async fn cleanup_unhealthy_dashboards(&mut self)
pub async fn cleanup_unhealthy_dashboards(&mut self)
Clean up projects that are not responding to health checks This is more reliable than PID-based checking
Sourcepub fn cleanup_stale_mcp_connections(&mut self)
pub fn cleanup_stale_mcp_connections(&mut self)
Clean up stale MCP connections (no heartbeat for 5 minutes)
Trait Implementations§
Source§impl Clone for ProjectRegistry
impl Clone for ProjectRegistry
Source§fn clone(&self) -> ProjectRegistry
fn clone(&self) -> ProjectRegistry
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ProjectRegistry
impl Debug for ProjectRegistry
Source§impl Default for ProjectRegistry
impl Default for ProjectRegistry
Source§impl<'de> Deserialize<'de> for ProjectRegistry
impl<'de> Deserialize<'de> for ProjectRegistry
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Auto Trait Implementations§
impl Freeze for ProjectRegistry
impl RefUnwindSafe for ProjectRegistry
impl Send for ProjectRegistry
impl Sync for ProjectRegistry
impl Unpin for ProjectRegistry
impl UnwindSafe for ProjectRegistry
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