{"id":19397165,"url":"https://github.com/illarion/bufpipe","last_synced_at":"2025-10-14T13:32:27.300Z","repository":{"id":61625405,"uuid":"540604564","full_name":"illarion/bufpipe","owner":"illarion","description":"Buffered io.Pipe","archived":false,"fork":false,"pushed_at":"2024-10-04T12:57:05.000Z","size":11,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-02-24T22:11:19.112Z","etag":null,"topics":["buffered-reader","buffered-writer","buffering","fanout","go","golang","io","pipe","reader"],"latest_commit_sha":null,"homepage":"","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/illarion.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-09-23T20:20:04.000Z","updated_at":"2024-11-30T12:19:09.000Z","dependencies_parsed_at":"2024-11-10T10:39:51.596Z","dependency_job_id":"39a82a0a-bba2-43d5-88b9-71ff36fcf9e5","html_url":"https://github.com/illarion/bufpipe","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/illarion/bufpipe","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/illarion%2Fbufpipe","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/illarion%2Fbufpipe/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/illarion%2Fbufpipe/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/illarion%2Fbufpipe/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/illarion","download_url":"https://codeload.github.com/illarion/bufpipe/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/illarion%2Fbufpipe/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279018715,"owners_count":26086609,"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","status":"online","status_checked_at":"2025-10-14T02:00:06.444Z","response_time":60,"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":["buffered-reader","buffered-writer","buffering","fanout","go","golang","io","pipe","reader"],"created_at":"2024-11-10T10:39:41.087Z","updated_at":"2025-10-14T13:32:27.265Z","avatar_url":"https://github.com/illarion.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# bufpipe\nSimple golang implementation of the buffered io.Pipe replacement\n\n## Usage\n```go\npackage main\n\nimport (\n    \"fmt\"\n    \"io\"\n    \"os\"\n    \"time\"\n\n    \"github.com/illarion/bufpipe/v3\"\n)\n\nfunc main() {\n    // Create a new buffered pipe\n    reader, writer := bufpipe.Pipe(bufpipe.Options{\n        MaxSize: 1024,\n        BlockWritesUntilFirstReadTimeout: time.Second * 5,\n\t\tBlockWritesOnFullBufferTimeout: time.Second * 5,\n    })\n\n    // Start a goroutine that writes to the pipe\n    go func() {\n        defer writer.Close()\n        for i := 0; i \u003c 10; i++ {\n            fmt.Fprintf(writer, \"Hello, world! %d\\n\", i)\n            time.Sleep(time.Second)\n        }\n    }()\n\n    // Read from the pipe\n    io.Copy(os.Stdout, reader)\n}\n```\n\n## Options\n\n- `MaxSize` - the maximum size of the buffer in bytes. Default is 0 - no limit.\n- `BlockWritesUntilFirstReadTimeout` - if set, the writer will block until the first read from the reader or the timeout is reached. Default is 0 - no blocking, write immediately.\n- `BlockWritesOnFullBufferTimeout` - if set, the writer will block until the buffer is not full or the timeout is reached. Default is 0 - immediately return `ErrBufferFull` if the buffer is full.\n\n## Errors\n`ErrBufferFull` - returned when reader is slower than writer and there is no place to write\n`ErrClosedPipe` - returned if either reader or writer side is closed.\n`ErrFirstReadTimeout` - returned if the `BlockWritesUntilFirstReadTimeout` is reached.\n\n\n## License\n\nSee the [LICENSE](LICENSE) file for license rights and limitations (MIT).\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fillarion%2Fbufpipe","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fillarion%2Fbufpipe","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fillarion%2Fbufpipe/lists"}