(stream testgrpc.TestService_StreamingInputCallServer)
| 786 | } |
| 787 | |
| 788 | func (s *testServer) StreamingInputCall(stream testgrpc.TestService_StreamingInputCallServer) error { |
| 789 | var sum int |
| 790 | for { |
| 791 | in, err := stream.Recv() |
| 792 | if err == io.EOF { |
| 793 | return stream.SendAndClose(&testpb.StreamingInputCallResponse{ |
| 794 | AggregatedPayloadSize: int32(sum), |
| 795 | }) |
| 796 | } |
| 797 | if err != nil { |
| 798 | return err |
| 799 | } |
| 800 | p := in.GetPayload().GetBody() |
| 801 | sum += len(p) |
| 802 | } |
| 803 | } |
| 804 | |
| 805 | func (s *testServer) FullDuplexCall(stream testgrpc.TestService_FullDuplexCallServer) error { |
| 806 | if md, ok := metadata.FromIncomingContext(stream.Context()); ok { |
nothing calls this directly
no test coverage detected