reportResultsToPipeline sends errors back up the query frontend http pipeline
(responses []*httpgrpc.HTTPResponse)
| 109 | |
| 110 | // reportResultsToPipeline sends errors back up the query frontend http pipeline |
| 111 | func (b *requestBatch) reportResultsToPipeline(responses []*httpgrpc.HTTPResponse) error { |
| 112 | if len(responses) != len(b.pipelineRequests) { |
| 113 | return fmt.Errorf("incorrect number of responses to pipeline %d != %d", len(responses), len(b.pipelineRequests)) |
| 114 | } |
| 115 | |
| 116 | for i, r := range b.pipelineRequests { |
| 117 | r.response <- httpGRPCResponseToHTTPResponse(responses[i]) |
| 118 | } |
| 119 | |
| 120 | return nil |
| 121 | } |
| 122 | |
| 123 | func httpGRPCResponseToHTTPResponse(resp *httpgrpc.HTTPResponse) *http.Response { |
| 124 | // translate back |