You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What would you like to be added:
We already support resolving clients from ServiceProvider in some packages.
For example, we did this in the Elasticsearch package:
Some users use AddKeyedService to register clients, so if the user wants to use the same client in the health check he or she should do more work to reach this goal.
We should support this kind of registration in our packages.
What would you like to be added:
We already support resolving clients from
ServiceProvider
in some packages.For example, we did this in the Elasticsearch package:
AspNetCore.Diagnostics.HealthChecks/src/HealthChecks.Elasticsearch/DependencyInjection/ElasticsearchHealthCheckBuilderExtensions.cs
Lines 98 to 105 in 65ab619
I strongly suggest supporting resolving clients from
KeyedServices
.For instance, in the Elasticsearch package it would be something like this:
+ public static IHealthChecksBuilder AddKeyedElasticsearch(this IHealthChecksBuilder builder, object keyServiceName, string? name = default, HealthStatus? failureStatus = default, IEnumerable<string>? tags = default, TimeSpan? timeout = default);
Why is this needed:
Some users use
AddKeyedService
to register clients, so if the user wants to use the same client in the health check he or she should do more work to reach this goal.We should support this kind of registration in our packages.
cc @adamsitnik @unaizorrilla
The text was updated successfully, but these errors were encountered: