terminal

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Feb 20, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Overview

Package terminal

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MonitorSize

type MonitorSize struct {
	Width  uint
	Height uint
}

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 MonitorSize

MonitorSize sends new terminal sizes over the channel when SIGWINCH is received.

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