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).
a2a.delegate looks a peer up here and runs the A2A client against
endpoint, which is https://host[:port] (loopback http:// for dev) or
unix:/path for a co-located peer. No secrets live here. Serializable so it
travels in the spawn payload to subagents, exactly like mcp_servers.
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, so no credential is ever present in
the spec, the manifest, the spawn payload or the 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