(&self, name: Name)
| 38 | |
| 39 | impl Resolve for MzHttpResolver { |
| 40 | fn resolve(&self, name: Name) -> Resolving { |
| 41 | let enforce = self.enforce_external_addresses; |
| 42 | Box::pin(async move { |
| 43 | let ips = mz_ore::netio::resolve_address(name.as_str(), enforce).await?; |
| 44 | // reqwest substitutes the conventional port (80/443) when the |
| 45 | // SocketAddr's port is 0 and no explicit port was given in the URL. |
| 46 | let addrs: Addrs = Box::new( |
| 47 | ips.into_iter() |
| 48 | .map(|ip| SocketAddr::new(ip, 0)) |
| 49 | .collect::<Vec<_>>() |
| 50 | .into_iter(), |
| 51 | ); |
| 52 | Ok(addrs) |
| 53 | }) |
| 54 | } |
| 55 | } |
| 56 | |
| 57 | /// Build a reqwest [`Client`] for fetching `COPY FROM` URLs. This uses |
nothing calls this directly
no test coverage detected