Documentation ¶
Index ¶
Constants ¶
View Source
const ( TypeStart = "start" TypeResize = "resize" TypeStdin = "stdin" TypeCloseStdin = "close_stdin" )
Client message header type
View Source
const ( TypePid = "pid" TypeStdout = "stdout" TypeStderr = "stderr" TypeExitCode = "exit_code" )
Server message header type
Variables ¶
This section is empty.
Functions ¶
func SplitMessage ¶
SplitMessage into header and body components all messages must have a header. body returns as nil if no delimiter is found
Types ¶
type ClientResizeHeader ¶
type ClientResizeHeader struct { Type string `json:"type"` Rows uint16 `json:"rows"` Cols uint16 `json:"cols"` }
ClientResizeHeader specifies a terminal window resize request
type ClientStartHeader ¶
type ClientStartHeader struct { Type string `json:"type"` ID string `json:"id"` Command Command `json:"command"` }
ClientStartHeader specifies a request to start command
type Command ¶
type Command struct { Command string `json:"command"` Args []string `json:"args"` Stdin bool `json:"stdin"` TTY bool `json:"tty"` Rows uint16 `json:"rows"` Cols uint16 `json:"cols"` UID uint32 `json:"uid"` GID uint32 `json:"gid"` Env []string `json:"env"` WorkingDir string `json:"working_dir"` }
Command represents a runnable command.
type ServerExitCodeHeader ¶
type ServerExitCodeHeader struct { Type string `json:"type"` ExitCode int `json:"exit_code"` Error string `json:"error"` }
ServerExitCodeHeader specifies the final message from the server after the command exits
type ServerPidHeader ¶
ServerPidHeader specifies the message send immediately after the request command starts
Click to show internal directories.
Click to hide internal directories.