terminal

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Sep 5, 2026 License: Apache-2.0 Imports: 16 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckFeatures

func CheckFeatures(advertised []string) error

CheckFeatures verifies the ticket advertises every feature this client needs. Unknown extra features are tolerated; a missing required one is a definite pre-input refusal (exit 2).

func UsageNotice

func UsageNotice(daemonName, session string) string

func WatchResize

func WatchResize(stdout *os.File) (<-chan Size, func())

func WatchSignals

func WatchSignals() (<-chan os.Signal, func())

Types

type Outcome

type Outcome struct {
	ExitCode int
	Detached bool
	Replaced bool
}

func Connect

func Connect(
	ctx context.Context,
	api *client.Client,
	daemonID string,
	session string,
	size Size,
	streams Streams,
) (Outcome, error)

func Run

func Run(ctx context.Context, connection *websocket.Conn, streams Streams) Outcome

type Restorer

type Restorer func() error

func EnterRaw

func EnterRaw(stdin *os.File) (Restorer, error)

type Size

type Size struct {
	Cols int
	Rows int
}

func Preflight

func Preflight(stdin, stdout *os.File, termName string) (Size, error)

type Streams

type Streams struct {
	Input   io.Reader
	Output  io.Writer
	Resize  <-chan Size
	Signals <-chan os.Signal
}

Jump to

Keyboard shortcuts

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