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

Grpc.Net.Client.Balancer.LoadBalancer

public abstract class LoadBalancer : IDisposable
A configurable component that receives resolved addresses from Resolver and provides a usable Subchannel when asked.

A new load balancer implements: LoadBalancerFactory creates new LoadBalancer instances. LoadBalancer receives results from the Resolver, subchannels' connectivity states, and requests to create a connection and shutdown. LoadBalancer creates Subchannel instances from resolve results using IChannelControlHelper, and updates the channel state with a ConnectivityState and SubchannelPicker. SubchannelPicker makes a load balancing decision.

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

namespace Grpc.Net.Client.Balancer { public abstract class LoadBalancer : IDisposable { public abstract void UpdateChannelState(ChannelState state); public abstract void RequestConnection(); protected virtual void Dispose(bool disposing); public void Dispose(); protected LoadBalancer(); } }