health
health copied to clipboard
feat(config): Add WithChecks() option pattern func
Thank you for this great library!
This PR adds a new WithChecks
function that allows the dynamic addition of multiple health checks during initialization. This enhancement provides more flexibility in configuring health checks at startup.
This PR addresses the issue discussed in Issue #87 (already closed...).
Changes
- Introduced the
WithChecks
function to enable setting multiple health checks at once. - Modified the
WithCheck
function to utilizeWithChecks
.
Use Case
In my use case, I want to provide a common health check initialization function and be able to add specific checks for service A, for instance. This change allows the flexible addition of health checks to the common initialization function.