exechelper

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Nov 2, 2020 License: Apache-2.0 Imports: 10 Imported by: 9

Documentation

Index

Constants

View Source
const (
	DefaultExitCodeOnError = 128
)

Variables

This section is empty.

Functions

func Do

func Do(s Spec) (int, error)

Do execute command directly in host

func DoHeadless

func DoHeadless(command []string, env map[string]string) (int, error)

func Prepare

func Prepare(ctx context.Context, command []string, tty bool, env map[string]string) *exec.Cmd

Types

type Spec

type Spec struct {
	Context context.Context
	Logger  log.Interface

	Env     map[string]string
	Command []string

	Stdin          io.Reader
	Stdout, Stderr io.Writer

	Tty            bool
	OnResizeSignal TtyResizeSignalFunc
}

type TtyResizeSignalFunc

type TtyResizeSignalFunc func(doResize func(cols, rows uint64) error) (more bool)

Jump to

Keyboard shortcuts

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