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

Allow Use of Table Clients from IServiceProvider #1405

Merged

Conversation

wsugarman
Copy link
Contributor

@wsugarman wsugarman commented Aug 14, 2022

What this PR does / why we need it:
Adds new health check registration overloads that reuse an existing client from the IServiceProvider instead of creating new ones. Includes the following changes:

  • Add new registration methods for reusing configured clients
  • Add new ctors to each health check that accepts the client
  • Use provided cancellation token for underlying API calls
  • Standardize the health check logic between the Azure Storage health checks
  • Centralize client caching
  • Update unit tests

Which issue(s) this PR fixes: Relates to #1371
Relates to #1372

Does this PR introduce a user-facing change?: Yes. New APIs

Please make sure you've completed the relevant tasks for this PR, out of the following list:

  • Code compiles correctly
  • Created/updated tests
  • Unit tests passing
  • End-to-end tests passing
  • Provided sample for the feature

Sample

services
    .AddHealthChecks()
    .AddAzureTable(o => o.TableName = "sample-table", name: "sample");

@sungam3r sungam3r merged commit fe36348 into Xabaril:master Aug 18, 2022
@sungam3r
Copy link
Collaborator

https://www.nuget.org/packages/AspNetCore.HealthChecks.CosmosDb/6.1.0

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

Successfully merging this pull request may close these issues.

2 participants