Versions in this module Expand all Collapse all v21 v21.11.1 Apr 26, 2022 Changes in this version + func NewAction(officer *Officer, arbiter Arbiter, run func() error, notify Notify, ...) *action + type Option func(thing *action) error v21.11.0 Feb 17, 2022 Changes in this version + var CommonArbiter = PrevailDone(Min(5), Max(10)) + var DefaultArbiter = PrevailDone(Max(10), Timeout(temporal.GetBigDelay())) + func Action(run func() error, arbiter Arbiter, officer *Officer, first func() error, ...) fail.Error + func DefaultMetadataNotifier(metaID string) func(t Try, v verdict.Enum) + func DefaultNotifier() func(t Try, v verdict.Enum) + func DefaultNotifierWithContext(ctx context.Context) func(t Try, v verdict.Enum) + func DefaultTimeoutSelector() func(action) fail.Error + func LimitError(err error, limit uint) fail.Error + func NotifyByLog(try Try, verdict verdict.Enum) + func StopRetryError(err error, msg ...interface{}) fail.Error + func TimeoutError(err error, limit time.Duration, actual time.Duration, ...) fail.Error + func TimeoutSelector(hard bool) func(action) fail.Error + func WhileSuccessful(run func() error, delay time.Duration, timeout time.Duration) fail.Error + func WhileSuccessfulWithNotify(run func() error, delay time.Duration, timeout time.Duration, notify Notify) fail.Error + func WhileUnsuccessful(run func() error, delay time.Duration, timeout time.Duration) fail.Error + func WhileUnsuccessfulWithAggregator(run func() error, delay time.Duration, timeout time.Duration, ...) fail.Error + func WhileUnsuccessfulWithHardTimeout(run func() error, delay time.Duration, timeout time.Duration) fail.Error + func WhileUnsuccessfulWithHardTimeoutWithNotifier(run func() error, delay time.Duration, timeout time.Duration, notify Notify) fail.Error + func WhileUnsuccessfulWithLimitedRetries(run func() error, delay time.Duration, timeout time.Duration, retries uint) fail.Error + func WhileUnsuccessfulWithNotify(run func() error, delay time.Duration, timeout time.Duration, notify Notify) fail.Error + type Arbiter func(Try) (verdict.Enum, fail.Error) + func Max(limit uint) Arbiter + func Min(limit uint) Arbiter + func OrArbiter(arbiters ...Arbiter) Arbiter + func PrevailDone(arbiters ...Arbiter) Arbiter + func PrevailRetry(arbiters ...Arbiter) Arbiter + func Successful() Arbiter + func Timeout(limit time.Duration) Arbiter + func Unsuccessful() Arbiter + type ArbiterAggregator func(arbiters ...Arbiter) Arbiter + type Backoff func(duration time.Duration) *Officer + func BackoffSelector() Backoff + type ErrLimit = fail.ErrOverflow + type ErrStopRetry = fail.ErrAborted + type ErrTimeout = fail.ErrTimeout + type Notify func(Try, verdict.Enum) + type Officer struct + Block func(Try) + func Constant(duration time.Duration) *Officer + func Exponential(base time.Duration) *Officer + func Fibonacci(base time.Duration) *Officer + func Incremental(duration time.Duration) *Officer + func Linear(duration time.Duration) *Officer + func Randomized(bottom time.Duration, top time.Duration) *Officer + type Try struct + Count uint + Err error + Start time.Time Other modules containing this package github.com/CS-SI/SafeScale github.com/CS-SI/SafeScale/v22