todo: long term this should return an http.Handler instead of a RoundTripper? that way it can completely encapsulate all the responsibilities of converting a pipeline http.Response and error into an http.Response to be NewHTTPCollector returns a new http collector
(next AsyncRoundTripper[combiner.PipelineResponse], consumers int, combiner combiner.Combiner)
| 22 | |
| 23 | // NewHTTPCollector returns a new http collector |
| 24 | func NewHTTPCollector(next AsyncRoundTripper[combiner.PipelineResponse], consumers int, combiner combiner.Combiner) http.RoundTripper { |
| 25 | return httpCollector{ |
| 26 | next: next, |
| 27 | combiner: combiner, |
| 28 | consumers: consumers, |
| 29 | } |
| 30 | } |
| 31 | |
| 32 | // RoundTrip implements the http.RoundTripper interface |
| 33 | func (r httpCollector) RoundTrip(req *http.Request) (*http.Response, error) { |
no outgoing calls