function

TaskRetries

Configure total attempts and deterministic retry delay.

Arguments

ArgumentTypeDescription
maxAttemptsintTotal attempts including the first.
delaytime.DurationBase retry delay.
maxDelaytime.DurationCap for linear or exponential growth.
backoffTaskBackoffFixed, linear, or exponential schedule.

Returns

An immutable task policy option.

TaskOption

Full signature

func TaskRetries( maxAttempts int, delay, maxDelay time.Duration, backoff TaskBackoff, ) TaskOption

Source core/task.go:92

Related types