pub struct McpListenerShell { /* private fields */ }Expand description
Back-compat alias: the MCP gateway owns the loopback listener. Production MCP gateway: one loopback listener, many capability routes.
Implementations§
Source§impl McpGateway
impl McpGateway
Sourcepub async fn bind_loopback(max_routes: usize) -> Result<Self, McpInstallError>
pub async fn bind_loopback(max_routes: usize) -> Result<Self, McpInstallError>
Bind 127.0.0.1:0, serve Streamable HTTP, fail closed if not loopback.
Sourcepub fn handle(&self) -> McpGatewayHandle
pub fn handle(&self) -> McpGatewayHandle
Cloneable handle for actors and admission.
Sourcepub fn local_addr(&self) -> SocketAddr
pub fn local_addr(&self) -> SocketAddr
Bound loopback address.
Sourcepub fn routes(&self) -> &Arc<McpRouteTable> ⓘ
pub fn routes(&self) -> &Arc<McpRouteTable> ⓘ
Shared route table.
Sourcepub fn install_pending(
&self,
transaction_id: TransactionId,
tools: ResolvedToolSet,
dispatcher: Arc<TransactionToolDispatcher>,
exchange_id: ExchangeId,
) -> Result<PendingMcpBinding, McpInstallError>
pub fn install_pending( &self, transaction_id: TransactionId, tools: ResolvedToolSet, dispatcher: Arc<TransactionToolDispatcher>, exchange_id: ExchangeId, ) -> Result<PendingMcpBinding, McpInstallError>
Install a pending capability for a transaction.
Sourcepub fn activate(&self, token: &CapabilityToken) -> Result<(), McpInstallError>
pub fn activate(&self, token: &CapabilityToken) -> Result<(), McpInstallError>
Activate a pending capability.
Sourcepub fn revoke(&self, token: &CapabilityToken) -> bool
pub fn revoke(&self, token: &CapabilityToken) -> bool
Revoke one capability (idempotent).
Auto Trait Implementations§
impl Freeze for McpGateway
impl RefUnwindSafe for McpGateway
impl Send for McpGateway
impl Sync for McpGateway
impl Unpin for McpGateway
impl UnsafeUnpin for McpGateway
impl UnwindSafe for McpGateway
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
Mutably borrows from an owned value. Read more