Skip to main content

run_rustapi_and_mcp_with_shutdown

Function run_rustapi_and_mcp_with_shutdown 

Source
pub async fn run_rustapi_and_mcp_with_shutdown<SF>(
    app: RustApi,
    http_addr: impl AsRef<str>,
    mcp: McpServer,
    mcp_addr: impl AsRef<str>,
    shutdown_signal: SF,
) -> Result<()>
where SF: Future<Output = ()> + Send + 'static,
Expand description

Run RustAPI HTTP + MCP with a shared shutdown signal.

Useful with tokio::signal::ctrl_c() so that Ctrl+C stops both servers cleanly.