-
Notifications
You must be signed in to change notification settings - Fork 129
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 canceling remote processes via context.Context
#125
Comments
Sorry for the very late answer, but I would prefer to have a PR that adds support for passing a |
Okay, fair enough.
|
I think the |
Is this what you had in mind? |
Command.err
neededcontext.Context
@masterzen Would you be interested in a PR, where we pass the context to the http request as well with |
Hi Paul, I toyed with that as well, however canceling the program on the remote machine requires a successful HTTP REST call, so that did not work out for me. |
Hi Klaus-Georg, that's a good point. We should absolutely try not to leave processes hanging in the remote host. I still think it's an issue that we can't cancel requests, though. If the remote host doesn't respond to http requests we have to wait for the os to give us an io timeout. Just spitballing, but maybe if we split up the interface, so users could run each step separately with it's own context, so we're not lumping multiple requests into the same call. Maybe this should be considered a separate issue? |
Hi Brice,
I would like to have public access to the
err
member of theCommand
struct. This would make it possible to reimplement theClient.Run*
methods out of package in a way that supports canceling viacontext.Context
. Would you consider a PR to this effect?The text was updated successfully, but these errors were encountered: