...
Package socket
Overview ▹
Index ▹
Variables
Environ provides an environment when a binary, such as the go tool, is invoked.
var Environ func() []string = os.Environ
RunScripts specifies whether the socket handler should execute shell scripts (snippets that start with a shebang).
var RunScripts = true
func NewHandler ¶
func NewHandler(origin *url.URL) websocket.Server
NewHandler returns a websocket server which checks the origin of requests.
type Message ¶
Message is the wire format for the websocket connection to the browser. It is used for both sending output messages and receiving commands, as distinguished by the Kind field.
type Message struct { Id string // client-provided unique id for the process Kind string // in: "run", "kill" out: "stdout", "stderr", "end" Body string Options *Options `json:",omitempty"` }
type Options ¶
Options specify additional message options.
type Options struct {
Race bool // use -race flag when building code (for "run" only)
}