<PackageReference Include="Grpc.Net.Client" Version="2.71.0" />

Grpc.Net.Client.Balancer.SubchannelsLoadBalancer

public abstract class SubchannelsLoadBalancer : LoadBalancer
An abstract LoadBalancer that manages creating Subchannel instances from addresses. It is designed to make it easy to implement a custom picking policy by overriding CreatePicker and returning a custom SubchannelPicker.

Note: Experimental API that can change or be removed without any prior notice.

protected IChannelControlHelper Controller { get; }

Gets the controller.

protected ConnectivityState State { get; }

Gets the connectivity state.

protected SubchannelsLoadBalancer(IChannelControlHelper controller, ILoggerFactory loggerFactory)

Initializes a new instance of the SubchannelsLoadBalancer class.

protected abstract SubchannelPicker CreatePicker(IReadOnlyList<Subchannel> readySubchannels)

Creates a SubchannelPicker for the specified Subchannel instances. This method can be overriden to return new a SubchannelPicker implementation with custom load balancing logic.