runner

package
v2.1.1+incompatible Latest Latest
Warning

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

Go to latest
Published: May 21, 2019 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