luci: Index | Files

package executor

import ""

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


Package Files

doc.go executor.go

type Executor Uses

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 Uses

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 Uses

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 Uses

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

Run executes the bootstrapped process, blocking until it completes.

func (*Executor) Step Uses

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

Step returns the root Step protobuf from the latest run.

Package executor imports 11 packages (graph). Updated 2020-08-15. Refresh now. Tools for package owners.