consoleutil

package
v2.0.3 Latest Latest
Warning

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

Go to latest
Published: Jan 21, 2025 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const DefaultDetachKeys = "ctrl-p,ctrl-q"

Variables

This section is empty.

Functions

func Current

func Current() (c console.Console, err error)

Current is from https://github.com/containerd/console/blob/v1.0.4/console.go#L68-L81 adapted so that it does not panic

func HandleConsoleResize

func HandleConsoleResize(ctx context.Context, task resizer, con console.Console) error

HandleConsoleResize resizes the console. From https://github.com/containerd/containerd/blob/v1.7.0-rc.2/cmd/ctr/commands/tasks/tasks_unix.go#L43-L68

func NewDetachableStdin

func NewDetachableStdin(stdin io.Reader, keys string, closer func()) (io.Reader, error)

NewDetachableStdin returns an io.Reader that uses a TTY proxy reader to read from stdin and detect when the specified detach keys are read, in which case closer will be called.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
JackTT - Gopher 🇻🇳