vt

package
v0.4.7 Latest Latest
Warning

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

Go to latest
Published: Oct 31, 2026 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const DefaultMailboxBytes = 256 * 1024

Variables

View Source
var ErrClosed = errors.New("terminal vt actor closed")

Functions

func RenderLines

func RenderLines(ctx context.Context, data []byte, cols, rows int) (content string, err error)

RenderLines interprets retained bytes as rendered scrollback and screen text.

Types

type Actor

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

func New

func New(cols, rows int, ring RingSnapshot) *Actor

func (*Actor) Close

func (a *Actor) Close() error

func (*Actor) Resize

func (a *Actor) Resize(ctx context.Context, cols, rows int) error

func (*Actor) Screen

func (a *Actor) Screen(ctx context.Context) (Snapshot, error)

func (*Actor) Write

func (a *Actor) Write(input []byte) (int, error)

func (*Actor) WriteAt

func (a *Actor) WriteAt(input []byte, end uint64) (int, error)

WriteAt queues bytes with the ring's absolute end sequence.

type RingSnapshot

type RingSnapshot func() ([]byte, uint64)

type Snapshot

type Snapshot struct {
	Content string
	Seq     uint64
	Busy    bool
	Ended   bool
}

Jump to

Keyboard shortcuts

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