runner

package
v0.0.0-...-eb16850 Latest Latest
Warning

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

Go to latest
Published: Mar 30, 2016 License: Apache-2.0, Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var CommandInterceptor = func(cmd *exec.Cmd) *exec.Cmd {
	return cmd
}
View Source
var SkipSSLValidation bool

Functions

func Curl

func Curl(args ...string) *gexec.Session

func CurlSkipSSL

func CurlSkipSSL(skip bool, args ...string) *gexec.Session

func NewCmdRunner

func NewCmdRunner(session *gexec.Session, timeout time.Duration) *cmdRunner

NewCmdRunner has default value of exitCode to be 0, and attempts to be 1. To change these, use the builder methods WithExitCode and WithAttempts.

func NewCmdWaiter

func NewCmdWaiter(session *gexec.Session, timeout time.Duration) *cmdWaiter

NewCmdRunner has default value of exitCode to be 0, and attempts to be 1. To change these, use the builder methods WithExitCode and WithAttempts.

func Run

func Run(executable string, args ...string) *gexec.Session

Types

type CommandStarter

type CommandStarter struct {
	// contains filtered or unexported fields
}

func NewCommandStarter

func NewCommandStarter() *CommandStarter

func NewCommandStarterWithReporter

func NewCommandStarterWithReporter(reporter Reporter) *CommandStarter

func (*CommandStarter) Start

func (r *CommandStarter) Start(executable string, args ...string) *gexec.Session

type DefaultReporter

type DefaultReporter struct{}

func NewDefaultReporter

func NewDefaultReporter() *DefaultReporter

func (*DefaultReporter) Report

func (r *DefaultReporter) Report(startTime time.Time, cmd *exec.Cmd)

type Reporter

type Reporter interface {
	Report(time.Time, *exec.Cmd)
}

Jump to

Keyboard shortcuts

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