services

package
v0.0.0-...-f8de543 Latest Latest
Warning

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

Go to latest
Published: Nov 30, 2021 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TypeCommand = "cmd"
	TypeResize  = "resize"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Session

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

func NewSession

func NewSession(spec *models.SSHSpec) *Session

func (*Session) StartSSHSession

func (s *Session) StartSSHSession(conn *models.Connection, wsConn *ws.Conn)

type Sizes

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

type SshPipes

type SshPipes struct {
	Stdin   io.WriteCloser
	Stdout  *StdOutBuffer
	Session *ssh.Session
}

func GenPipes

func GenPipes(sz *Sizes, clientSSH *ssh.Client) (*SshPipes, error)

func (*SshPipes) PumpStdin

func (p *SshPipes) PumpStdin(wsConn *ws.Conn, buffer *bytes.Buffer, ch chan bool)

func (*SshPipes) PumpStdout

func (p *SshPipes) PumpStdout(wsConn *ws.Conn, ch chan bool)

func (*SshPipes) Wait

func (p *SshPipes) Wait(ch chan bool)

type StdOutBuffer

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

func (*StdOutBuffer) Write

func (sb *StdOutBuffer) Write(b []byte) (int, error)

type WebsocketMessage

type WebsocketMessage struct {
	Type    string `json:"type"`
	Command string `json:"command"`
	Rows    int    `json:"rows"`
	Cols    int    `json:"cols"`
}

Jump to

Keyboard shortcuts

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