term_conn

package
v1.1.1 Latest Latest
Warning

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

Go to latest
Published: Feb 6, 2022 License: LGPL-2.1 Imports: 11 Imported by: 0

Documentation

Overview

This file contains code to relay traffic between websocket and pty

Index

Constants

View Source
const (
	WriteBufferSize = 1024
)

Variables

This section is empty.

Functions

func ConnectTerm

func ConnectTerm(w http.ResponseWriter, r *http.Request, isViewer bool, name string, cmdline []string)

func ForEachSession

func ForEachSession(fp func(tc *TermConn))

func Init

func Init()

func StartRecord added in v0.3.0

func StartRecord(id string)

func StopRecord added in v0.3.0

func StopRecord(id string)

Types

type Registry

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

a simple registry for actors and their channels. It is possible to design this using channels, but it is simple enough with mutex

type TermConn

type TermConn struct {
	Name string
	Ip   string
	// contains filtered or unexported fields
}

TermConn represents the connected websocket and pty. if isViewer is true

type WriteRecord added in v0.3.0

type WriteRecord struct {
	Dur  time.Duration `json:"Duration"`
	Data []byte        `json:"Data"`
}

Jump to

Keyboard shortcuts

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