retry

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Jul 25, 2026 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

Package retry provides the retry classification and backoff shared by the autonomous runtime and the workflow orchestrator, so both apply the same semantics: only errors that explicitly classify themselves as retryable are re-attempted, with exponential backoff and jitter between attempts.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Backoff

func Backoff(ctx context.Context, attempt int) error

Backoff sleeps before the given 1-based retry attempt with exponential backoff (100ms base, 2s cap) and ±25% jitter, aborting early with the context error if ctx is done.

func Retryable

func Retryable(ctx context.Context, err error) bool

Retryable reports whether err is worth retrying. The caller's context must still be live, and the error (or any error in its chain) must classify itself as retryable via a `Retryable() bool` method (e.g. llm.APIError). Unclassified errors are treated as permanent: blindly re-running them would just repeat the failure - or worse, repeat a side effect.

Types

This section is empty.

Jump to

Keyboard shortcuts

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