Class GrpcChannelPool
public class GrpcChannelPool : IDisposable
- Inheritance
-
GrpcChannelPool
- Implements
- Inherited Members
Constructors
GrpcChannelPool(ServicesConfiguration, ILogger<GrpcChannelPool>)
public GrpcChannelPool(ServicesConfiguration config, ILogger<GrpcChannelPool> logger)
Parameters
configServicesConfigurationloggerILogger<GrpcChannelPool>
Properties
ChannelCount
public int ChannelCount { get; }
Property Value
ConfiguredServiceCount
Number of services the pool can actually hold a channel for. Non-dialable entries (state-store-name placeholders) are excluded, so the health check's channels-per-service ratio stays reachable.
public int ConfiguredServiceCount { get; }
Property Value
Methods
Dispose()
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
public void Dispose()
GetChannelAsync(string)
public Task<GrpcChannel> GetChannelAsync(string serviceName)
Parameters
serviceNamestring
Returns
IsDialable(string)
True if serviceName names a registered, dialable backend.
public bool IsDialable(string serviceName)
Parameters
serviceNamestring
Returns
Remarks
Callers check this before touching the descriptor cache. Letting an unregistered
name reach the cache means the resulting ArgumentException is
swallowed by LoadDescriptorsAsync and stored as LastLoadException,
so the caller sees UNAVAILABLE ("could not load descriptors") plus the raw
"not found in configuration" text, rather than a clean NOT_FOUND.