Versions in this module Expand all Collapse all v1 v1.0.0 Oct 30, 2018 Changes in this version + var ErrSucc = errors.New("trans succ") + var ErrTimeout = errors.New("timeout") + var ErrUnexpectedEvent = errors.New("unexpected event") + type AllOf struct + Specs []Specification + func (this *AllOf) Ok(transInfo *TransInfo) bool + type AnyOf struct + Specs []Specification + func (this *AnyOf) Ok(transInfo *TransInfo) bool + type Concurrent struct + Fragments []Fragment + func (this *Concurrent) Exec(transInfo *TransInfo) error + func (this *Concurrent) Rollback(transInfo *TransInfo) + type Fail struct + ErrCode error + func (this *Fail) Exec(transInfo *TransInfo) error + func (this *Fail) Rollback(transInfo *TransInfo) + type Fragment interface + Exec func(transInfo *TransInfo) error + Rollback func(transInfo *TransInfo) + type Loop struct + BreakErrs []error + ContinueErrs []error + FuncVar func() Fragment + func (this *Loop) Exec(transInfo *TransInfo) error + func (this *Loop) Rollback(transInfo *TransInfo) + type Not struct + Spec Specification + func (this *Not) Ok(transInfo *TransInfo) bool + type Optional struct + ElseFrag Fragment + IfFrag Fragment + Spec Specification + func (this *Optional) Exec(transInfo *TransInfo) error + func (this *Optional) Rollback(transInfo *TransInfo) + type Procedure struct + Fragments []Fragment + func (this *Procedure) Exec(transInfo *TransInfo) error + func (this *Procedure) Rollback(transInfo *TransInfo) + type Repeat struct + Fragment Fragment + MaxTimes int + TimeLen time.Duration + func (this *Repeat) Exec(transInfo *TransInfo) error + func (this *Repeat) Rollback(transInfo *TransInfo) + type Retry struct + Errs []error + Fragment Fragment + MaxTimes int + TimeLen time.Duration + func (this *Retry) Exec(transInfo *TransInfo) error + func (this *Retry) Rollback(transInfo *TransInfo) + type Specification interface + Ok func(transInfo *TransInfo) bool + type Succ struct + func (this *Succ) Exec(transInfo *TransInfo) error + func (this *Succ) Rollback(transInfo *TransInfo) + type TransInfo struct + AppInfo interface{} + Ch chan struct{} + EventId string + LoopIdx int + Times int + type Transaction struct + Fragments []Fragment + func (this *Transaction) HandleEvent(EventId string, transInfo *TransInfo) error + func (this *Transaction) Start(transInfo *TransInfo) error + type Wait struct + EventId string + Fragment Fragment + Timeout time.Duration + func (this *Wait) Exec(transInfo *TransInfo) error + func (this *Wait) Rollback(transInfo *TransInfo)