websocket

package
v0.0.0-...-6f6f2b9 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 10, 2022 License: MIT Imports: 9 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type TerminalSession

type TerminalSession struct {
	// contains filtered or unexported fields
}

TerminalSession implements PtyHandler

func NewTerminalSession

func NewTerminalSession(w http.ResponseWriter, r *http.Request, responseHeader http.Header) (*TerminalSession, error)

NewTerminalSession create TerminalSession

func NewTerminalSessionWs

func NewTerminalSessionWs(conn *websocket.Conn) *TerminalSession

NewTerminalSessionWs create TerminalSession

func (*TerminalSession) Close

func (t *TerminalSession) Close() error

Close close session

func (*TerminalSession) Done

func (t *TerminalSession) Done()

Done done, must call Done() before connection close, or Next() would not exits.

func (*TerminalSession) Next

Next called in a loop from remotecommand as long as the process is running

func (*TerminalSession) Read

func (t *TerminalSession) Read(p []byte) (int, error)

Read called in a loop from remotecommand as long as the process is running

func (*TerminalSession) Stderr

func (t *TerminalSession) Stderr() io.Writer

Stderr ...

func (*TerminalSession) Stdin

func (t *TerminalSession) Stdin() io.Reader

Stdin ...

func (*TerminalSession) Stdout

func (t *TerminalSession) Stdout() io.Writer

Stdout ...

func (*TerminalSession) Tty

func (t *TerminalSession) Tty() bool

Tty ...

func (*TerminalSession) Write

func (t *TerminalSession) Write(p []byte) (int, error)

Write called from remotecommand whenever there is any output

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL