ginepro
ginepro copied to clipboard
Consider means of configuring Endpoints
Motivations
tonic's Endpoint type has many configurable parameters, for example keep_alive_interval
ginepro internally constructs Endpoint instances from socket addresses, and then applies some limited configuration values (like tls and timeout), but otherwise most settings remain the default.
Solution
It's probably not practical or ergonomic to specify every configuration value in ginepro's API; however it would be useful if the library could accept something like a Fn(SocketAddr) -> Result<Endpoint, SomeError>
so that the user could configure an endpoint while the library handles stuff like periodic dns lookups