retry

package
v0.20.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 8, 2026 License: Apache-2.0 Imports: 6 Imported by: 0

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

View Source
const ID = "retry"

Variables

This section is empty.

Functions

func Bundle

func Bundle(opts map[string]string) core.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

func BundleWithConfig(cfg Config) core.Bundle

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

func ConfigFromOptions(opts map[string]string) Config

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL