pub struct A2aPeerSpec {
pub name: String,
pub endpoint: String,
pub headers: Vec<(String, String)>,
pub client_cert: Option<String>,
pub client_key: Option<String>,
}Expand description
A declared A2A peer: a name and a client transport endpoint to reach a
remote A2A agent (or the on-node gateway that forwards into the mesh). This
is the delegation-backend axis of RFC 0020 §3 — a2a.delegate looks a peer
up here and runs the A2A client against endpoint. The endpoint is an A2A
client transport: https://host[:port] (the target-vision transport; loopback
http:// for dev) or the legacy unix:/path / vsock:CID:PORT. No secrets
live here. Serializable so it travels in the spawn payload to subagents,
exactly like mcp_servers (RFC 0009 §spawn-payload).
Fields§
§name: String§endpoint: String§headers: Vec<(String, String)>Secret-FREE auth header templates presented TO the peer (e.g.
("authorization", "Bearer {{secret:PEER_TOKEN}}")), resolved at dial
time exactly like an MCP server’s (RFC 0012 §3.7 — no credential in the
spec/manifest/payload/logs). This is the bearer leg of peer client-auth.
client_cert: Option<String>Client-certificate PEM file paths for mutual TLS to the peer (the mTLS leg of peer client-auth). Both or neither; contents are loaded at dial time and never inlined.
client_key: Option<String>Implementations§
Source§impl A2aPeerSpec
impl A2aPeerSpec
Sourcepub fn endpoint_of(&self) -> Result<A2aEndpoint, String>
pub fn endpoint_of(&self) -> Result<A2aEndpoint, String>
Resolve this peer’s endpoint string to a parsed A2aEndpoint for the
A2A client to dial. Returns the validation message (without the agentd:
prefix) on a bad scheme. The endpoint is validated at startup, so at run
time this is expected to succeed; the Result keeps the call total.
Trait Implementations§
Source§impl Clone for A2aPeerSpec
impl Clone for A2aPeerSpec
Source§fn clone(&self) -> A2aPeerSpec
fn clone(&self) -> A2aPeerSpec
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more