Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MongoDbHealthCheckBuilderExtensions add factory delegate with service provider input [Enhancement Request] #770

Closed
georgy93 opened this issue May 12, 2021 · 0 comments · Fixed by #1948
Labels

Comments

@georgy93
Copy link

georgy93 commented May 12, 2021

Hello!

Is it possible to provide an option for MongoDB Healthcheck to use a factory delegate for creating the connection string.

My use case is that I have template connection string in my appsettings and then, at aplication startup, I make a call to Vault to receive credentials and update the connection string template with them.
However, I cannot currently pass the updated connection string to the HealthCheck.

Adding IHealthChecksBuilder overload with Func<IServiceProvider, string> mongodbConnectionStringFactory will solve my problem, because it will always read an up-to-date connection string.

This is already implemented for HealthChecks.SqlServer

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants