{"id":36532585,"url":"https://github.com/duzy/worker","last_synced_at":"2026-01-12T03:02:48.114Z","repository":{"id":57504064,"uuid":"54372084","full_name":"duzy/worker","owner":"duzy","description":"Easier Go Concurrency Framework","archived":false,"fork":false,"pushed_at":"2020-06-09T07:36:50.000Z","size":13,"stargazers_count":4,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-06-20T17:35:25.755Z","etag":null,"topics":["concurrency-framework","golang"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/duzy.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null},"funding":{"github":"duzy","patreon":null,"open_collective":null,"ko_fi":null,"tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"custom":"https://paypal.me/duzychan"}},"created_at":"2016-03-21T08:33:08.000Z","updated_at":"2024-06-02T14:22:27.000Z","dependencies_parsed_at":"2022-08-28T02:01:13.237Z","dependency_job_id":null,"html_url":"https://github.com/duzy/worker","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/duzy/worker","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/duzy%2Fworker","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/duzy%2Fworker/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/duzy%2Fworker/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/duzy%2Fworker/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/duzy","download_url":"https://codeload.github.com/duzy/worker/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/duzy%2Fworker/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28332847,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-12T00:36:25.062Z","status":"online","status_checked_at":"2026-01-12T02:00:08.677Z","response_time":98,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["concurrency-framework","golang"],"created_at":"2026-01-12T03:02:47.456Z","updated_at":"2026-01-12T03:02:48.100Z","avatar_url":"https://github.com/duzy.png","language":"Go","funding_links":["https://github.com/sponsors/duzy","https://paypal.me/duzychan"],"categories":[],"sub_categories":[],"readme":"# worker\n\nPackage worker implements an easy to use concurrency framework for\nmultiple-job Go program.\n\n[![GoDoc](https://godoc.org/github.com/duzy/worker?status.svg)](http://godoc.org/github.com/duzy/worker)\n\nHere is a quick example demonstrating the usage.\n\n```go\npackage example\n\nimport \"github.com/duzy/worker\"\n\ntype StepOne struct {\n        Param string\n}\nfunc (job *StepOne) Go() worker.Result {\n        // do job for step one\n        return \u0026StepTwo{}\n}\n\ntype StepTwo struct {\n}\nfunc (job *StepTwo) Go() worker.Result {\n        // do job for step two\n        return \u0026StepThree{}\n}\n\ntype StepThree struct {\n}\nfunc (job *StepThree) Go() worker.Result {\n        // do job for step three\n        return nil\n}\n\nconst NumberOfConcurrency = 10\n\nfunc main() {\n        w := worker.SpawnN(NumberOfConcurrency)\n        w.Do(\u0026StepOne{ \"anything goes\" })\n        w.Do(\u0026StepOne{ \"anything goes\" })\n        w.Do(\u0026StepOne{ \"anything goes\" })\n        w.Do(\u0026StepOne{ \"anything goes\" })\n        w.Kill()\n\n        w = worker.SpawnN(3)\n        sentry := w.Sentry()\n        sentry.Guard(\u0026StepOne{ \"anything goes\" })\n        sentry.Guard(\u0026StepOne{ \"anything goes\" })\n        sentry.Guard(\u0026StepOne{ \"anything goes\" })\n        for result, _ := range sentry.Wait() {\n            // ...\n        }\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fduzy%2Fworker","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fduzy%2Fworker","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fduzy%2Fworker/lists"}