{"id":45618790,"url":"https://github.com/abursavich/retry","last_synced_at":"2026-02-23T18:26:48.549Z","repository":{"id":59044224,"uuid":"528226096","full_name":"abursavich/retry","owner":"abursavich","description":"Package retry provides backoff algorithms for retryable processes.","archived":false,"fork":false,"pushed_at":"2024-08-11T18:39:09.000Z","size":28,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-06-04T17:11:39.207Z","etag":null,"topics":["backoff","exponential-backoff","golang","retry"],"latest_commit_sha":null,"homepage":"https://bursavich.dev/retry","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/abursavich.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-08-24T01:46:23.000Z","updated_at":"2024-08-11T18:39:00.000Z","dependencies_parsed_at":"2024-06-20T13:01:23.766Z","dependency_job_id":"a41c0f5d-8b37-4fcb-b34b-64578d55dcc1","html_url":"https://github.com/abursavich/retry","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"purl":"pkg:github/abursavich/retry","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abursavich%2Fretry","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abursavich%2Fretry/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abursavich%2Fretry/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abursavich%2Fretry/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/abursavich","download_url":"https://codeload.github.com/abursavich/retry/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abursavich%2Fretry/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29750482,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-23T07:44:07.782Z","status":"ssl_error","status_checked_at":"2026-02-23T07:44:07.432Z","response_time":90,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["backoff","exponential-backoff","golang","retry"],"created_at":"2026-02-23T18:26:47.985Z","updated_at":"2026-02-23T18:26:48.486Z","avatar_url":"https://github.com/abursavich.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Retry\n[![License][license-img]][license]\n[![GoDev Reference][godev-img]][godev]\n[![Go Report Card][goreportcard-img]][goreportcard]\n\nPackage retry provides backoff algorithms for retryable processes.\n\nIt was inspired by [github.com/cenkalti/backoff/v4][backoff] which is a port of [Google's HTTP Client\nLibrary for Java].\n\n\n## Why?\n\nIt separates state from policy, which reduces allocations and allows a single policy instance to be used\nconcurrently by all callers, and it uses explicit return values instead of magic sentinel values.\n\n```go\ntype Policy interface {\n    Next(err error, start, now time.Time, attempt int) (backoff time.Duration, retry bool)\n}\n```\n\nIt decomposes features and encourages their composition.\n\n```go\npolicy := retry.WithRandomJitter(retry.ConstantBackoff(time.Second), 0.5)\n```\n\nIt makes [context] first-class and improves call ergonomics.\n\n```go\nerr := retry.Do(ctx, policy, func() error {\n    // ...\n})\n```\n\n\n[license]: https://raw.githubusercontent.com/abursavich/retry/main/LICENSE\n[license-img]: https://img.shields.io/badge/license-mit-blue.svg?style=for-the-badge\n\n[godev]: https://pkg.go.dev/bursavich.dev/retry\n[godev-img]: https://img.shields.io/static/v1?logo=go\u0026logoColor=white\u0026color=00ADD8\u0026label=dev\u0026message=reference\u0026style=for-the-badge\n\n[goreportcard]: https://goreportcard.com/report/bursavich.dev/retry\n[goreportcard-img]: https://goreportcard.com/badge/bursavich.dev/retry?style=for-the-badge\n\n[backoff]: https://pkg.go.dev/github.com/cenkalti/backoff/v4\n[Google's HTTP Client Library for Java]: https://github.com/google/google-http-java-client/blob/da1aa993e90285ec18579f1553339b00e19b3ab5/google-http-client/src/main/java/com/google/api/client/util/ExponentialBackOff.java\n[context]: https://pkg.go.dev/context#Context\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fabursavich%2Fretry","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fabursavich%2Fretry","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fabursavich%2Fretry/lists"}