{"id":21762149,"url":"https://github.com/daniilty/pipeline","last_synced_at":"2025-03-21T04:41:50.490Z","repository":{"id":211957576,"uuid":"730366195","full_name":"daniilty/pipeline","owner":"daniilty","description":"Go async pipeline library","archived":false,"fork":false,"pushed_at":"2023-12-11T19:21:14.000Z","size":2,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-01-26T01:20:29.001Z","etag":null,"topics":["async","go","golang","pipeline"],"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/daniilty.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}},"created_at":"2023-12-11T19:09:19.000Z","updated_at":"2023-12-11T19:41:49.000Z","dependencies_parsed_at":"2023-12-11T20:27:07.439Z","dependency_job_id":"8c40c23b-98ed-4da1-a378-dbff55f5cec8","html_url":"https://github.com/daniilty/pipeline","commit_stats":null,"previous_names":["daniilty/pipeline"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/daniilty%2Fpipeline","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/daniilty%2Fpipeline/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/daniilty%2Fpipeline/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/daniilty%2Fpipeline/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/daniilty","download_url":"https://codeload.github.com/daniilty/pipeline/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244739944,"owners_count":20501990,"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":["async","go","golang","pipeline"],"created_at":"2024-11-26T12:11:11.348Z","updated_at":"2025-03-21T04:41:50.472Z","avatar_url":"https://github.com/daniilty.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"## Pipelines\n\n### Goal\n\nThis package provides you with a simple way to process business pipelines in async way.\nThe idea is you don't have to wait for some function to finish, instead you wait for data this function provides, everything else can be async.\n\n### Installation\n\n```bash\n$ go get github.com/daniilty/pipeline@latest\n```\n\n### Usage \n\n```go\n// set timeout to 1 second(after timeout all waiting runners will get timeout error)\n// set to 0 to disable\npipe := pipeline.NewPipeline(1 * time.Second)\npipe.Execute(context.Background(),\n    func(_ context.Context, provider pipeline.Provider) {\n\t\tprovider.ProvideData(\"d1\", \"somedata\", nil)\n\t},\n    func(_ context.Context, provider pipeline.Provider) {\n\t\twd1, ok := provider.WaitData(\"d1\")\n\t\tif !ok {\n\t\t\tlog.Fatal(\"did not get d1\")\n\t\t}\n\n\t\tif wd1.Err() != nil {\n\t\t\tlog.Fatal(\"d1 fail\")\n\t\t}\n\n\t\tprovider.ProvideData(\"d2\", nil, errors.New(\"shit happened\"))\n\t},\n    func(_ context.Context, provider pipeline.Provider) {\n\t\twd2, ok := provider.WaitData(\"d2\")\n\t\tif !ok {\n\t\t\tlog.Fatal(\"did not get d2\")\n\t\t}\n\n\t\tif wd2.Err() != nil {\n\t\t\tlog.Fatalf(\"d2 fail: %s\", wd.Err().Error())\n\t\t}\n\t},\n)\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdaniilty%2Fpipeline","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdaniilty%2Fpipeline","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdaniilty%2Fpipeline/lists"}