Expand description
gRPC dispatcher for the A2A server.
GrpcDispatcher serves the canonical lf.a2a.v1.A2AService — the
protobuf-native A2A v1.0 binding, wire-compatible with the official Go,
Python, and Java A2A SDKs. Request and response messages are the
prost-generated types from a2a_protocol_types::proto, converted to
the same domain types the JSON-RPC and REST bindings use before being
routed to the underlying crate::RequestHandler.
§Legacy JSON tunnel
Releases before 0.7 tunneled JSON inside a protobuf bytes envelope on
a non-standard service (a2a.v1.A2aService). Enabling the
grpc-legacy-json feature serves that service alongside the canonical
one (the two have distinct fully-qualified names) so 0.6 gRPC clients
keep working during rolling upgrades. The tunnel is deprecated and will
be removed in 0.8.
§Configuration
Use GrpcConfig to control message size limits and concurrency.
§Example
use std::sync::Arc;
use a2a_protocol_server::dispatch::grpc::{GrpcDispatcher, GrpcConfig};
use a2a_protocol_server::RequestHandlerBuilder;
let handler = Arc::new(
RequestHandlerBuilder::new(MyExec).build().unwrap()
);
let config = GrpcConfig::default();
let dispatcher = GrpcDispatcher::new(handler, config);
dispatcher.serve("127.0.0.1:50051").await?;Structs§
- A2aService
Impl - The tonic service implementation for the canonical A2A binding.
- A2aService
Server - Provides operations for interacting with agents using the A2A protocol.
- Grpc
Config - Configuration for the gRPC dispatcher.
- Grpc
Dispatcher - gRPC dispatcher that routes A2A requests to a
RequestHandler. - Legacy
A2aService Server - A2A gRPC service.
- Legacy
Grpc Service Impl - The tonic service implementation for the deprecated JSON tunnel.