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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Creating new strategies #114

Open
maxbaldanza opened this issue Apr 10, 2024 · 2 comments
Open

Creating new strategies #114

maxbaldanza opened this issue Apr 10, 2024 · 2 comments

Comments

@maxbaldanza
Copy link
Contributor

Hi,

Great package 馃檶

We'd like to create a new strategy that opens the circuit if a request takes too long for example if a request took longer then 5s X times in X seconds. One way to achieve this is to set the timeout in Guzzle/http client which would throw an exception but the problem with this is that we want the request to continue to process rather than throw an exception after a certain timeout.
Therefore we we're thinking of creating a new Strategy that would track the time it took to process and either say success/failure based on this time.

The problem we have is how we set the Configuration for this timeout because this gets passed to the service but the configuration for this Strategy will be different to the existing ones. Any plans/thoughts on how to change the configuration for new strategies?

@maxbaldanza
Copy link
Contributor Author

maxbaldanza commented Apr 16, 2024

Happy to help by the way but I suspect the changes needed may be breaking changes so just thought I'd gather feedback first

@maxbaldanza
Copy link
Contributor Author

@ackintosh would love to get your thoughts on this 馃槃

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

No branches or pull requests

1 participant