config: add helper funcs

Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
This commit is contained in:
2021-09-30 01:24:16 +03:00
parent e3fee6f8a6
commit 3e40bac5f4
7 changed files with 89 additions and 39 deletions

View File

@@ -20,13 +20,13 @@ type microFlow struct {
}
type microWorkflow struct {
id string
g *dag.AcyclicGraph
init bool
sync.RWMutex
opts Options
g *dag.AcyclicGraph
steps map[string]Step
id string
status Status
sync.RWMutex
init bool
}
func (w *microWorkflow) ID() string {
@@ -424,11 +424,11 @@ func (f *microFlow) WorkflowLoad(ctx context.Context, id string) (Workflow, erro
}
type microCallStep struct {
rsp *Message
req *Message
opts StepOptions
service string
method string
rsp *Message
req *Message
status Status
}
@@ -508,10 +508,10 @@ func (s *microCallStep) Execute(ctx context.Context, req *Message, opts ...Execu
}
type microPublishStep struct {
opts StepOptions
topic string
req *Message
rsp *Message
opts StepOptions
topic string
status Status
}

View File

@@ -120,10 +120,10 @@ type ExecuteOptions struct {
Context context.Context
// Start step
Start string
// Reverse execution
Reverse bool
// Timeout for execution
Timeout time.Duration
// Reverse execution
Reverse bool
// Async enables async execution
Async bool
}