hashicorp / hashicorp/go-plugin

Support rpc call cancellation/control via context.Context

Open
#284 2 comments 1 reaction 0 assignees View on GitHub
Dominant language
Go
Stars
6.1k
Forks
511
Avg merge
22h 47m
Merged PRs (30d)
4

Description

Currently actions executed in the plugin cannot be cancelled as the RPC client `Call` function does not support the use of context.
```go
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

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.