TrueLayer / ginepro

A client-side gRPC channel implementation for tonic
Apache License 2.0
127 stars 24 forks source link

Consider means of configuring Endpoints #31

Open rnarubin opened 2 years ago

rnarubin commented 2 years ago

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