{"modulePath":"github.com/taskcluster/taskcluster-worker","version":"v0.1.20","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package shellclient\n\nPackage shellclient provides a wrapper for demuxing a shell websocket and exposing the stdout/stderr streams as well as offering a way to provide the stdin stream.\n\n## Types\n\n```go\ntype ShellClient struct {\n\t// contains filtered or unexported fields\n}\n```\nShellClient exposes the client interface to a shell running remotely. This object implements the engines.Shell interface.\n\n```go\nfunc Dial(socketURL string, command []string, tty bool) (*ShellClient, error)\n```\nDial will open a websocket to socketURL giving command and tty to the server. If no command is given the server should open its default shell in a human usable configuration.\n\n```go\nfunc New(ws *websocket.Conn) *ShellClient\n```\nNew takes a websocket and creates a ShellClient object implementing the engines.Shell interface.\n\n```go\nfunc (s *ShellClient) Abort() error\n```\nAbort will tell the remote shell to abort and close the websocket.\n\n```go\nfunc (s *ShellClient) SetSize(columns, rows uint16) error\n```\nSetSize will attempt to set the TTY width (columns) and height (rows) on the remote shell.\n\n```go\nfunc (s *ShellClient) StderrPipe() io.ReadCloser\n```\nStderrPipe returns a pipe from which stderr must be read. It's important to drain this pipe or the shell will block when the internal buffer is full.\n\n```go\nfunc (s *ShellClient) StdinPipe() io.WriteCloser\n```\nStdinPipe returns a pipe to which stdin must be written. It's important to close stdin, if you expect the remote shell to terminate.\n\n```go\nfunc (s *ShellClient) StdoutPipe() io.ReadCloser\n```\nStdoutPipe returns a pipe from which stdout must be read. It's important to drain this pipe or the shell will block when the internal buffer is full.\n\n```go\nfunc (s *ShellClient) Wait() (bool, error)\n```\nWait will wait for the remote shell to finish, by either succeeding or returning an error.\n\n","path":"github.com/taskcluster/taskcluster-worker/plugins/interactive/shellclient","name":"shellclient","synopsis":"Package shellclient provides a wrapper for demuxing a shell websocket and exposing the stdout/stderr streams as well as offering a way to provide the stdin stream.","isRedistributable":true}
