Documentation ¶
Index ¶
Constants ¶
View Source
const (
MaxBufferSize = 1024 * 1024 * 1
)
View Source
const MetricsInterval = 1 * time.Second
Variables ¶
View Source
var ( // ErrSlaveClosed indicates the function has exited by the slave ErrSlaveClosed = errors.New("slave closed") // ErrSlaveClosed is returned when the slave connection is closed. ErrMasterClosed = errors.New("master closed") // ErrConnectionLostPing is returned if no ping within a duration ErrConnectionLostPing = errors.New("connection lost ping") )
Functions ¶
This section is empty.
Types ¶
type ArgResizeTerminal ¶
type Master ¶
type Master io.ReadWriter
type Option ¶
Option is an option for WebTTY.
func WithPermitWrite ¶
func WithPermitWrite() Option
WithPermitWrite sets a ProxyTTY to accept input from slaves.
type ProxyTTY ¶
type ProxyTTY struct { ResizeEvents chan *ArgResizeTerminal // contains filtered or unexported fields }
ProxyTTY bridges a PTY slave and its PTY master. To support text-based streams and side channel commands such as terminal resizing, ProxyTTY uses an original protocol.
func (*ProxyTTY) Run ¶
Run starts the main process of the PProxyTTY This method blocks until the context is canceled. Note that the master and slave are left intact even after the context is canceled. Closing them is caller's responsibility. If the connection to one end gets closed, returns ErrSlaveClosed or ErrMasterClosed.
type Recorder ¶
type Recorder struct { Hook Hook FileName string FilePrefix string KeystrokesMeter metrics.Meter OutputMeter metrics.Meter Cancel context.CancelFunc // contains filtered or unexported fields }
type Slave ¶
type Slave interface { io.ReadWriter // WindowTitleVariables returns any values that can be used to fill out // the title of a terminal. WindowTitleVariables() map[string]interface{} // ResizeTerminal sets a new size of the terminal. ResizeTerminal(columns int, rows int) error Close() error }
Slave represents a PTY slave, typically it's a local command.
Click to show internal directories.
Click to hide internal directories.