{"id":15663696,"url":"https://github.com/code-hex/retrygroup","last_synced_at":"2025-05-06T18:45:03.286Z","repository":{"id":71654957,"uuid":"82458402","full_name":"Code-Hex/retrygroup","owner":"Code-Hex","description":"Package retrygroup provides synchronization, Context cancelation for groups of retry goroutines working on subtasks of a common task.","archived":false,"fork":false,"pushed_at":"2017-02-20T14:21:51.000Z","size":3,"stargazers_count":17,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-31T01:41:54.505Z","etag":null,"topics":["context","go","golang","goroutine","retry","synchronization"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Code-Hex.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2017-02-19T12:48:01.000Z","updated_at":"2022-11-07T12:55:28.000Z","dependencies_parsed_at":"2023-05-13T09:00:41.955Z","dependency_job_id":null,"html_url":"https://github.com/Code-Hex/retrygroup","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Code-Hex%2Fretrygroup","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Code-Hex%2Fretrygroup/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Code-Hex%2Fretrygroup/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Code-Hex%2Fretrygroup/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Code-Hex","download_url":"https://codeload.github.com/Code-Hex/retrygroup/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252747811,"owners_count":21798204,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["context","go","golang","goroutine","retry","synchronization"],"created_at":"2024-10-03T13:39:26.320Z","updated_at":"2025-05-06T18:45:03.264Z","avatar_url":"https://github.com/Code-Hex.png","language":"Go","readme":"retrygroup\n----------\n[![GoDoc](https://godoc.org/github.com/Code-Hex/retrygroup?status.svg)](https://godoc.org/github.com/Code-Hex/retrygroup)  \nPackage retrygroup provides synchronization, Context cancelation for groups of retry goroutines working on subtasks of a common task.\n\n# Synopsis\n```go\npackage main\n\nimport (\n\t\"context\"\n\t\"errors\"\n\t\"fmt\"\n\t\"time\"\n\n\t\"github.com/Code-Hex/retrygroup\"\n)\n\nfunc main() {\n\tctx, cancel := context.WithCancel(context.Background())\n\tg, _ := retrygroup.WithContext(ctx)\n\tg.EnableBackoff()\n\n\tgo func() {\n\t\t\u003c-time.After(16 * time.Second)\n\t\tif cancel != nil {\n\t\t\tfmt.Println(\"Finish!!\")\n\t\t\tcancel()\n\t\t}\n\t}()\n\n\tg.RetryGo(3, func(i int) error {\n\t\tfmt.Printf(\"Hello: %d\\n\", i)\n\t\treturn errors.New(\"Try error\")\n\t})\n\n\tg.RetryGo(-1, func(i int) error {\n\t\tfmt.Println(\"Never!!\")\n\t\treturn errors.New(\"Try never error\")\n\t})\n\n\tg.Wait()\n}\n```\nSee [eg](https://github.com/Code-Hex/retrygroup/tree/master/eg)\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcode-hex%2Fretrygroup","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcode-hex%2Fretrygroup","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcode-hex%2Fretrygroup/lists"}