Addresses #31. Adds a new EndpointMiddleware trait and adds the with_endpoint_layer method to the LoadBalancedChannelBuilder. These middlewares are invoked on every SocketAddr that the lookup service discovers.
Usage:
let load_balanced_channel = LoadBalancedChannel::builder(("www.test.com", 5000))
// set the concurrency limit for the endpoint
.with_endpoint_layer(|endpoint: Endpoint| Some(endpoint.concurrency_limit(1)))
// set the user agent for the endpoint
.with_endpoint_layer(|endpoint: Endpoint| {
endpoint.user_agent("my ginepro client").ok()
})
.channel()
.await
.unwrap();
Is there any chance of this PR being merged? I've been investigating issues with very low-throughput connections and believe configuring endpoint settings might help.
Addresses #31. Adds a new
EndpointMiddleware
trait and adds thewith_endpoint_layer
method to theLoadBalancedChannelBuilder
. These middlewares are invoked on everySocketAddr
that the lookup service discovers.Usage: