Grpc.Net.Client.Balancer.Internal.ChildHandlerLoadBalancer
The load balancer is responsible for creating the real load balancer, and changing
it if the resolver returns a service config with a new policy name.
This load balancer has a reference to both a current and a pending load balancer. If there is an update that prompts the load balancer to change then: 1. New load balancer is created and set to pending. It will begin connecting. 2. Current load balancer will continue to serve new gRPC calls. 3. Once pending load balancer has a READY state then it is prompted to current. 4. Old current load balancer is disposed. This is designed so that there is a smooth transistion when the load balancer changes.
namespace Grpc.Net.Client.Balancer.Internal
{
internal sealed class ChildHandlerLoadBalancer : LoadBalancer
{
public ChildHandlerLoadBalancer(IChannelControlHelper controller, ServiceConfig initialServiceConfig, ConnectionManager connectionManager);
public static bool TryGetValidServiceConfigFactory(IList<LoadBalancingConfig> loadBalancingConfigs, LoadBalancerFactory[] factories, out LoadBalancingConfig loadBalancingConfig, out LoadBalancerFactory factory);
public static bool TryGetFactory(string name, LoadBalancerFactory[] factories, out LoadBalancerFactory factory);
}
}