Documentation
¶
Overview ¶
Package retry adds retry resilience to individual Flow atoms through the AtomAdvise contract. When an atom carries :retry=N, the adviser consumes the modifier and installs the retry middleware before the modifier table sees the atom.
The `@require` options block can override the policy defaults:
@require retry { default_max: "5" }
Typical use:
flaky.service:retry=3
Index ¶
Constants ¶
const ID = "retry"
Variables ¶
This section is empty.
Functions ¶
func Bundle ¶
Bundle satisfies the standard BundleFactory signature, so native.Bundles() can mount it the same way as every other bundle. Options come from the @require block, or from BundleWithConfig when the caller wants to pin the policy in code.
func BundleWithConfig ¶
BundleWithConfig returns the retry extension with an explicit policy.
Types ¶
type Config ¶
type Config struct {
DefaultMax int
MinBackoff time.Duration
MaxBackoff time.Duration
RetryAll bool
}
Config controls the retry policy installed by the adviser.
func ConfigFromOptions ¶
ConfigFromOptions reads a `@require retry { ... }` options map. Only default_max is recognized today; unknown keys are ignored so future options do not break existing .nflow files.