Documentation ¶
Index ¶
Constants ¶
View Source
const (
// Maximum message size allowed from peer.
MaxMessageSize = 2 << 14
)
View Source
const (
PingWaitDuration = 60 * time.Second
)
Variables ¶
This section is empty.
Functions ¶
func ExecuteConn ¶
func Ping ¶
func Ping(ctx context.Context, ws *WebsocketConn)
Types ¶
type Message ¶
type Message struct {
// contains filtered or unexported fields
}
func NewExitCodeMessage ¶
type MessageType ¶
type MessageType byte
const ( StdoutData MessageType = 0 StdoutClose MessageType = 1 StderrData MessageType = 2 StderrClose MessageType = 3 StdinData MessageType = 4 StdinClose MessageType = 5 ExitCode MessageType = 6 )
type Stream ¶
type Stream struct {
// contains filtered or unexported fields
}
func NewStream ¶
func NewStream(ws *WebsocketConn, dataType, closeType MessageType) *Stream
type WebsocketConn ¶
type WebsocketConn struct {
// contains filtered or unexported fields
}
func NewWebsocketConn ¶
func NewWebsocketConn(ws *websocket.Conn) *WebsocketConn
func (*WebsocketConn) Close ¶
func (w *WebsocketConn) Close() error
func (*WebsocketConn) ReadMessage ¶
func (w *WebsocketConn) ReadMessage() (messageType int, p []byte, err error)
func (*WebsocketConn) WriteControl ¶
func (*WebsocketConn) WriteMessage ¶
func (w *WebsocketConn) WriteMessage(messageType int, data []byte) error
Click to show internal directories.
Click to hide internal directories.