Uh oh!
There was an error while loading. Please reload this page.
Implement API for interactive exec - #853
Closed
TomasTomecek wants to merge 0 commit into
Closed
Conversation
TomasTomecekforce-pushed
the
improve-exec-api
branch
from
November 14, 2015 13:42
1167091 to
cc4c4c1Compare4 tasks
Contributor
There was a problem hiding this comment.
This does follow the pattern established by attach()/attach_socket() but I wonder if it could be just another kwarg like stream?
What do you think @shin- ?
defexec_start(self, exec_id, detach=False, tty=False, stream=False, socket=False):
...
func=get_response_handler(stream, socket)
returnfunc(res)
defget_response_handler(stream, socket):
ifstreamandsocket:
raiseValueError(...)
ifstream:
returnfunctools.partial(self._get_result_tty, True)
ifsocket:
returnself._get_raw_response_socketreturnfunctools.partial(self._get_result_tty, False)ContributorAuthor
There was a problem hiding this comment.
Makes sense to me. To be honest, I actually vote for socket=False since there is already an option for asking for stream. On top of it, you'll get this feature for free in future (for new similar API calls).
ContributorAuthor
There was a problem hiding this comment.
@shin- waiting for your reply before I start rewriting.
Contributor
There was a problem hiding this comment.
Yes, socket as a param makes a lot of sense. 👍
TomasTomecekforce-pushed
the
improve-exec-api
branch
2 times, most recently
from
November 23, 2015 17:58
f81634e to
1ad6132CompareTomasTomecekforce-pushed
the
improve-exec-api
branch
from
November 23, 2015 18:00
1ad6132 to
1ca2bc5Compare Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for freeto join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Needed for: d11wtq/dockerpty#30
Transitively for: docker/compose#2023