RunningCommand

package
v0.0.0-...-fcb1268 Latest Latest
Warning

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

Go to latest
Published: Jun 6, 2018 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DoWithFeedbackFunc

type DoWithFeedbackFunc func(isErr bool, fb string)

type RunningCommand

type RunningCommand struct {
	OnFinishAction   actionOnFinish
	AdditionalObject interface{}
	WorkingDirectory string
	CommandExePath   string
	CommandArguments []string
	CommandObj       *exec.Cmd
	CurrentFeedback  []string
	IsRunning        bool
	RanSuccessfully  bool

	ReadStdOutChannel chan string
	ReadStdErrChannel chan string
	QuitChannel       chan bool

	CompletionTime time.Time

	WasKilledBeforeFinish bool
	// contains filtered or unexported fields
}

func New

func New(onFinishAction actionOnFinish, additionalObject interface{}, commandExePath string, commandArguments ...string) *RunningCommand

func (*RunningCommand) AppendLine

func (r *RunningCommand) AppendLine(lineStr string, isErrorLine bool)

func (*RunningCommand) ForceKill

func (r *RunningCommand) ForceKill()

func (*RunningCommand) Start

func (r *RunningCommand) Start(timeoutDuration time.Duration) *RunningCommand

func (*RunningCommand) StartAndDoWithFeedback

func (r *RunningCommand) StartAndDoWithFeedback(timeoutDuration time.Duration, doWithFeedbackFunc DoWithFeedbackFunc)

Jump to

Keyboard shortcuts

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