We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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 cancellation of topic map go routine
Once the topic map is being built in its own go routine, there should be some way to cancel / pause that work.
Why? Perhaps it needs to back-off for some reason, or the broker isn't available. Perhaps it should pause and restart at a later time.
Once started, there is no way to stop the topic map from being rebuilt.
Introduce a Context or cancellation channel to the SDK.
The map is rebuilt in this go routine using a timer:
https://github.com/openfaas/connector-sdk/blob/master/types/controller.go#L141
Then each result is published to the subscribers via this Go routine:
https://github.com/openfaas/connector-sdk/blob/master/types/controller.go#L102
It's a best practice for Go APIs to provide cancellation.
Users have requested this in the past.
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Allow cancellation of topic map go routine
Expected Behaviour
Once the topic map is being built in its own go routine, there should be some way to cancel / pause that work.
Why? Perhaps it needs to back-off for some reason, or the broker isn't available. Perhaps it should pause and restart at a later time.
Current Behaviour
Once started, there is no way to stop the topic map from being rebuilt.
Possible Solution
Introduce a Context or cancellation channel to the SDK.
The map is rebuilt in this go routine using a timer:
https://github.com/openfaas/connector-sdk/blob/master/types/controller.go#L141
Then each result is published to the subscribers via this Go routine:
https://github.com/openfaas/connector-sdk/blob/master/types/controller.go#L102
Steps to Reproduce (for bugs)
Context
It's a best practice for Go APIs to provide cancellation.
Users have requested this in the past.
The text was updated successfully, but these errors were encountered: