terminal

package
v0.0.8 Latest Latest
Warning

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

Go to latest
Published: Jul 30, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	EventResize = "resize"
)

Variables

View Source
var Modes = ssh.TerminalModes{
	ssh.ECHO:          1,
	ssh.TTY_OP_ISPEED: 14400,
	ssh.TTY_OP_OSPEED: 14400,
}

Functions

This section is empty.

Types

type Terminal

type Terminal struct {
	Websocket *websocket.Conn
	Stdin     io.WriteCloser
	Stdout    *WsBufferWriter
	Session   *ssh.Session
	// contains filtered or unexported fields
}

func NewTerminal

func NewTerminal() *Terminal

func (*Terminal) CloseHandler

func (t *Terminal) CloseHandler(code int, msg string) error

func (*Terminal) Send2SSH

func (t *Terminal) Send2SSH()

func (*Terminal) Send2Web

func (t *Terminal) Send2Web()

type TerminalEvent

type TerminalEvent struct {
	Operate string `json:"operate"`
	Cols    int    `json:"cols"`
	Rows    int    `json:"rows"`
}

type WsBufferWriter

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

func (*WsBufferWriter) Reset

func (w *WsBufferWriter) Reset()

func (*WsBufferWriter) Write

func (w *WsBufferWriter) Write(p []byte) (int, error)

Jump to

Keyboard shortcuts

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