executor

package
v0.0.0-...-678bb0e Latest Latest
Warning

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

Go to latest
Published: Aug 8, 2017 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Overview

Package executor contains an implementation of the Annotee Executor. The Executor bootstraps an application and passes its output through a Processor instance.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Executor

type Executor struct {
	// Options are the set of Annotee options to use.
	Options annotee.Options

	// Stdin, if not nil, will be used as standard input for the bootstrapped
	// process.
	Stdin io.Reader

	// TeeStdout, if not nil, is a Writer where bootstrapped process standard
	// output will be tee'd.
	TeeStdout io.Writer
	// TeeStderr, if not nil, is a Writer where bootstrapped process standard
	// error will be tee'd.
	TeeStderr io.Writer
	// contains filtered or unexported fields
}

Executor bootstraps an application, running its output through a Processor.

func (*Executor) Executed

func (e *Executor) Executed() bool

Executed returns true if the bootstrapped process' execution completed successfully. This is independent of the return value, and can be used to differentiate execution errors from process errors.

func (*Executor) ReturnCode

func (e *Executor) ReturnCode() int

ReturnCode returns the executed process' return code.

If the process hasn't completed its execution (see Executed), then this will return 0.

func (*Executor) Run

func (e *Executor) Run(ctx context.Context, command []string) error

Run executes the bootstrapped process, blocking until it completes.

func (*Executor) Step

func (e *Executor) Step() []byte

Step returns the root Step protobuf from the latest run.

Jump to

Keyboard shortcuts

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