Documentation ¶
Index ¶
- Variables
- type BranchOption
- type BranchOptions
- type Context
- type Dag
- func (this *Dag) Append(dag *Dag)
- func (this *Dag) ConditionalBranch(vertex string, conditions []string, condition sdk.Condition, ...) (conditiondags map[string]*Dag)
- func (this *Dag) Edge(from, to string, opts ...BranchOption)
- func (this *Dag) ForEachBranch(vertex string, foreach sdk.ForEach, options ...BranchOption) (dag *Dag)
- func (this *Dag) Node(vertex string, options ...BranchOption) *Node
- func (this *Dag) SubDag(vertex string, dag *Dag)
- type DataStore
- type FaasOperation
- func (operation *FaasOperation) Encode() []byte
- func (operation *FaasOperation) Execute(data []byte, option map[string]interface{}) ([]byte, error)
- func (operation *FaasOperation) GetHeaders() map[string]string
- func (operation *FaasOperation) GetId() string
- func (operation *FaasOperation) GetParams() map[string][]string
- func (operation *FaasOperation) GetProperties() map[string][]string
- type FuncErrorHandler
- type Modifier
- type Node
- type Option
- type Options
- type ReqHandler
- type RespHandler
- type StateStore
- type Workflow
- func (flow *Workflow) Dag() *Dag
- func (flow *Workflow) Finally(handler sdk.PipelineHandler)
- func (flow *Workflow) GetPipeline() *sdk.Pipeline
- func (flow *Workflow) OnFailure(handler sdk.PipelineErrorHandler)
- func (flow *Workflow) SetDag(dag *Dag)
- func (flow *Workflow) SyncNode(options ...BranchOption) *Node
Constants ¶
This section is empty.
Variables ¶
var (
BLANK_MODIFIER = func(data []byte) ([]byte, error) { return data, nil }
)
var ( // Execution specify a edge doesn't forwards a data // but rather mention a execution direction Execution = InvokeEdge() )
Functions ¶
This section is empty.
Types ¶
type BranchOption ¶
type BranchOption func(*BranchOptions)
func Aggregator ¶
func Aggregator(aggregator sdk.Aggregator) BranchOption
Aggregator aggregates all outputs into one
func Forwarder ¶
func Forwarder(forwarder sdk.Forwarder) BranchOption
Forwarder encodes request based on need for children vertex by default the data gets forwarded as it is
func InvokeEdge ¶
func InvokeEdge() BranchOption
InvokeEdge denotes a edge doesn't forwards a data, but rather provides only an execution flow
type BranchOptions ¶
type BranchOptions struct {
// contains filtered or unexported fields
}
BranchOptions options for branching in DAG
type Dag ¶
type Dag struct {
// contains filtered or unexported fields
}
func (*Dag) Append ¶
Append generalizes a seperate dag by appending its properties into current dag. Provided dag should be mutually exclusive
func (*Dag) ConditionalBranch ¶
func (this *Dag) ConditionalBranch(vertex string, conditions []string, condition sdk.Condition, options ...BranchOption) (conditiondags map[string]*Dag)
ConditionalBranch composites multiple dags as a sub-dag which executes for a conditions matched and returns the set of dags based on the condition passed
func (*Dag) Edge ¶
func (this *Dag) Edge(from, to string, opts ...BranchOption)
Edge adds a directed edge between two vertex as <from>-><to>
func (*Dag) ForEachBranch ¶
func (this *Dag) ForEachBranch(vertex string, foreach sdk.ForEach, options ...BranchOption) (dag *Dag)
ForEachBranch composites a sub-dag which executes for each value It returns the sub-dag that will be executed for each value
type FaasOperation ¶
type FaasOperation struct { // FaasOperations Function string // The name of the function HttpRequestUrl string // HttpRequest Url Mod Modifier // Modifier // Optional Options Header map[string]string // The HTTP call header Param map[string][]string // The Parameter in Query string FailureHandler FuncErrorHandler // The Failure handler of the operation Requesthandler ReqHandler // The http request handler of the operation OnResphandler RespHandler // The http Resp handler of the operation }
func (*FaasOperation) Encode ¶
func (operation *FaasOperation) Encode() []byte
func (*FaasOperation) Execute ¶
func (operation *FaasOperation) Execute(data []byte, option map[string]interface{}) ([]byte, error)
func (*FaasOperation) GetHeaders ¶
func (operation *FaasOperation) GetHeaders() map[string]string
func (*FaasOperation) GetId ¶
func (operation *FaasOperation) GetId() string
func (*FaasOperation) GetParams ¶
func (operation *FaasOperation) GetParams() map[string][]string
func (*FaasOperation) GetProperties ¶
func (operation *FaasOperation) GetProperties() map[string][]string
type FuncErrorHandler ¶
FuncErrorHandler the error handler for OnFailure() options
type Node ¶
type Node struct {
// contains filtered or unexported fields
}
func (*Node) AddOperation ¶
AddOperation adds an Operation to the given vertex
type Option ¶
type Option func(*Options)
func OnFailure ¶
func OnFailure(handler FuncErrorHandler) Option
OnFailure Specify a function failure handler
func OnReponse ¶
func OnReponse(handler RespHandler) Option
OnResponse Specify a response handler for function and callback
func RequestHandler ¶
func RequestHandler(handler ReqHandler) Option
RequestHandler Specify a request handler for function and callback request
type Options ¶
type Options struct {
// contains filtered or unexported fields
}
Options options for operation execution
type ReqHandler ¶
Reqhandler definition for RequestHdlr() option on operation
type RespHandler ¶
RespHandler definition for OnResponse() option on operation
type StateStore ¶
type StateStore sdk.StateStore
type Workflow ¶
type Workflow struct {
// contains filtered or unexported fields
}
func GetWorkflow ¶
GetWorkflow initiates a flow with a pipeline
func (*Workflow) Finally ¶
func (flow *Workflow) Finally(handler sdk.PipelineHandler)
Finally sets an execution finish handler routine it will be called once the execution has finished with state either Success/Failure
func (*Workflow) GetPipeline ¶
GetPipeline expose the underlying pipeline object
func (*Workflow) OnFailure ¶
func (flow *Workflow) OnFailure(handler sdk.PipelineErrorHandler)
OnFailure set a failure handler routine for the pipeline
func (*Workflow) SyncNode ¶
func (flow *Workflow) SyncNode(options ...BranchOption) *Node
SyncNode adds a new vertex named Sync