{"id":16781306,"url":"https://github.com/romantomjak/pipeline","last_synced_at":"2025-09-07T00:35:56.883Z","repository":{"id":57491478,"uuid":"159565921","full_name":"romantomjak/pipeline","owner":"romantomjak","description":"Pipes and Filters Pattern implemented in Go","archived":false,"fork":false,"pushed_at":"2019-04-17T20:17:23.000Z","size":20,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-01-23T07:10:00.194Z","etag":null,"topics":["pipeline","pipeline-framework","pipeline-processor","pipes-and-filters"],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/romantomjak.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}},"created_at":"2018-11-28T21:15:38.000Z","updated_at":"2019-04-17T20:17:24.000Z","dependencies_parsed_at":"2022-08-29T20:32:05.294Z","dependency_job_id":null,"html_url":"https://github.com/romantomjak/pipeline","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/romantomjak%2Fpipeline","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/romantomjak%2Fpipeline/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/romantomjak%2Fpipeline/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/romantomjak%2Fpipeline/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/romantomjak","download_url":"https://codeload.github.com/romantomjak/pipeline/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243926325,"owners_count":20369962,"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":["pipeline","pipeline-framework","pipeline-processor","pipes-and-filters"],"created_at":"2024-10-13T07:42:40.072Z","updated_at":"2025-03-16T20:24:54.768Z","avatar_url":"https://github.com/romantomjak.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# pipeline\n\nPipes and Filters Pattern implemented in Go. Heavily inspired by https://blog.golang.org/pipelines\n\n---\n\nPipeline is a series of steps (_filters_) connected by channels (_pipes_), where each step is a goroutine.\n\nEach filter exposes a very simple interface: it receives messages on the inbound pipe, processes the message, and publishes the results to the outbound pipe. The pipe connects one filter to the next, sending output messages from one filter to the next.\n\n## Example\n\nTo get you started, here's a filter that will reverse incoming message:\n\n```go\npackage main\n\nimport (\n\t\"fmt\"\n\n\t\"github.com/romantomjak/pipeline\"\n)\n\ntype ReverseFilter struct{}\n\nfunc (rf ReverseFilter) reverse(b []byte) []byte {\n\tr := make([]byte, len(b))\n\tcopy(r, b)\n\tfor i, j := 0, len(r)-1; i \u003c len(r)/2; i, j = i+1, j-1 {\n\t\tr[i], r[j] = r[j], r[i]\n\t}\n\treturn r\n}\n\nfunc (rf ReverseFilter) Process(in chan []byte) chan []byte {\n\tout := make(chan []byte)\n\tgo func() {\n\t\tfor m := range in {\n\t\t\tout \u003c- rf.reverse(m)\n\t\t}\n\t\tclose(out)\n\t}()\n\treturn out\n}\n\nfunc main() {\n\trf := ReverseFilter{}\n\n\tp := pipeline.NewPipeline()\n\tp.Add(rf)\n\n\tout := p.Process([]byte(\"Hello World\"))\n\tfmt.Printf(\"Pipeline result: %s\\n\", out)\n}\n```\n\nOutput:\n\n```sh\nPipeline result: dlroW olleH\n```\n\n## License\n\nMozilla Public License 2.0\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fromantomjak%2Fpipeline","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fromantomjak%2Fpipeline","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fromantomjak%2Fpipeline/lists"}