terminal

package
v1.2.2 Latest Latest
Warning

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

Go to latest
Published: Jun 12, 2025 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Session

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

Session represents an interactive terminal session

func NewSession

func NewSession(stdin *os.File, hijacked io.ReadWriteCloser, reader io.Reader) (*Session, error)

NewSession creates a new terminal session

func (*Session) Close

func (s *Session) Close() error

Close restores the terminal state and cleans up resources

func (*Session) GetSize

func (s *Session) GetSize() (width, height int, err error)

GetSize returns the current terminal size

func (*Session) MonitorSize

func (s *Session) MonitorSize() chan [2]uint

MonitorSize starts monitoring terminal size changes

func (*Session) Start

func (s *Session) Start() error

Start begins the interactive session with bidirectional I/O

Jump to

Keyboard shortcuts

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