Documentation
¶
Overview ¶
Package wush is Coder Enterprise's protocol for transmitting Linux command execution over a WebSocket connection. It provides stdin, stdout, tty information, and exit code.
This package provides the protocol, but no facilities beyond that for creating a wush server. This protocol was designed haphazardly and will likely be rebuild in the near term.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
Stdin io.WriteCloser
Stdout io.Reader
Stderr io.Reader
// contains filtered or unexported fields
}
Client converts a Wush connection into OS streams.
type ClientMessage ¶
type ClientMessage struct {
Type ClientMsgType `json:"type"`
// Valid on "input" messages.
// Because this encodes everything in base64, it will case ~30% performance
// overhead.
Input string `json:"input"`
// Valid on "resize" messages.
Height int `json:"height"`
Width int `json:"width"`
}
ClientMessage is sent from the local client to the wush server.
type ClientMsgType ¶
type ClientMsgType int
ClientMsgType specifies the type of a wush lite message from the client.
const ( Stdin ClientMsgType = iota Resize CloseStdin )
type ServerMessage ¶
ServerMessage is sent over websocket type binary.
Click to show internal directories.
Click to hide internal directories.