util

package
v0.0.0-...-3d70c69 Latest Latest
Warning

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

Go to latest
Published: Mar 2, 2026 License: Apache-2.0 Imports: 12 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DisableEcho

func DisableEcho(fd int) (*unix.Termios, error)

Disable TTY echo of stdin.

func EchoSigHandler

func EchoSigHandler(
	ctx context.Context,
	sigChan chan os.Signal,
	errChan chan error,
	term *unix.Termios)

Signal handler to re-enable tty echo on interrupt. The signal handler is transparent with system default, and immedeately releases the channel and calling the system sighandler after termios is set.

Types

type SSHCommand

type SSHCommand struct {
	Cmd *exec.Cmd

	Stdout io.ReadCloser
	// contains filtered or unexported fields
}

func StartSSHCommand

func StartSSHCommand(c *cli.Context,
	_ctx context.Context,
	cancel context.CancelFunc,
	command string,
	sshConnectedToken string,
) (*SSHCommand, error)

func (*SSHCommand) EndSSHCommand

func (s *SSHCommand) EndSSHCommand() error

func (*SSHCommand) WaitForEchoRestore

func (s *SSHCommand) WaitForEchoRestore() error

Jump to

Keyboard shortcuts

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