Documentation ¶
Index ¶
- func NoopStateDurationRecorder(stateName string, testName string, d time.Duration, err error)
- func NoopTestDurationRecorder(testName string, d time.Duration, err error)
- func OptionRecordStateDuration(f StateDurationRecorder) func(e *Engine)
- func OptionRecordTestDuration(f TestDurationRecorder) func(e *Engine)
- type DefaultFactory
- type Engine
- type Factory
- type FileLoader
- type HTTPExecutor
- type Loaders
- type MemoryLoader
- type Option
- type State
- type StateDurationRecorder
- type Test
- type TestDurationRecorder
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NoopStateDurationRecorder ¶
NoopStateDurationRecorder doesn't do anything! it's the default
func NoopTestDurationRecorder ¶
NoopTestDurationRecorder doesn't do anything! it's just the default
func OptionRecordStateDuration ¶
func OptionRecordStateDuration(f StateDurationRecorder) func(e *Engine)
OptionRecordStateDuration allow setting a function to be called to record state durations
func OptionRecordTestDuration ¶
func OptionRecordTestDuration(f TestDurationRecorder) func(e *Engine)
OptionRecordTestDuration allow setting a function to be called to record test durations
Types ¶
type DefaultFactory ¶
type DefaultFactory struct {
// contains filtered or unexported fields
}
DefaultFactory contains options and ability to create engines
func NewDefaultFactory ¶
func NewDefaultFactory(eo ...Option) DefaultFactory
NewDefaultFactory initializes a factory
type Engine ¶
type Engine struct { Test // contains filtered or unexported fields }
Engine decorates a test and contains execution metadata
func NewFromYaml ¶
NewFromYaml can parse a slice of bytes, as yaml, into a test!
func (*Engine) ExecuteState ¶
ExecuteState kicks off a state and keeps track of state execution states
func (*Engine) IsLastState ¶
IsLastState checks if there are anymore states
type FileLoader ¶
type FileLoader struct { Dir string // contains filtered or unexported fields }
FileLoader contains information on how /where to load files from
func NewFileLoader ¶
func NewFileLoader(dir string, ar actions.Registry, tcr transConsRegistry, ef Factory) (FileLoader, error)
NewFileLoader creates a file loader
type HTTPExecutor ¶
HTTPExecutor can load tests and execute them through REST interface!
func NewHTTPExecutor ¶
func NewHTTPExecutor(loaders Loaders) (HTTPExecutor, error)
NewHTTPExecutor initializes and creates http executor server
func (HTTPExecutor) Execute ¶
func (he HTTPExecutor) Execute(w http.ResponseWriter, r *http.Request)
Execute a test
func (HTTPExecutor) ListenAndServe ¶
func (he HTTPExecutor) ListenAndServe()
ListenAndServe tests through http REST interface
func (HTTPExecutor) RegisterHandlers ¶
func (he HTTPExecutor) RegisterHandlers()
RegisterHandlers registers all routes
type Loaders ¶
type Loaders struct {
// contains filtered or unexported fields
}
Loaders collection of loaders
func NewLoaders ¶
func NewLoaders(ls ...loader) Loaders
NewLoaders creates a new collection of loaders
type MemoryLoader ¶
type MemoryLoader struct {
// contains filtered or unexported fields
}
MemoryLoader stores engines by identifier
type Option ¶
type Option func(e *Engine)
Option function allows configuration of an engine instance
type State ¶
type State interface { Execute(context.Context, results.Results) <-chan results.Result Name() string }
State is what this engine can execute!
type StateDurationRecorder ¶
StateDurationRecorder for recording a duration on a state