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

Support rpc call cancellation/control via context.Context #284

Open
acabarbaye opened this issue Sep 28, 2023 · 0 comments
Open

Support rpc call cancellation/control via context.Context #284

acabarbaye opened this issue Sep 28, 2023 · 0 comments

Comments

@acabarbaye
Copy link

acabarbaye commented Sep 28, 2023

Currently actions executed in the plugin cannot be cancelled as the RPC client Call function does not support the use of context.

g.client.Call("Plugin.Greet", new(interface{}), &resp)

This could be problematic if the action takes a long time and we would like to control it via deadline/timeout
The only possible option seems to be kill the whole plugin server unless I missed something.

Would it be possible to leverage packages such as https://github.com/keegancsmith/rpc which propose similar clients to rpc.client but which support context.Context. This way we could use the context to cancel calls or to add a timeout protection

@acabarbaye acabarbaye changed the title Support rpc call cancellation Support rpc call cancellation/control via context.Context Sep 28, 2023
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