Versions in this module Expand all Collapse all v0 v0.0.1 Sep 28, 2017 Changes in this version + func ContextProviders() []string + func Handlers() []string + func RegisterContextProvider(name string, newContextProviderFunc NewContextProviderFunc) + func RegisterHandler(name string, newHandlerFunc NewHandlerFunc) + func RegisterRunner(name string, newRunnerFunc NewRunnerFunc) + func Runners() []string + type Context interface + Delete func(key string) Context + Flush func() + Get func(key string) (value interface{}, exist bool) + GetAll func() map[string]interface{} + ID func() string + Keys func() []string + Set func(key string, value interface{}) Context + type ContextProvider interface + NewContext func(conf config.Configuration) Context + func NewContextProvider(name string, conf config.Configuration) (contextProvider ContextProvider, err error) + func NewLocalContextProvider(conf config.Configuration) (provider ContextProvider, err error) + type ErrorHandler interface + Handle func(err error, step *Step, ctx Context) bool + type Flow struct + func NewFlow(name string, opts ...FlowOption) (f *Flow, err error) + func (p *Flow) Name() string + func (p *Flow) NewTask() *Task + func (p *Flow) Setup(steps []Step) *Flow + type FlowOption func(*Flow) error + func Config(conf config.Configuration) FlowOption + func ConfigFile(filename string) FlowOption + func ConfigString(str string) FlowOption + type Handler interface + Handle func(step Step, ctx Context) error + func NewHandler(name string, conf config.Configuration) (handler Handler, err error) + type LocalContext struct + func (p *LocalContext) Delete(key string) Context + func (p *LocalContext) Flush() + func (p *LocalContext) Get(key string) (value interface{}, exist bool) + func (p *LocalContext) ID() string + func (p *LocalContext) Set(key string, value interface{}) Context + func (p LocalContext) GetAll() map[string]interface{} + func (p LocalContext) Keys() []string + type LocalContextProvider struct + func (p *LocalContextProvider) NewContext(conf config.Configuration) Context + type NewContextProviderFunc func(conf config.Configuration) (contextProvider ContextProvider, err error) + type NewHandlerFunc func(conf config.Configuration) (handler Handler, err error) + type NewRunnerFunc func(conf config.Configuration) (runner TaskRunner, err error) + type PipeTaskRunner struct + func (p *PipeTaskRunner) Name() string + func (p *PipeTaskRunner) Run(task *Task) + func (p *PipeTaskRunner) SetErrorHandler(handler ErrorHandler) + type Step struct + func NewStep(flowName, stepName, handlerName string, conf config.Configuration) Step + func (p *Step) Flow() string + func (p *Step) Handler() string + func (p *Step) Name() string + func (p *Step) String() string + func (p *Step) TaskID() string + type Task struct + func NewTask(flo *Flow, ctx Context) *Task + func (p *Task) Context() Context + func (p *Task) Errors() []error + func (p *Task) Flow() string + func (p *Task) ID() string + func (p *Task) LatestError() error + func (p *Task) Run() (err error) + func (p *Task) Status() TaskStatus + func (p *Task) String() string + type TaskRunner interface + Run func(task *Task) + SetErrorHandler func(handler ErrorHandler) + func NewPipeTaskRunner(conf config.Configuration) (runner TaskRunner, err error) + func NewRunner(name string, conf config.Configuration) (runner TaskRunner, err error) + type TaskStatus int + var TaskStatusDone TaskStatus = 4 + var TaskStatusPending TaskStatus = 2 + var TaskStatusReady TaskStatus = 1 + var TaskStatusRunning TaskStatus = 3