Skip to main content

Module grpc

Module grpc 

Source
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.

Releases before 0.7 tunneled JSON inside a protobuf bytes envelope on a non-standard service (a2a.v1.A2aService), served alongside the canonical one behind the off-by-default grpc-legacy-json feature. That feature and its service were removed in 0.8; the canonical binding is the only gRPC surface. A 0.6 client must upgrade rather than be tunneled for.

§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§

A2aServiceImpl
The tonic service implementation for the canonical A2A binding.
A2aServiceServer
Provides operations for interacting with agents using the A2A protocol.
Certificate
The TLS types GrpcDispatcher::with_tls takes, re-exported so a server needs no tonic dependency of its own (grpc-tls feature). Represents a X509 certificate.
GrpcConfig
Configuration for the gRPC dispatcher.
GrpcDispatcher
gRPC dispatcher that routes A2A requests to a RequestHandler.
Identity
The TLS types GrpcDispatcher::with_tls takes, re-exported so a server needs no tonic dependency of its own (grpc-tls feature). Represents a private key and X509 certificate.
ServerTlsConfig
The TLS types GrpcDispatcher::with_tls takes, re-exported so a server needs no tonic dependency of its own (grpc-tls feature). Configures TLS settings for servers.