pub struct GatewayServer {
pub name: String,
pub transport: TransportKind,
pub enabled: bool,
pub command: String,
pub args: Vec<String>,
pub env: BTreeMap<String, String>,
pub url: String,
pub headers: BTreeMap<String, String>,
}Expand description
A single downstream MCP server entry ([[gateway.servers]]).
Flat shape (rather than an internally-tagged enum) so it round-trips
cleanly through TOML array-of-tables. Validated into a ResolvedTransport
via GatewayServer::resolve before use.
Fields§
§name: StringStable identifier; becomes the catalog namespace (name::tool).
transport: TransportKindstdio (spawn command) or http (connect to url).
enabled: boolPer-server switch; lets you keep an entry but skip it.
command: StringExecutable to spawn (stdio transport).
args: Vec<String>Arguments passed to command.
env: BTreeMap<String, String>Extra environment variables for the child process.
url: StringStreamable-HTTP endpoint (http transport).
headers: BTreeMap<String, String>Extra request headers (e.g. auth) for the http transport.
Implementations§
Source§impl GatewayServer
impl GatewayServer
Sourcepub fn resolve(&self) -> Result<ResolvedTransport, String>
pub fn resolve(&self) -> Result<ResolvedTransport, String>
Validate the entry and produce a usable transport, or a human-readable reason why it cannot be used.
Trait Implementations§
Source§impl Clone for GatewayServer
impl Clone for GatewayServer
Source§fn clone(&self) -> GatewayServer
fn clone(&self) -> GatewayServer
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for GatewayServer
impl Debug for GatewayServer
Source§impl Default for GatewayServer
impl Default for GatewayServer
Source§impl<'de> Deserialize<'de> for GatewayServerwhere
GatewayServer: Default,
impl<'de> Deserialize<'de> for GatewayServerwhere
GatewayServer: Default,
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for GatewayServer
Source§impl PartialEq for GatewayServer
impl PartialEq for GatewayServer
Source§fn eq(&self, other: &GatewayServer) -> bool
fn eq(&self, other: &GatewayServer) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for GatewayServer
impl Serialize for GatewayServer
impl StructuralPartialEq for GatewayServer
Auto Trait Implementations§
impl Freeze for GatewayServer
impl RefUnwindSafe for GatewayServer
impl Send for GatewayServer
impl Sync for GatewayServer
impl Unpin for GatewayServer
impl UnsafeUnpin for GatewayServer
impl UnwindSafe for GatewayServer
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.impl<A, B, T> HttpServerConnExec<A, B> for Twhere
B: Body,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more