Documentation ¶
Overview ¶
Engine tasks: - let drivers register actions - parse scenario .dot files - execute scenarios
Index ¶
- Constants
- Variables
- func IsNotResolved(x interface{}) bool
- type Arg
- type ArgApplier
- type Doer
- type Engine
- func (e *Engine) Exec(ctx context.Context, d Doer) error
- func (e *Engine) ExecList(ctx context.Context, tag string, list []string) []error
- func (e *Engine) ExecPart(ctx context.Context, d Doer) error
- func (e *Engine) List() []string
- func (e *Engine) ParseText(tag, text string) (Doer, error)
- func (e *Engine) Register(action string, d Doer)
- func (e *Engine) RegisterNewFunc(name string, fun func(context.Context) error)
- func (e *Engine) RegisterNewSeq(name string, ds ...Doer)
- func (e *Engine) RegisterParse(name, scenario string) error
- func (e *Engine) Resolve(action string) Doer
- func (e *Engine) ResolveOrLazy(action string) (Doer, error)
- func (e *Engine) SetProfile(re *regexp.Regexp, min time.Duration, fun ProfileFunc)
- func (e *Engine) TestDo(t testing.TB, ctx context.Context, name string)
- func (e *Engine) ValidateExec(ctx context.Context, d Doer) error
- type ErrNotResolved
- type Fail
- type Forcer
- type Func
- type Func0
- type FuncArg
- type IgnoreArg
- type Lazy
- type MaybeBool
- type Nothing
- type ProfileFunc
- type RepeatN
- type RestartError
- type Run
- type Seq
- type Sleep
- type ValidateFunc
Constants ¶
View Source
const ContextKey = "run/engine"
View Source
const FmtErrContext = "`%s`" // errors.Annotatef(err, FmtErrContext, doer.String())
Variables ¶
View Source
var ErrArgNotApplied = errors.Errorf("Argument is not applied")
View Source
var ErrArgOverwrite = errors.Errorf("Argument already applied")
Functions ¶
func IsNotResolved ¶
func IsNotResolved(x interface{}) bool
IsNotResolved Test `error` or `Doer` against ErrNotResolved
Types ¶
type Engine ¶
func (*Engine) RegisterNewFunc ¶
func (*Engine) RegisterNewSeq ¶
func (*Engine) RegisterParse ¶
func (*Engine) SetProfile ¶
SetProfile re=nil or fun=nil to disable profiling.
type ErrNotResolved ¶
type ErrNotResolved struct {
// contains filtered or unexported fields
}
func NewErrNotResolved ¶
func NewErrNotResolved(action string) ErrNotResolved
func (ErrNotResolved) Error ¶
func (e ErrNotResolved) Error() string
type Func0 ¶
type Func0 struct { Name string F func() error V ValidateFunc }
type FuncArg ¶
type ProfileFunc ¶
type RestartError ¶
func (*RestartError) String ¶
func (re *RestartError) String() string
func (*RestartError) Validate ¶
func (re *RestartError) Validate() error
type Seq ¶
type Seq struct {
// contains filtered or unexported fields
}
Sequence executor. Specialized version of Tree for performance. Error in one action aborts whole group. Build graph with NewSeq().Append()
type ValidateFunc ¶
type ValidateFunc func() error
Source Files ¶
Click to show internal directories.
Click to hide internal directories.