Documentation
¶
Index ¶
- func GetDataResolver() resolve.CompositeResolver
- func GetExprFactory() expression.Factory
- func GetMapperFactory() mapper.Factory
- func NewDefaultActivityOutputMapper(task *Task) mapper.Mapper
- func SetExprFactory(factory expression.Factory)
- func SetMapperFactory(factory mapper.Factory)
- type ActivityConfig
- func (ac *ActivityConfig) GetInputSchema(name string) schema.Schema
- func (ac *ActivityConfig) GetOutput(name string) interface{}
- func (ac *ActivityConfig) GetOutputSchema(name string) schema.Schema
- func (ac *ActivityConfig) GetSetting(setting string) (val interface{}, exists bool)
- func (ac *ActivityConfig) InputMapper() mapper.Mapper
- func (ac *ActivityConfig) OutputMapper() mapper.Mapper
- func (ac *ActivityConfig) Ref() string
- type ActivityResolver
- type Definition
- func (d *Definition) Cleanup() error
- func (d *Definition) ExplicitReply() bool
- func (d *Definition) GetAttr(attrName string) (attr *data.Attribute, exists bool)
- func (d *Definition) GetErrorHandler() *ErrorHandler
- func (d *Definition) GetLink(linkID int) *Link
- func (d *Definition) GetTask(taskID string) *Task
- func (d *Definition) Links() []*Link
- func (d *Definition) Metadata() *metadata.IOMetadata
- func (d *Definition) ModelID() string
- func (d *Definition) Name() string
- func (d *Definition) Reconfigure(config *resource.Config) error
- func (d *Definition) Tasks() []*Task
- type DefinitionRep
- type ErrorHandler
- type ErrorHandlerRep
- type ErrorResolver
- type FlowContextResolver
- type FlowResolver
- type IteratorResolver
- type Link
- type LinkExprError
- type LinkRep
- type LinkType
- type LoopConfig
- type Provider
- type RetryOnError
- type Task
- func (task *Task) ActivityConfig() *ActivityConfig
- func (task *Task) FromLinks() []*Link
- func (task *Task) ID() string
- func (task *Task) IsScope() bool
- func (task *Task) LoopConfig() *LoopConfig
- func (task *Task) Name() string
- func (task *Task) RetryOnErrConfig() RetryOnError
- func (task *Task) SettingsMapper() mapper.Mapper
- func (task *Task) String() string
- func (task *Task) ToLinks() []*Link
- func (task *Task) TypeID() string
- type TaskRep
- type VariableResolver
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetDataResolver ¶
func GetDataResolver() resolve.CompositeResolver
func GetExprFactory ¶
func GetExprFactory() expression.Factory
func GetMapperFactory ¶
func SetExprFactory ¶
func SetExprFactory(factory expression.Factory)
func SetMapperFactory ¶
Types ¶
type ActivityConfig ¶
type ActivityConfig struct {
Activity activity.Activity
Logger log.Logger
Name string
HostName string
Type string
Details *activity.Details
IsLegacy bool
// contains filtered or unexported fields
}
func (*ActivityConfig) GetInputSchema ¶
func (ac *ActivityConfig) GetInputSchema(name string) schema.Schema
func (*ActivityConfig) GetOutput ¶
func (ac *ActivityConfig) GetOutput(name string) interface{}
Deprecated
func (*ActivityConfig) GetOutputSchema ¶
func (ac *ActivityConfig) GetOutputSchema(name string) schema.Schema
func (*ActivityConfig) GetSetting ¶
func (ac *ActivityConfig) GetSetting(setting string) (val interface{}, exists bool)
GetSetting gets the specified setting
func (*ActivityConfig) InputMapper ¶
func (ac *ActivityConfig) InputMapper() mapper.Mapper
InputMapper returns the InputMapper of the task
func (*ActivityConfig) OutputMapper ¶
func (ac *ActivityConfig) OutputMapper() mapper.Mapper
OutputMapper returns the OutputMapper of the task
func (*ActivityConfig) Ref ¶
func (ac *ActivityConfig) Ref() string
type ActivityResolver ¶
type ActivityResolver struct {
}
func (*ActivityResolver) GetResolverInfo ¶
func (r *ActivityResolver) GetResolverInfo() *resolve.ResolverInfo
type Definition ¶
type Definition struct {
// contains filtered or unexported fields
}
Definition is the object that describes the definition of a flow. It contains its data (attributes) and structure (tasks & links).
func NewDefinition ¶
func NewDefinition(rep *DefinitionRep) (def *Definition, err error)
NewDefinition creates a flow Definition from a serializable definition representation
func (*Definition) Cleanup ¶
func (d *Definition) Cleanup() error
func (*Definition) ExplicitReply ¶
func (d *Definition) ExplicitReply() bool
func (*Definition) GetAttr ¶
func (d *Definition) GetAttr(attrName string) (attr *data.Attribute, exists bool)
GetAttr gets the specified attribute
func (*Definition) GetErrorHandler ¶
func (d *Definition) GetErrorHandler() *ErrorHandler
func (*Definition) GetLink ¶
func (d *Definition) GetLink(linkID int) *Link
GetLink returns the link with the specified ID
func (*Definition) GetTask ¶
func (d *Definition) GetTask(taskID string) *Task
GetTask returns the task with the specified ID
func (*Definition) Links ¶
func (d *Definition) Links() []*Link
func (*Definition) Metadata ¶
func (d *Definition) Metadata() *metadata.IOMetadata
Metadata returns IO metadata for the flow
func (*Definition) ModelID ¶
func (d *Definition) ModelID() string
ModelID returns the ID of the model the definition uses
func (*Definition) Name ¶
func (d *Definition) Name() string
Name returns the name of the definition
func (*Definition) Reconfigure ¶ added in v1.6.4
func (d *Definition) Reconfigure(config *resource.Config) error
func (*Definition) Tasks ¶
func (d *Definition) Tasks() []*Task
GetTask returns the task with the specified ID
type DefinitionRep ¶
type DefinitionRep struct {
ExplicitReply bool `json:"explicitReply,omitempty"`
Name string `json:"name"`
ModelID string `json:"model,omitempty"`
Metadata *metadata.IOMetadata `json:"metadata,omitempty"`
Tasks []*TaskRep `json:"tasks"`
Links []*LinkRep `json:"links,omitempty"`
ErrorHandler *ErrorHandlerRep `json:"errorHandler,omitempty"`
}
DefinitionRep is a serializable representation of a flow Definition
type ErrorHandler ¶
type ErrorHandler struct {
// contains filtered or unexported fields
}
func (*ErrorHandler) GetTask ¶ added in v1.2.0
func (eh *ErrorHandler) GetTask(taskID string) *Task
func (*ErrorHandler) Tasks ¶
func (eh *ErrorHandler) Tasks() []*Task
type ErrorHandlerRep ¶
type ErrorHandlerRep struct {
Tasks []*TaskRep `json:"tasks"`
Links []*LinkRep `json:"links,omitempty"`
}
ErrorHandlerRep is a serializable representation of the error flow
type ErrorResolver ¶
type ErrorResolver struct {
}
func (*ErrorResolver) GetResolverInfo ¶
func (r *ErrorResolver) GetResolverInfo() *resolve.ResolverInfo
type FlowContextResolver ¶ added in v1.6.1
type FlowContextResolver struct {
}
func (*FlowContextResolver) GetResolverInfo ¶ added in v1.6.1
func (r *FlowContextResolver) GetResolverInfo() *resolve.ResolverInfo
type FlowResolver ¶
type FlowResolver struct {
}
func (*FlowResolver) GetResolverInfo ¶
func (r *FlowResolver) GetResolverInfo() *resolve.ResolverInfo
type IteratorResolver ¶
type IteratorResolver struct {
}
func (*IteratorResolver) GetResolverInfo ¶
func (*IteratorResolver) GetResolverInfo() *resolve.ResolverInfo
type Link ¶
type Link struct {
// contains filtered or unexported fields
}
LinkOld is the object that describes the definition of a link.
func GetExpressionLinks ¶
func GetExpressionLinks(def *Definition) []*Link
GetExpressionLinks gets the links of the definition that are of type LtExpression
func (*Link) Expr ¶
func (link *Link) Expr() expression.Expr
Expr returns the expr associated with the link, nil if there is none
type LinkExprError ¶
type LinkExprError struct {
// contains filtered or unexported fields
}
LinkExprError thrown if error is encountered evaluating an link expression
func NewLinkExprError ¶
func NewLinkExprError(msg string) *LinkExprError
func (*LinkExprError) Error ¶
func (e *LinkExprError) Error() string
type LinkRep ¶
type LinkRep struct {
Type string `json:"type,omitempty"`
Name string `json:"name,omitempty"`
ToID string `json:"to"`
FromID string `json:"from"`
Label string `json:"label"`
Value string `json:"value,omitempty"`
}
LinkRep is a serializable representation of a flow LinkOld
type LinkType ¶
type LinkType int
LinkType is an enum for possible Link Types
const ( // LtDependency denotes an normal dependency link LtDependency LinkType = 0 // LtExpression denotes a link with an expression LtExpression LinkType = 1 //expr language on the model or def? // LtLabel denotes 'label' link LtLabel LinkType = 2 // LtError denotes an error link LtError LinkType = 3 // LtExprOtherwise denotes an expression otherwise link LtExprOtherwise = 4 )
type LoopConfig ¶ added in v1.0.0
type LoopConfig struct {
// contains filtered or unexported fields
}
func (*LoopConfig) Accumulate ¶ added in v1.0.0
func (l *LoopConfig) Accumulate() bool
func (*LoopConfig) ApplyOutputOnAccumulate ¶ added in v1.0.0
func (l *LoopConfig) ApplyOutputOnAccumulate() bool
func (*LoopConfig) Condition ¶ added in v1.0.0
func (l *LoopConfig) Condition() expression.Expr
func (*LoopConfig) Delay ¶ added in v1.0.0
func (l *LoopConfig) Delay() int
func (*LoopConfig) GetIterateOn ¶ added in v1.0.0
func (l *LoopConfig) GetIterateOn() interface{}
type Provider ¶
type Provider interface {
// GetFlow retrieves the flow definition for the specified uri
GetFlow(flowURI string) (*DefinitionRep, error)
}
ExtensionProvider is the interface that describes an object that can provide flow definitions from a URI
type RetryOnError ¶ added in v1.5.0
type Task ¶
type Task struct {
// contains filtered or unexported fields
}
Task is the object that describes the definition of a task. It contains its data (attributes) and its nested structure (child tasks & child links).
func (*Task) ActivityConfig ¶
func (task *Task) ActivityConfig() *ActivityConfig
func (*Task) IsScope ¶
IsScope returns flag indicating if the Task is a scope task (a container of attributes)
func (*Task) LoopConfig ¶ added in v0.9.4
func (task *Task) LoopConfig() *LoopConfig
func (*Task) RetryOnErrConfig ¶ added in v1.0.0
func (task *Task) RetryOnErrConfig() RetryOnError
func (*Task) SettingsMapper ¶
SettingsMapper returns the SettingsMapper of the task
type TaskRep ¶
type TaskRep struct {
ID string `json:"id"`
Type string `json:"type,omitempty"`
Name string `json:"name,omitempty"`
Settings map[string]interface{} `json:"settings,omitempty"`
ActivityCfgRep *activity.Config `json:"activity"`
}
TaskRep is a serializable representation of a flow task
type VariableResolver ¶ added in v1.6.19
type VariableResolver struct {
}
func (*VariableResolver) GetResolverInfo ¶ added in v1.6.19
func (r *VariableResolver) GetResolverInfo() *resolve.ResolverInfo