{"id":19773935,"url":"https://github.com/badoo/file-streamer","last_synced_at":"2026-06-14T05:31:44.342Z","repository":{"id":66759191,"uuid":"110575143","full_name":"badoo/file-streamer","owner":"badoo","description":"Streams given file data into any buffered writer. Uses fsnotify system for new data detection in files.","archived":false,"fork":false,"pushed_at":"2017-11-15T13:48:49.000Z","size":19,"stargazers_count":2,"open_issues_count":0,"forks_count":2,"subscribers_count":7,"default_branch":"master","last_synced_at":"2025-08-14T21:12:48.332Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/badoo.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":"2017-11-13T16:50:51.000Z","updated_at":"2019-07-26T07:21:33.000Z","dependencies_parsed_at":"2023-03-21T16:03:43.708Z","dependency_job_id":null,"html_url":"https://github.com/badoo/file-streamer","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/badoo/file-streamer","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/badoo%2Ffile-streamer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/badoo%2Ffile-streamer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/badoo%2Ffile-streamer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/badoo%2Ffile-streamer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/badoo","download_url":"https://codeload.github.com/badoo/file-streamer/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/badoo%2Ffile-streamer/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34310801,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-14T02:00:07.365Z","response_time":62,"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":[],"created_at":"2024-11-12T05:11:33.294Z","updated_at":"2026-06-14T05:31:44.327Z","avatar_url":"https://github.com/badoo.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# FileStreamer\nStreams given file data into any buffered writer. Uses fsNotify for new data detection in files.\n\nThe most fresh documentation can be found on [GoDoc](https://godoc.org/github.com/badoo/file-streamer)\n\n# Concepts\n\nThe library consists of 2 main instances:\n\nListener:\n```\nlistener, err := file_streamer.NewListener(\u003cfile to watch\u003e, \u003cbuffer to write data to\u003e)\n```\n\nStreamer:\n```\nstreamer := file_streamer.New(\u003clogger\u003e)\nerr := streamer.Start()\n```\n\nStreamer is a heart of package. In most cases you don't need to create more than one Streamer in your application.\n\nListener represents a Streamer 'subscription' for data streaming,\nit binds file to be streamed and buffered writer to be used as a file data receiver.\n\n### Examples\n\nThe minimal working example (and most trivial I can imagine) is:\n\n```\npackage main\n\nimport (\n\t\"bufio\"\n\t\"github.com/badoo/file-streamer\"\n\t\"io/ioutil\"\n\t\"log\"\n\t\"os\"\n)\n\nfunc main() {\n\tnullLogger := log.New(ioutil.Discard, \"\", 0)\n\n\tstreamer := file_streamer.New(nullLogger)\n\terr := streamer.Start()\n\tif err != nil {\n\t\tlog.Fatalln(err)\n\t}\n\n\ttargetFile := os.Args[1]\n\treadFrom, err := os.Open(targetFile)\n\tif err != nil {\n\t\tlog.Fatalln(err)\n\t}\n\n\tlogTo := bufio.NewWriter(os.Stdout)\n\n\tlistener := file_streamer.NewListener(readFrom, logTo)\n\tstreamer.StreamTo(listener, 0)\n}\n```\n\nIt provides similar functionality to GNU `tail -f` command, but with streaming \nstart from the beginning of the file.\n\nYou can find more examples in 'examples/' directory of the package.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbadoo%2Ffile-streamer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbadoo%2Ffile-streamer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbadoo%2Ffile-streamer/lists"}