Builds the aggregate protobuf response used by client-streaming RPCs.
(requests: &[GrpcPbRequest])
| 757 | |
| 758 | // Builds the aggregate protobuf response used by client-streaming RPCs. |
| 759 | fn pb_aggregate(requests: &[GrpcPbRequest]) -> GrpcPbResponse { |
| 760 | GrpcPbResponse { |
| 761 | id: format!( |
| 762 | "client:{}", |
| 763 | requests |
| 764 | .iter() |
| 765 | .map(|request| request.id.as_str()) |
| 766 | .collect::<Vec<_>>() |
| 767 | .join("+") |
| 768 | ), |
| 769 | count: requests.iter().map(|request| request.count).sum(), |
| 770 | payload: Some(grpc_pb_response::Payload::Text(format!( |
| 771 | "client:{}", |
| 772 | requests |
| 773 | .iter() |
| 774 | .map(|request| request.id.as_str()) |
| 775 | .collect::<Vec<_>>() |
| 776 | .join("+") |
| 777 | ))), |
| 778 | } |
| 779 | } |
| 780 | |
| 781 | async fn exercise_pb(channel: Channel) -> AnyResult<()> { |
| 782 | let mut client = PbGrpcServiceClient::new(channel); |
no test coverage detected