pub trait GatewayPort: Send + Sync {
// Required methods
fn status<'life0, 'life1, 'async_trait>(
&'life0 self,
context: &'life1 ExecutionContext,
) -> Pin<Box<dyn Future<Output = Result<Value, PortError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn reload<'life0, 'life1, 'async_trait>(
&'life0 self,
request: GatewayReloadRequest,
context: &'life1 ExecutionContext,
) -> Pin<Box<dyn Future<Output = Result<Value, PortError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn execute<'life0, 'life1, 'async_trait>(
&'life0 self,
request: GatewayExecuteRequest,
context: &'life1 ExecutionContext,
) -> Pin<Box<dyn Future<Output = Result<Value, PortError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn list_mcp_tools<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
scope: Option<&'life1 GatewayRouteScope>,
context: &'life2 ExecutionContext,
) -> Pin<Box<dyn Future<Output = Result<Vec<GatewayToolRoute>, PortError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
fn call_mcp_tool<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
name: &'life1 str,
params: Value,
scope: Option<&'life2 GatewayRouteScope>,
context: &'life3 ExecutionContext,
) -> Pin<Box<dyn Future<Output = Result<Option<Value>, PortError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait;
fn list_mcp_resources<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
scope: Option<&'life1 GatewayRouteScope>,
context: &'life2 ExecutionContext,
) -> Pin<Box<dyn Future<Output = Result<Vec<GatewayResourceRoute>, PortError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
fn read_mcp_resource<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
uri: &'life1 str,
scope: Option<&'life2 GatewayRouteScope>,
context: &'life3 ExecutionContext,
) -> Pin<Box<dyn Future<Output = Result<Option<Value>, PortError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait;
fn list_mcp_prompts<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
scope: Option<&'life1 GatewayRouteScope>,
context: &'life2 ExecutionContext,
) -> Pin<Box<dyn Future<Output = Result<Vec<GatewayPromptRoute>, PortError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
fn get_mcp_prompt<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
name: &'life1 str,
arguments: Option<Map<String, Value>>,
scope: Option<&'life2 GatewayRouteScope>,
context: &'life3 ExecutionContext,
) -> Pin<Box<dyn Future<Output = Result<Option<Value>, PortError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait;
}Expand description
Port to the MCP gateway engine: status, reload, execution, and tool/resource/prompt routing.
Required Methods§
Sourcefn status<'life0, 'life1, 'async_trait>(
&'life0 self,
context: &'life1 ExecutionContext,
) -> Pin<Box<dyn Future<Output = Result<Value, PortError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn status<'life0, 'life1, 'async_trait>(
&'life0 self,
context: &'life1 ExecutionContext,
) -> Pin<Box<dyn Future<Output = Result<Value, PortError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Returns the gateway’s current status snapshot.
Sourcefn reload<'life0, 'life1, 'async_trait>(
&'life0 self,
request: GatewayReloadRequest,
context: &'life1 ExecutionContext,
) -> Pin<Box<dyn Future<Output = Result<Value, PortError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn reload<'life0, 'life1, 'async_trait>(
&'life0 self,
request: GatewayReloadRequest,
context: &'life1 ExecutionContext,
) -> Pin<Box<dyn Future<Output = Result<Value, PortError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Reloads the gateway configuration.
Sourcefn execute<'life0, 'life1, 'async_trait>(
&'life0 self,
request: GatewayExecuteRequest,
context: &'life1 ExecutionContext,
) -> Pin<Box<dyn Future<Output = Result<Value, PortError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn execute<'life0, 'life1, 'async_trait>(
&'life0 self,
request: GatewayExecuteRequest,
context: &'life1 ExecutionContext,
) -> Pin<Box<dyn Future<Output = Result<Value, PortError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Executes a gateway operation.
Sourcefn list_mcp_tools<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
scope: Option<&'life1 GatewayRouteScope>,
context: &'life2 ExecutionContext,
) -> Pin<Box<dyn Future<Output = Result<Vec<GatewayToolRoute>, PortError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn list_mcp_tools<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
scope: Option<&'life1 GatewayRouteScope>,
context: &'life2 ExecutionContext,
) -> Pin<Box<dyn Future<Output = Result<Vec<GatewayToolRoute>, PortError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Lists MCP tool routes exposed through the gateway, optionally scoped.
Sourcefn call_mcp_tool<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
name: &'life1 str,
params: Value,
scope: Option<&'life2 GatewayRouteScope>,
context: &'life3 ExecutionContext,
) -> Pin<Box<dyn Future<Output = Result<Option<Value>, PortError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
fn call_mcp_tool<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
name: &'life1 str,
params: Value,
scope: Option<&'life2 GatewayRouteScope>,
context: &'life3 ExecutionContext,
) -> Pin<Box<dyn Future<Output = Result<Option<Value>, PortError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Calls an MCP tool by name through the gateway.
Sourcefn list_mcp_resources<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
scope: Option<&'life1 GatewayRouteScope>,
context: &'life2 ExecutionContext,
) -> Pin<Box<dyn Future<Output = Result<Vec<GatewayResourceRoute>, PortError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn list_mcp_resources<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
scope: Option<&'life1 GatewayRouteScope>,
context: &'life2 ExecutionContext,
) -> Pin<Box<dyn Future<Output = Result<Vec<GatewayResourceRoute>, PortError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Lists MCP resource routes exposed through the gateway, optionally scoped.
Sourcefn read_mcp_resource<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
uri: &'life1 str,
scope: Option<&'life2 GatewayRouteScope>,
context: &'life3 ExecutionContext,
) -> Pin<Box<dyn Future<Output = Result<Option<Value>, PortError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
fn read_mcp_resource<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
uri: &'life1 str,
scope: Option<&'life2 GatewayRouteScope>,
context: &'life3 ExecutionContext,
) -> Pin<Box<dyn Future<Output = Result<Option<Value>, PortError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Reads an MCP resource by URI through the gateway.
Sourcefn list_mcp_prompts<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
scope: Option<&'life1 GatewayRouteScope>,
context: &'life2 ExecutionContext,
) -> Pin<Box<dyn Future<Output = Result<Vec<GatewayPromptRoute>, PortError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn list_mcp_prompts<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
scope: Option<&'life1 GatewayRouteScope>,
context: &'life2 ExecutionContext,
) -> Pin<Box<dyn Future<Output = Result<Vec<GatewayPromptRoute>, PortError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Lists MCP prompt routes exposed through the gateway, optionally scoped.
Sourcefn get_mcp_prompt<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
name: &'life1 str,
arguments: Option<Map<String, Value>>,
scope: Option<&'life2 GatewayRouteScope>,
context: &'life3 ExecutionContext,
) -> Pin<Box<dyn Future<Output = Result<Option<Value>, PortError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
fn get_mcp_prompt<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
name: &'life1 str,
arguments: Option<Map<String, Value>>,
scope: Option<&'life2 GatewayRouteScope>,
context: &'life3 ExecutionContext,
) -> Pin<Box<dyn Future<Output = Result<Option<Value>, PortError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Gets an MCP prompt by name, with optional arguments, through the gateway.