Skip to main content

Module transport

Module transport 

Source
Expand description

Transport abstraction for A2A client requests.

The Transport trait decouples protocol logic from HTTP mechanics. A2aClient holds a Box<dyn Transport> and calls Transport::send_request for non-streaming methods and Transport::send_streaming_request for SSE-streaming methods.

Two implementations ship with this crate:

TypeProtocolWhen to use
JsonRpcTransportJSON-RPC 2.0 over HTTP POSTDefault; most widely supported
RestTransportHTTP REST (verbs + paths)When the agent card requires it

Re-exports§

pub use grpc::GrpcTransport;
pub use jsonrpc::JsonRpcTransport;
pub use rest::RestTransport;
pub use websocket::WebSocketTransport;

Modules§

grpc
gRPC transport implementation for the A2A client.
jsonrpc
JSON-RPC 2.0 over HTTP transport implementation.
rest
HTTP REST transport implementation.
websocket
WebSocket transport implementation for A2A clients.

Traits§

Transport
The low-level HTTP transport interface.