# avast/retry-go

**Attribution required: if you use, quote, or summarise this content, you must credit and link back to [awesome-repositories.com](https://awesome-repositories.com/repository/avast-retry-go).**

2,929 stars · 174 forks · Go · MIT

## Links

- GitHub: https://github.com/avast/retry-go
- Homepage: http://godoc.org/github.com/avast/retry-go
- awesome-repositories: https://awesome-repositories.com/repository/avast-retry-go.md

## Topics

`go` `golang` `hacktoberfest` `retry` `retry-library`

## Description

Retry-go is a utility library for Go that automates the re-execution of failing code blocks and operations until they succeed or exhaust configured attempt limits. It provides mechanisms for handling transient failures, capturing both computed results and final errors from repeatedly executed functions.

The library supports configurable retry timing through fixed intervals, exponential backoff strategies, and randomized jitter to control recovery speed and prevent overwhelming recovering services. It also includes error filtering rules that trigger retries on specific error conditions while halting execution immediately for unrecoverable failures, alongside lifecycle management features such as timeouts, cancellation signals, attempt callbacks, and reusable persistent policies.

## Tags

### Software Engineering & Architecture

- [Error Handling Automation](https://awesome-repositories.com/f/software-engineering-architecture/automated-code-quality-tools/go-quality-validators/error-handling-automation.md) — Automates the re-execution of failing code blocks in Go programs until they succeed or exhaust attempt limits.
- [Retry Policies](https://awesome-repositories.com/f/software-engineering-architecture/retry-policies.md) — Allows instantiating persistent retry policies to apply across multiple execution cycles and minimize allocation overhead. ([source](https://github.com/avast/retry-go/blob/main/README.md))
- [Backoff Strategies](https://awesome-repositories.com/f/software-engineering-architecture/retry-policies/backoff-strategies.md) — Enables configuring retry timing using fixed intervals, exponential backoff, randomized jitter, or custom strategies to control recovery speed. ([source](https://github.com/avast/retry-go#readme))
- [Automatic Task Retries](https://awesome-repositories.com/f/software-engineering-architecture/task-retry-policies/manual-task-retries/automatic-task-retries.md) — Executes failed operations repeatedly according to configurable limits and rules until success or exhaustion. ([source](https://github.com/avast/retry-go#readme))
- [Retry Policy Management](https://awesome-repositories.com/f/software-engineering-architecture/background-job-dispatchers/job-lifecycle-management/job-snoozing/retry-policy-management.md) — Manages retry contexts with timeouts, cancellation signals, attempt callbacks, and reusable configurations across operations. ([source](https://github.com/avast/retry-go#readme))
- [Conditional Retry Policies](https://awesome-repositories.com/f/software-engineering-architecture/conditional-retry-policies.md) — Supports defining specific error conditions that trigger retries while halting execution immediately for unrecoverable failures. ([source](https://github.com/avast/retry-go#readme))
- [Transient Error Recovery Policies](https://awesome-repositories.com/f/software-engineering-architecture/fault-tolerance-strategies/fault-tolerance-implementation/transient-error-recovery-policies.md) — Provides a utility for handling transient failures in Go code by automatically re-running functions until success.
- [Resilient Networking Patterns](https://awesome-repositories.com/f/software-engineering-architecture/resilient-networking-patterns.md) — Handles transient network drops and server timeouts by automatically repeating failed HTTP calls and API requests.

### Programming Languages & Runtimes

- [Retry Libraries](https://awesome-repositories.com/f/programming-languages-runtimes/retry-libraries.md) — Executes operations with configurable retry limits, exponential backoff, jitter, and error-filtering rules.
