pub struct AppRuntimePoolApi { /* private fields */ }Expand description
Public API around AppRuntimePool that exposes pooled lifecycle helpers.
Operations reuse running runtimes when available while preserving stored definitions and app metadata/resume hints.
Implementations§
Source§impl AppRuntimePoolApi
impl AppRuntimePoolApi
Sourcepub fn new(launchers: Vec<AppRuntimeLauncher>) -> Self
pub fn new(launchers: Vec<AppRuntimeLauncher>) -> Self
Build a pooled API from prepared launchers.
Sourcepub fn from_config(
config: &McpConfigManager,
defaults: &StdioServerConfig,
) -> Result<Self, McpConfigError>
pub fn from_config( config: &McpConfigManager, defaults: &StdioServerConfig, ) -> Result<Self, McpConfigError>
Load app runtimes from disk and merge Workstream A stdio defaults.
Sourcepub fn from_manager(manager: AppRuntimeManager) -> Self
pub fn from_manager(manager: AppRuntimeManager) -> Self
Build a pooled API from a runtime manager.
Sourcepub fn from_pool(pool: AppRuntimePool) -> Self
pub fn from_pool(pool: AppRuntimePool) -> Self
Wrap an existing pool in the API surface.
Sourcepub fn available(&self) -> Vec<AppRuntimeSummary>
pub fn available(&self) -> Vec<AppRuntimeSummary>
List available runtimes and metadata.
Sourcepub async fn running(&self) -> Vec<AppRuntimeSummary>
pub async fn running(&self) -> Vec<AppRuntimeSummary>
List running runtimes with metadata intact.
Sourcepub fn launcher(
&self,
name: &str,
) -> Result<AppRuntimeLauncher, AppRuntimeError>
pub fn launcher( &self, name: &str, ) -> Result<AppRuntimeLauncher, AppRuntimeError>
Returns the launch-ready config bundle for the given runtime.
Sourcepub fn prepare(&self, name: &str) -> Result<AppRuntimeHandle, AppRuntimeError>
pub fn prepare(&self, name: &str) -> Result<AppRuntimeHandle, AppRuntimeError>
Prepare a stdio config + metadata for a runtime.
Sourcepub async fn start(
&self,
name: &str,
client: ClientInfo,
) -> Result<Arc<ManagedAppRuntime>, AppRuntimeError>
pub async fn start( &self, name: &str, client: ClientInfo, ) -> Result<Arc<ManagedAppRuntime>, AppRuntimeError>
Start (or reuse) an app runtime.
Sourcepub async fn stop(&self, name: &str) -> Result<(), AppRuntimeError>
pub async fn stop(&self, name: &str) -> Result<(), AppRuntimeError>
Stop a running runtime and remove it from the pool.
Sourcepub async fn stop_all(&self) -> Result<(), AppRuntimeError>
pub async fn stop_all(&self) -> Result<(), AppRuntimeError>
Stop all running runtimes (best-effort) and clear the pool.
Sourcepub fn stdio_config(
&self,
name: &str,
) -> Result<StdioServerConfig, AppRuntimeError>
pub fn stdio_config( &self, name: &str, ) -> Result<StdioServerConfig, AppRuntimeError>
Convenience accessor for the merged stdio config.
Trait Implementations§
Source§impl Clone for AppRuntimePoolApi
impl Clone for AppRuntimePoolApi
Source§fn clone(&self) -> AppRuntimePoolApi
fn clone(&self) -> AppRuntimePoolApi
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more