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

Add breaker.GetState() method to inspect state #45

Merged
merged 1 commit into from
Jan 14, 2024
Merged

Conversation

eapache
Copy link
Owner

@eapache eapache commented Jan 14, 2024

This is useful in a few scenarios where the user might want to check the breaker state directly (perhaps for monitoring purposes), but also makes the tests much clearer because we can just assert on the expected breaker state directly.

Idea borrowed from the fork at https://github.com/klever-io/go-resiliency

This is useful in a few scenarios where the user might want to check the
breaker state directly (perhaps for monitoring purposes), but also makes
the tests much clearer because we can just assert on the expected
breaker state directly.
@eapache eapache merged commit 2a81223 into main Jan 14, 2024
4 checks passed
@eapache eapache deleted the breaker/get-state branch January 14, 2024 17:18
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.

1 participant