http4s / blaze

Blazing fast NIO microframework and Http Parser
Apache License 2.0
350 stars 63 forks source link

Effectful custom DNS resolution in blaze client #707

Open ghost opened 2 years ago

ghost commented 2 years ago

Make Http1Support.getAddress and BlazeClientBuilder.customDnsResolver: RequestKey => F[Either[Throwable, InetSocketAddress]]. The usage in makeClient is already effectful.

rossabaker commented 2 years ago

The customDnsResolver is going to be tricky to do in a bincompat fashion, but it seems like the right thing to do. Are you aiming for 1.0, or do you need this in 0.23?

armanbilge commented 2 years ago

It'll be slightly hacked but we can do this bincompatibly by leveraging type erasure.

Edit: nvmd, spoke too soon. It's exposed as a public val in the builder so that won't work.

rossabaker commented 2 years ago

I think we could deprecate the val and the current setter. If the setter is called, the function could be lifted.

armanbilge commented 2 years ago

This should be migrated I think, along with a few other issues that have been labelled since the schism.