track

package
v0.13.1 Latest Latest
Warning

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

Go to latest
Published: Nov 28, 2019 License: AGPL-3.0 Imports: 6 Imported by: 5

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Matcher

type Matcher struct {
	Str    string
	Stderr bool
	// contains filtered or unexported fields
}

type MatcherCtx

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

func (*MatcherCtx) Match

func (m *MatcherCtx) Match(str string, stderr bool) bool

returns true when all matchers matched

type Tracker

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

Tracker allows to track stdout and stderr of running commands and wait for certain messages to appear

func NewTracker

func NewTracker(cmd *exec.Cmd, logStdout, logStderr bool, prefixStdout, prefixStderr string) (*Tracker, error)

func (*Tracker) LogStderr

func (t *Tracker) LogStderr(b bool)

func (*Tracker) LogStdout

func (t *Tracker) LogStdout(b bool)

func (*Tracker) Match

func (t *Tracker) Match(matchers []Matcher) chan struct{}

Match returns a channel that will be closed when all matchers have matched

func (*Tracker) Wait

func (t *Tracker) Wait()

Wait waits until stdout and stdin are closed

Jump to

Keyboard shortcuts

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