Documentation
¶
Index ¶
- Variables
- type BashExecutor
- type Executor
- func (etr *Executor) Add(step *Step)
- func (etr *Executor) Chan(outC, errC chan<- string)
- func (etr *Executor) Clear()
- func (etr *Executor) Create(cmd string, args ...string)
- func (etr *Executor) CreateFromFullCmd(cmd string)
- func (etr *Executor) Exec() (ok bool, err error)
- func (etr *Executor) Kill()
- func (etr *Executor) NextId() int
- type Step
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrStepsEmpty = errors.New("executor: the steps empty")
)
Functions ¶
This section is empty.
Types ¶
type BashExecutor ¶
type BashExecutor struct {
Cmd string
// contains filtered or unexported fields
}
func NewBashExecutor ¶
func NewBashExecutor(cmd string) *BashExecutor
func (*BashExecutor) BindLog ¶
func (b *BashExecutor) BindLog(logFile string) *BashExecutor
func (*BashExecutor) Exec ¶
func (b *BashExecutor) Exec() *BashExecutor
func (*BashExecutor) OutRelease ¶
func (b *BashExecutor) OutRelease() (v string, ok bool, err error)
func (*BashExecutor) Release ¶
func (b *BashExecutor) Release() (ok bool, err error)
func (*BashExecutor) Run ¶
func (b *BashExecutor) Run() *BashExecutor
type Executor ¶
type Executor struct {
// contains filtered or unexported fields
}
func NewExecutor ¶
func NewExecutorSteps ¶
func (*Executor) CreateFromFullCmd ¶
type Step ¶
type Step struct {
Started bool // The step started?
Exited bool // The step exited?
ExitCode int // The step exit code
Success bool //The step executed and not return an error?
State string // The step state
Pid int // The step process id
UserTime time.Duration // The step user time
SystemTime time.Duration // The step system time
// contains filtered or unexported fields
}
Click to show internal directories.
Click to hide internal directories.