psuedotty

package
v0.0.0-...-b4c4296 Latest Latest
Warning

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

Go to latest
Published: Jan 15, 2025 License: GPL-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type PTY

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

func NewPTY

func NewPTY(width, height int) (*PTY, error)

func NewTeePTY

func NewTeePTY(width int, height int) (pty *PTY, primary *streams.Tee, secondary *streams.Stdin, err error)

func (*PTY) Close

func (p *PTY) Close()

Close the stream.Io interface

func (*PTY) File

func (p *PTY) File() *os.File

File returns the os.File struct for the stream.Io interface if a TTY

func (*PTY) ForceClose

func (p *PTY) ForceClose()

ForceClose forces the stream.Io interface to close. This should only be called by a STDIN reader

func (*PTY) GetDataType

func (p *PTY) GetDataType() (dt string)

GetDataType returns the murex data type for the stream.Io interface

func (*PTY) IsTTY

func (p *PTY) IsTTY() bool

IsTTY returns true because the PTY stream is a pseudo-TTY

func (*PTY) Open

func (p *PTY) Open()

Open the stream.Io interface for another dependant

func (*PTY) Read

func (p *PTY) Read(b []byte) (int, error)

func (*PTY) ReadAll

func (p *PTY) ReadAll() ([]byte, error)

func (*PTY) ReadArray

func (p *PTY) ReadArray(ctx context.Context, callback func([]byte)) error

func (*PTY) ReadArrayWithType

func (p *PTY) ReadArrayWithType(ctx context.Context, callback func(interface{}, string)) error

func (*PTY) ReadLine

func (p *PTY) ReadLine(callback func([]byte)) error

func (*PTY) ReadMap

func (p *PTY) ReadMap(conf *config.Config, callback func(*stdio.Map)) error

func (*PTY) SetDataType

func (p *PTY) SetDataType(dt string)

SetDataType defines the murex data type for the stream.Io interface

func (*PTY) Stats

func (p *PTY) Stats() (uint64, uint64)

Stats provides real time stream stats. Useful for progress bars etc.

func (*PTY) Write

func (p *PTY) Write(b []byte) (int, error)

func (*PTY) WriteArray

func (p *PTY) WriteArray(dataType string) (stdio.ArrayWriter, error)

func (*PTY) WriteTo

func (p *PTY) WriteTo(w io.Writer) (int64, error)

func (*PTY) Writeln

func (p *PTY) Writeln(b []byte) (int, error)

Jump to

Keyboard shortcuts

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