Documentation
¶
Index ¶
- func RedisStateStore(log log.Ilogger)
- func SqliteStateStore(log log.Ilogger)
- type FlowElement
- func (f *FlowElement) Do(alias string, cb func(), exceptSteps ...string) *FlowElement
- func (f *FlowElement) End()
- func (f *FlowElement) If(alias string, condition func() bool, failure string) *FlowElement
- func (f *FlowElement) IfElse(alias string, condition func() bool, success string, failure string) *FlowElement
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RedisStateStore ¶
func SqliteStateStore ¶
Types ¶
type FlowElement ¶
type FlowElement struct {
TID string
// contains filtered or unexported fields
}
func FlowGenerator ¶
func FlowGenerator(id string, log log.Ilogger) *FlowElement
example:
TID := "jf93n22" paymentFlow := flow.FlowGenerator(TID, p.log) paymentFlow.
If("first-validation", firstValidation, "need-wait").
Do("calculate-sth-1", func() {}).
Do("calculate-sth-2", func() {}).
IfElse("second-validation", func() bool {
return true
}, "calculate-sth-3", "will-send-package")
paymentFlow.End()
func (*FlowElement) Do ¶
func (f *FlowElement) Do(alias string, cb func(), exceptSteps ...string) *FlowElement
Any kind of operation which dosen't need valid and clear output you can assume this functionality as pipline
func (*FlowElement) End ¶
func (f *FlowElement) End()
func (*FlowElement) If ¶
func (f *FlowElement) If(alias string, condition func() bool, failure string) *FlowElement
func (*FlowElement) IfElse ¶
func (f *FlowElement) IfElse(alias string, condition func() bool, success string, failure string) *FlowElement
Click to show internal directories.
Click to hide internal directories.