runner

package
v2.0.0-rc.2+incompatible Latest Latest
Warning

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

Go to latest
Published: Dec 10, 2018 License: Apache-2.0 Imports: 3 Imported by: 7

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrNilContext = errors.New("nil context")
	ErrNilWriter  = errors.New("writer is nil")
)

Functions

This section is empty.

Types

type Command

type Command struct {
	Ctx context.Context

	Script string

	Out io.Writer
	Err io.Writer
}

Command is an action that can be run and cancelled on different environments ssh, shell, docker etc.

func NewCommand

func NewCommand(ctx context.Context, script string, out, err io.Writer) (*Command, error)

TODO(stgleb): Use single io.Writer for gathering command output

type Runner

type Runner interface {
	Run(command *Command) error
}

Runner is interface for running command in different environment

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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