wssh

package
v1.3.8 Latest Latest
Warning

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

Go to latest
Published: Aug 17, 2022 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Terminal = iota
	Resize
	Heartbeat
)

msg flag type.

Variables

This section is empty.

Functions

This section is empty.

Types

type WebSocketShell

type WebSocketShell struct {
	Host     string
	Port     string
	Username string
	Password string
	Key      []byte
	Client   *ssh.Client
	Session  *ssh.Session
}

func NewWebSocketShell

func NewWebSocketShell(host string, port string, username, password string, key []byte) *WebSocketShell

func (*WebSocketShell) Close

func (wssh *WebSocketShell) Close()

func (*WebSocketShell) Config

func (wssh *WebSocketShell) Config(cols, rows int) error

config the terminal modes.

func (*WebSocketShell) Connect

func (wssh *WebSocketShell) Connect() error

connect to the ssh.

func (*WebSocketShell) WebSocket

func (wssh *WebSocketShell) WebSocket(ws *websocket.Conn)

type WindowResize

type WindowResize struct {
	Cols int `json:"cols"`
	Rows int `json:"rows"`
}

terminal window resize.

Jump to

Keyboard shortcuts

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