pub enum ServeTarget {
Http {
bind: String,
tls: bool,
},
Unix {
path: String,
},
}Expand description
Where --serve-mcp binds the served self-MCP. Stdio is the implicit
default (no --serve-mcp). The sole transport is
Http — https://HOST:PORT (TLS, the control plane) or
http://LOOPBACK:PORT (plaintext, loopback-only dev/tests).
Variants§
Http
Bind an HTTP(S) listener at bind (a host:port authority). tls is the
production control plane (https://); plaintext (http://) is admitted
only for a loopback host (dev/tests).
Unix
Bind a unix domain socket at path (unix:///run/agentd/a2a.sock) —
the co-located-peers transport: same HTTP/1.1 + JSON-RPC over the socket,
no TLS (the kernel authenticates the peer by uid), no TCP overhead.
Implementations§
Source§impl ServeTarget
impl ServeTarget
Sourcepub fn parse(spec: &str) -> Result<ServeTarget, ConfigError>
pub fn parse(spec: &str) -> Result<ServeTarget, ConfigError>
Parse a --serve-mcp value: https://host:port (or loopback
http://host:port for dev). Returns a ConfigError::Usage (exit 2,
before any side effect) on a bad scheme / missing port / a path.
Trait Implementations§
Source§impl Clone for ServeTarget
impl Clone for ServeTarget
Source§fn clone(&self) -> ServeTarget
fn clone(&self) -> ServeTarget
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more