pub struct GatewayManager { /* private fields */ }Implementations§
Source§impl GatewayManager
impl GatewayManager
pub fn reload(&self, next: GatewayConfig) -> Result<(), GatewayManagerError>
pub fn upstream_config(&self, name: &str) -> Option<UpstreamConfig>
pub async fn upstream_oauth_access_token( &self, upstream: &UpstreamConfig, subject: &str, ) -> Result<Option<String>, GatewayManagerError>
Source§impl GatewayManager
impl GatewayManager
pub async fn rmcp_tool_routes(&self) -> Result<Vec<Tool>, GatewayManagerError>
pub async fn rmcp_tool_routes_for_subject( &self, subject: Option<&str>, ) -> Result<Vec<Tool>, GatewayManagerError>
pub async fn rmcp_resource_routes( &self, ) -> Result<Vec<Resource>, GatewayManagerError>
pub async fn rmcp_resource_routes_for_subject( &self, subject: Option<&str>, ) -> Result<Vec<Resource>, GatewayManagerError>
pub async fn rmcp_prompt_routes( &self, ) -> Result<Vec<Prompt>, GatewayManagerError>
pub async fn rmcp_prompt_routes_for_subject( &self, subject: Option<&str>, ) -> Result<Vec<Prompt>, GatewayManagerError>
Source§impl GatewayManager
impl GatewayManager
pub async fn tool_routes( &self, ) -> Result<Vec<GatewayToolRoute>, GatewayManagerError>
pub async fn tool_routes_for_subject( &self, subject: Option<&str>, ) -> Result<Vec<GatewayToolRoute>, GatewayManagerError>
pub async fn call_mcp_tool( &self, name: &str, params: Value, ) -> Result<Option<Value>, GatewayManagerError>
pub async fn call_mcp_tool_for_subject( &self, name: &str, params: Value, subject: Option<&str>, ) -> Result<Option<Value>, GatewayManagerError>
pub async fn resource_routes( &self, ) -> Result<Vec<GatewayResourceRoute>, GatewayManagerError>
pub async fn resource_routes_for_subject( &self, subject: Option<&str>, ) -> Result<Vec<GatewayResourceRoute>, GatewayManagerError>
pub async fn read_mcp_resource( &self, uri: &str, ) -> Result<Option<Value>, GatewayManagerError>
pub async fn read_mcp_resource_for_subject( &self, uri: &str, subject: Option<&str>, ) -> Result<Option<Value>, GatewayManagerError>
pub async fn prompt_routes( &self, ) -> Result<Vec<GatewayPromptRoute>, GatewayManagerError>
pub async fn prompt_routes_for_subject( &self, subject: Option<&str>, ) -> Result<Vec<GatewayPromptRoute>, GatewayManagerError>
pub async fn get_mcp_prompt( &self, name: &str, arguments: Option<Map<String, Value>>, ) -> Result<Option<Value>, GatewayManagerError>
pub async fn get_mcp_prompt_for_subject( &self, name: &str, arguments: Option<Map<String, Value>>, subject: Option<&str>, ) -> Result<Option<Value>, GatewayManagerError>
Source§impl GatewayManager
impl GatewayManager
pub async fn tool_routes_for_subject_and_scope( &self, subject: Option<&str>, scope: Option<&ProtectedRouteScope>, ) -> Result<Vec<GatewayToolRoute>, GatewayManagerError>
pub async fn call_mcp_tool_for_subject_and_scope( &self, name: &str, params: Value, subject: Option<&str>, scope: Option<&ProtectedRouteScope>, ) -> Result<Option<Value>, GatewayManagerError>
pub async fn resource_routes_for_subject_and_scope( &self, subject: Option<&str>, scope: Option<&ProtectedRouteScope>, ) -> Result<Vec<GatewayResourceRoute>, GatewayManagerError>
pub async fn read_mcp_resource_for_subject_and_scope( &self, uri: &str, subject: Option<&str>, scope: Option<&ProtectedRouteScope>, ) -> Result<Option<Value>, GatewayManagerError>
pub async fn prompt_routes_for_subject_and_scope( &self, subject: Option<&str>, scope: Option<&ProtectedRouteScope>, ) -> Result<Vec<GatewayPromptRoute>, GatewayManagerError>
pub async fn get_mcp_prompt_for_subject_and_scope( &self, name: &str, arguments: Option<Map<String, Value>>, subject: Option<&str>, scope: Option<&ProtectedRouteScope>, ) -> Result<Option<Value>, GatewayManagerError>
Source§impl GatewayManager
impl GatewayManager
pub async fn upstream_oauth_status( &self, upstream: &str, subject: &str, ) -> Result<UpstreamOauthStatusView, GatewayManagerError>
pub async fn clear_upstream_credentials( &self, upstream: &str, subject: &str, ) -> Result<(), GatewayManagerError>
Source§impl GatewayManager
impl GatewayManager
pub fn protected_route_list(&self) -> Vec<ProtectedMcpRouteConfig>
pub fn resolve_protected_route( &self, host: &str, path: &str, ) -> Option<ProtectedMcpRouteConfig>
pub fn resolve_protected_route_metadata( &self, host: &str, path: &str, ) -> Option<ProtectedMcpRouteConfig>
pub async fn protected_route_projections(&self) -> Vec<ProtectedRouteProjection>
Source§impl GatewayManager
impl GatewayManager
pub fn virtual_server_projections(&self) -> Vec<VirtualServerProjection>
Source§impl GatewayManager
impl GatewayManager
pub fn new(config: GatewayConfig) -> Result<Self, GatewayManagerError>
pub fn with_usage( config: GatewayConfig, usage: Arc<dyn UsageSink>, ) -> Result<Self, GatewayManagerError>
pub fn from_store( store: FsGatewayConfigStore, ) -> Result<Self, GatewayManagerError>
pub fn lifecycle(&self) -> GatewayLifecycle
pub fn config_view(&self) -> GatewayConfigView
pub async fn discover( &self, ) -> Result<Vec<UpstreamSnapshot>, GatewayManagerError>
pub fn exposed_tool_count(&self) -> Result<usize, GatewayManagerError>
pub async fn call_tool( &self, upstream: impl Into<String>, tool: impl Into<String>, params: Value, ) -> Result<Value, GatewayManagerError>
pub fn add_upstream( &self, upstream: UpstreamConfig, ) -> Result<GatewayConfigView, GatewayManagerError>
pub fn update_upstream( &self, upstream: UpstreamConfig, ) -> Result<GatewayConfigView, GatewayManagerError>
pub fn remove_upstream( &self, name: &str, ) -> Result<GatewayConfigView, GatewayManagerError>
pub fn reload_from_store( &self, ) -> Result<GatewayConfigView, GatewayManagerError>
pub fn install_upstream_oauth_runtime(&self, runtime: UpstreamOAuthRuntime)
Auto Trait Implementations§
impl !Freeze for GatewayManager
impl !RefUnwindSafe for GatewayManager
impl Send for GatewayManager
impl Sync for GatewayManager
impl Unpin for GatewayManager
impl UnsafeUnpin for GatewayManager
impl !UnwindSafe for GatewayManager
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