interfaces

package
v0.0.0-...-abdd6d0 Latest Latest
Warning

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

Go to latest
Published: Mar 14, 2023 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Console

type Console interface {
	io.Reader
	io.Writer
	io.Closer

	// SetSize sets the console size
	SetSize(cols int, rows int) error

	// GetSize gets the console size
	// cols, rows, error
	GetSize() (int, int, error)

	// Start starts the process with the supplied args
	Start(args []string) error

	// Wait waits the process to finish
	Wait() (*os.ProcessState, error)

	// SetCWD sets the current working dir of the process
	SetCWD(cwd string) error

	// SetENV sets environment variables to pass to the child process
	SetENV(environ []string) error

	// Pid returns the pid of the running process
	Pid() (int, error)

	// Kill kills the process. See exec/Process.Kill
	Kill() error

	// Signal sends a signal to the process. See exec/Process.Signal
	Signal(sig os.Signal) error

	// GetFile returns the OS file descriptor
	GetFile() *os.File
}

Console communication interface

Jump to

Keyboard shortcuts

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