-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #42 from dyweb/example/udash/docker-log-exec
[Partial][example][ui] Udash docker log and exec - implemented docker log in client and dk cli #40 , it has a package for deduplex stream (stdout, stderr) - implemented docker exec in client and dk cli #41 , need to create a new connection manually and read the response (I actually don't need to get http client's transport, I can keep the original addr and dial it directly, need a dedicated tcp connection anyway) - implemented web terminal using xterm and gorillawebsocket #46 , it's tricky if you don't understand all the pty stuff, most examples didn't say that (maybe it's too obvious?), when use pty, you have echo for what you type, so you won't see anything when type in xterm and when it attach to socket it will send each character as a single message, and you don't need to do any buffering on server side (pty will do that), same applies to stdout, you just copy what you read and write to websocket connection (I xterm might did some buffer on that). The gorilla example was for some one off command and submit the entire command in a web form so it adds `\n` when write to pty stdin and buffer output using bufio
- Loading branch information
Showing
55 changed files
with
10,269 additions
and
32 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,5 @@ | ||
// Package cli provides wrapper around spf13/cobra so test is easier | ||
package cli | ||
|
||
type Command interface { | ||
} |
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
# Cli |
Oops, something went wrong.