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.
PoC for fixing #295. Works well enough as a workaround for my use case, but the current implementation still has some issues which I would like to get feedback on how to best resolve:
logs_tty
andlogs
, and choosing the wrong one will either produce additional garbage in stout from multiplexing headers or fail to return any input at all. The approach taken by the docker CLI is to run aninspect
first to determine if the container uses tty: https://github.com/docker/cli/blob/86e1f04b5f115fb0b4bbd51e0e4a68233072d24b/cli/command/container/logs.go#L53. This would require an additional request, but imo worth it to allows to have a single method without any additional arguments that always returns the correct result.impl
types returned by the different streams are not compatible, an alternative would be to returnBox<dyn Stream<Item = _> + Unpin>
. Overhead is probably pretty minimal compared to network IO.Stream
-munging than I do.