Documentation
¶
Index ¶
- Constants
- func ExecuteCurrentStage(ctx *ExecutionContext) (done bool, err error)
- func GetDataResolver() data.Resolver
- func NewSimpleScope(attrs []*data.Attribute, parentScope data.Scope) data.Scope
- func Resume(ctx *ExecutionContext) error
- func ResumeCurrentStage(ctx *ExecutionContext) (done bool, err error)
- type BasicRemotePipelineProvider
- type Definition
- type DefinitionConfig
- type DetailedAttribute
- type ExecutionContext
- func (eCtx *ExecutionContext) ActivityHost() activity.Host
- func (eCtx *ExecutionContext) CancelTimer(repeating bool)
- func (eCtx *ExecutionContext) CreateTimer(interval time.Duration, callback support.TimerCallback, repeating bool) error
- func (eCtx *ExecutionContext) FlowDetails() activity.FlowDetails
- func (eCtx *ExecutionContext) GetInitValue(key string) (value interface{}, exists bool)
- func (eCtx *ExecutionContext) GetInput(name string) interface{}
- func (eCtx *ExecutionContext) GetOutput(name string) interface{}
- func (eCtx *ExecutionContext) GetResolver() data.Resolver
- func (eCtx *ExecutionContext) GetSetting(setting string) (value interface{}, exists bool)
- func (eCtx *ExecutionContext) GetSharedTempData() map[string]interface{}
- func (eCtx *ExecutionContext) HasTimer(repeating bool) bool
- func (eCtx *ExecutionContext) ID() string
- func (eCtx *ExecutionContext) IOMetadata() *data.IOMetadata
- func (eCtx *ExecutionContext) Name() string
- func (eCtx *ExecutionContext) Reply(replyData map[string]*data.Attribute, err error)
- func (eCtx *ExecutionContext) Return(returnData map[string]*data.Attribute, err error)
- func (eCtx *ExecutionContext) SetOutput(name string, value interface{})
- func (eCtx *ExecutionContext) Status() ExecutionStatus
- func (eCtx *ExecutionContext) TaskName() string
- func (eCtx *ExecutionContext) UpdateTimer(repeating bool)
- func (eCtx *ExecutionContext) UpdateTimers()
- func (eCtx *ExecutionContext) WorkingData() data.Scope
- type ExecutionStatus
- type InputValue
- type InputValues
- type Instance
- type Manager
- type MapperAlt
- type MultiScope
- type Resolver
- type SharedScope
- type SimpleScope
- type Stage
- type StageConfig
- type StageInputScope
- type StageOutputScope
- type State
- type StateManager
- type Status
- type TickerHolder
- type TimerHolder
Constants ¶
const (
RESTYPE_PIPELINE = "pipeline"
)
Variables ¶
This section is empty.
Functions ¶
func ExecuteCurrentStage ¶
func ExecuteCurrentStage(ctx *ExecutionContext) (done bool, err error)
func GetDataResolver ¶
func NewSimpleScope ¶
NewSimpleScope creates a new SimpleScope
func Resume ¶
func Resume(ctx *ExecutionContext) error
func ResumeCurrentStage ¶
func ResumeCurrentStage(ctx *ExecutionContext) (done bool, err error)
Types ¶
type BasicRemotePipelineProvider ¶
type BasicRemotePipelineProvider struct {
}
func (*BasicRemotePipelineProvider) GetPipeline ¶
func (*BasicRemotePipelineProvider) GetPipeline(pipelineURI string) (*DefinitionConfig, error)
todo this can be generalized an shared with flow
type Definition ¶
type Definition struct {
// contains filtered or unexported fields
}
func NewDefinition ¶
func NewDefinition(config *DefinitionConfig) (*Definition, error)
func (*Definition) Metadata ¶
func (d *Definition) Metadata() *data.IOMetadata
Metadata returns IO metadata for the flow
type DefinitionConfig ¶
type DefinitionConfig struct {
Name string `json:"name"`
Metadata *data.IOMetadata `json:"metadata"`
Stages []*StageConfig `json:"stages"`
}
type DetailedAttribute ¶
type ExecutionContext ¶
type ExecutionContext struct {
// contains filtered or unexported fields
}
func (*ExecutionContext) ActivityHost ¶
func (eCtx *ExecutionContext) ActivityHost() activity.Host
func (*ExecutionContext) CancelTimer ¶
func (eCtx *ExecutionContext) CancelTimer(repeating bool)
CancelTimer cancels the existing timer
func (*ExecutionContext) CreateTimer ¶
func (eCtx *ExecutionContext) CreateTimer(interval time.Duration, callback support.TimerCallback, repeating bool) error
CreateTimer creates a timer, note: can only have one active timer at a time for an activity
func (*ExecutionContext) FlowDetails ¶
func (eCtx *ExecutionContext) FlowDetails() activity.FlowDetails
DEPRECATED
func (*ExecutionContext) GetInitValue ¶
func (eCtx *ExecutionContext) GetInitValue(key string) (value interface{}, exists bool)
DEPRECATED
func (*ExecutionContext) GetInput ¶
func (eCtx *ExecutionContext) GetInput(name string) interface{}
func (*ExecutionContext) GetOutput ¶
func (eCtx *ExecutionContext) GetOutput(name string) interface{}
func (*ExecutionContext) GetResolver ¶
func (eCtx *ExecutionContext) GetResolver() data.Resolver
func (*ExecutionContext) GetSetting ¶
func (eCtx *ExecutionContext) GetSetting(setting string) (value interface{}, exists bool)
func (*ExecutionContext) GetSharedTempData ¶
func (eCtx *ExecutionContext) GetSharedTempData() map[string]interface{}
func (*ExecutionContext) HasTimer ¶
func (eCtx *ExecutionContext) HasTimer(repeating bool) bool
HasTimer indicates if a timer already exists
func (*ExecutionContext) ID ¶
func (eCtx *ExecutionContext) ID() string
func (*ExecutionContext) IOMetadata ¶
func (eCtx *ExecutionContext) IOMetadata() *data.IOMetadata
func (*ExecutionContext) Name ¶
func (eCtx *ExecutionContext) Name() string
func (*ExecutionContext) Reply ¶
func (eCtx *ExecutionContext) Reply(replyData map[string]*data.Attribute, err error)
func (*ExecutionContext) Return ¶
func (eCtx *ExecutionContext) Return(returnData map[string]*data.Attribute, err error)
func (*ExecutionContext) SetOutput ¶
func (eCtx *ExecutionContext) SetOutput(name string, value interface{})
func (*ExecutionContext) Status ¶
func (eCtx *ExecutionContext) Status() ExecutionStatus
func (*ExecutionContext) UpdateTimer ¶
func (eCtx *ExecutionContext) UpdateTimer(repeating bool)
UpdateTimer creates a timer, note: can only have one active timer at a time for an activity
func (*ExecutionContext) UpdateTimers ¶
func (eCtx *ExecutionContext) UpdateTimers()
UpdateTimers creates a timer, note: can only have one active timer at a time for an activity
func (*ExecutionContext) WorkingData ¶
func (eCtx *ExecutionContext) WorkingData() data.Scope
type ExecutionStatus ¶
type ExecutionStatus int
const ( // ExecStatusNotStarted indicates that the Pipeline execution has not started ExecStatusNotStarted ExecutionStatus = 0 // ExecStatusActive indicates that the Pipeline execution is active ExecStatusActive ExecutionStatus = 100 // ExecStatusStalled indicates that the Pipeline execution has stalled ExecStatusStalled ExecutionStatus = 400 // ExecStatusCompleted indicates that the Pipeline execution has been completed ExecStatusCompleted ExecutionStatus = 500 // ExecStatusCancelled indicates that the Pipeline execution has been cancelled ExecStatusCancelled ExecutionStatus = 600 // ExecStatusFailed indicates that the Pipeline execution has failed ExecStatusFailed ExecutionStatus = 700 )
type InputValue ¶
type InputValue interface {
GetValue(scope data.Scope) (*DetailedAttribute, error)
}
type InputValues ¶
type InputValues struct {
// contains filtered or unexported fields
}
func NewInputValues ¶
func (*InputValues) GetDetailedAttrs ¶
func (ivs *InputValues) GetDetailedAttrs(scope data.Scope) (map[string]*DetailedAttribute, error)
type Instance ¶
type Instance struct {
// contains filtered or unexported fields
}
func NewInstance ¶
type Manager ¶
type Manager struct {
// contains filtered or unexported fields
}
func GetManager ¶
func GetManager() *Manager
func NewManager ¶
func NewManager() *Manager
func (*Manager) GetPipeline ¶
func (m *Manager) GetPipeline(uri string) (*Definition, error)
func (*Manager) GetResource ¶
type MultiScope ¶
type SharedScope ¶
type SharedScope struct {
// contains filtered or unexported fields
}
func (*SharedScope) AddAttr ¶
func (inst *SharedScope) AddAttr(attrName string, attrType data.Type, value interface{}) *data.Attribute
AddAttr implements data.MutableScope.SetAttrValue
func (*SharedScope) GetAttr ¶
func (inst *SharedScope) GetAttr(attrName string) (value *data.Attribute, exists bool)
GetAttr implements data.Scope.GetAttr
func (*SharedScope) SetAttrValue ¶
func (inst *SharedScope) SetAttrValue(attrName string, value interface{}) error
SetAttrValue implements data.Scope.SetAttrValue
type SimpleScope ¶
type SimpleScope struct {
// contains filtered or unexported fields
}
SimpleScope is a basic implementation of a scope
func NewSimpleScopeFromMap ¶
NewSimpleScopeFromMap creates a new SimpleScope
func (*SimpleScope) GetAttr ¶
func (s *SimpleScope) GetAttr(name string) (attr *data.Attribute, exists bool)
GetAttr implements Scope.GetAttr
func (*SimpleScope) SetAttrValue ¶
func (s *SimpleScope) SetAttrValue(name string, value interface{}) error
SetAttrValue implements Scope.SetAttrValue
type Stage ¶
type Stage struct {
// contains filtered or unexported fields
}
func NewStage ¶
func NewStage(config *StageConfig) (*Stage, error)
type StageConfig ¶
type StageInputScope ¶
type StageInputScope struct {
// contains filtered or unexported fields
}
SimpleScope is a basic implementation of a scope
func (*StageInputScope) GetAttr ¶
func (s *StageInputScope) GetAttr(name string) (attr *data.Attribute, exists bool)
GetAttr implements Scope.GetAttr
func (*StageInputScope) GetAttrByScope ¶
func (*StageInputScope) SetAttrValue ¶
func (s *StageInputScope) SetAttrValue(name string, value interface{}) error
SetAttrValue implements Scope.SetAttrValue
type StageOutputScope ¶
type StageOutputScope struct {
// contains filtered or unexported fields
}
SimpleScope is a basic implementation of a scope
func (*StageOutputScope) GetAttr ¶
func (s *StageOutputScope) GetAttr(name string) (attr *data.Attribute, exists bool)
GetAttr implements Scope.GetAttr
func (*StageOutputScope) GetAttrByScope ¶
func (*StageOutputScope) SetAttrValue ¶
func (s *StageOutputScope) SetAttrValue(name string, value interface{}) error
SetAttrValue implements Scope.SetAttrValue
type State ¶
type State interface {
GetScope() data.MutableScope
GetSharedData(act activity.Activity) map[string]interface{}
NewTicker(act activity.Activity, interval time.Duration) (*TickerHolder, error)
GetTicker(act activity.Activity) (*TickerHolder, bool)
RemoveTicker(act activity.Activity) bool
NewTimer(act activity.Activity, interval time.Duration) (*TimerHolder, error)
GetTimer(act activity.Activity) (*TimerHolder, bool)
RemoveTimer(act activity.Activity) bool
}
type StateManager ¶
func NewMultiStateManager ¶
func NewMultiStateManager() StateManager
func NewSimpleStateManager ¶
func NewSimpleStateManager() StateManager
type TickerHolder ¶
type TickerHolder struct {
// contains filtered or unexported fields
}
func (*TickerHolder) GetLastExecCtx ¶
func (t *TickerHolder) GetLastExecCtx() *ExecutionContext
func (*TickerHolder) GetTicker ¶
func (t *TickerHolder) GetTicker() *time.Ticker
func (*TickerHolder) SetLastExecCtx ¶
func (t *TickerHolder) SetLastExecCtx(ctx *ExecutionContext)
type TimerHolder ¶
type TimerHolder struct {
// contains filtered or unexported fields
}
func (*TimerHolder) GetLastExecCtx ¶
func (t *TimerHolder) GetLastExecCtx() *ExecutionContext
func (*TimerHolder) GetTimer ¶
func (t *TimerHolder) GetTimer() *time.Timer
func (*TimerHolder) SetLastExecCtx ¶
func (t *TimerHolder) SetLastExecCtx(ctx *ExecutionContext)