ginepro icon indicating copy to clipboard operation
ginepro copied to clipboard

Consider means of configuring Endpoints

Open rnarubin opened this issue 2 years ago • 0 comments

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

rnarubin avatar May 03 '22 02:05 rnarubin