command

package
v12.2.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Aug 22, 2019 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	BuildFailureExitCode  = 1
	SystemFailureExitCode = 2

	BuildFailureExitCodeVariable  = "BUILD_FAILURE_EXIT_CODE"
	SystemFailureExitCodeVariable = "SYSTEM_FAILURE_EXIT_CODE"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Command

type Command interface {
	Run() error
}

func New

func New(ctx context.Context, executable string, args []string, options CreateOptions) Command

type CreateOptions

type CreateOptions struct {
	Dir string
	Env []string

	Stdout io.Writer
	Stderr io.Writer

	Logger common.BuildLogger

	GracefulKillTimeout time.Duration
	ForceKillTimeout    time.Duration
}

type ErrUnknownFailure

type ErrUnknownFailure struct {
	Inner    error
	ExitCode int
}

func (*ErrUnknownFailure) Error

func (e *ErrUnknownFailure) Error() string

type MockCommand

type MockCommand struct {
	mock.Mock
}

MockCommand is an autogenerated mock type for the Command type

func (*MockCommand) Run

func (_m *MockCommand) Run() error

Run provides a mock function with given fields:

Jump to

Keyboard shortcuts

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