{"id":41789967,"url":"https://github.com/localhots/bocadillo","last_synced_at":"2026-01-25T04:34:45.578Z","repository":{"id":57519797,"uuid":"142780729","full_name":"localhots/bocadillo","owner":"localhots","description":"MySQL binary log parser","archived":false,"fork":false,"pushed_at":"2024-06-19T09:43:45.000Z","size":196,"stargazers_count":4,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-07-20T00:19:41.088Z","etag":null,"topics":["binlog","mysql"],"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/localhots.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}},"created_at":"2018-07-29T17:22:57.000Z","updated_at":"2024-07-03T11:13:30.000Z","dependencies_parsed_at":"2022-09-05T09:41:21.031Z","dependency_job_id":null,"html_url":"https://github.com/localhots/bocadillo","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/localhots/bocadillo","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/localhots%2Fbocadillo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/localhots%2Fbocadillo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/localhots%2Fbocadillo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/localhots%2Fbocadillo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/localhots","download_url":"https://codeload.github.com/localhots/bocadillo/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/localhots%2Fbocadillo/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28743534,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-25T02:46:29.005Z","status":"ssl_error","status_checked_at":"2026-01-25T02:44:29.968Z","response_time":113,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["binlog","mysql"],"created_at":"2026-01-25T04:34:45.504Z","updated_at":"2026-01-25T04:34:45.571Z","avatar_url":"https://github.com/localhots.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Bocadillo\n\nBocadillo is a client for MySQL binary log. It is not a complete solution (yet).\n\n### Usage\n\nExample use:\n```go\n// import \"github.com/localhots/bocadillo/reader\"\n// import \"github.com/localhots/bocadillo/reader/driver\"\n\nreader, err := reader.New(\"root@(127.0.0.1:3306)/testdb\", driver.Config{\n\tServerID: 1000,               // Arbitrary unique ID\n\tFile:     \"mysql-bin.000035\", // Log file name\n\tOffset:   4,                  // Log file offset\n})\nif err != nil {\n\tlog.Fatalf(\"Failed to connect: %v\", err)\n}\n\nfor {\n\tevt, err := reader.ReadEvent()\n\tif err != nil {\n\t\tlog.Fatalf(\"Failed to read event: %v\", err)\n\t}\n\n\tlog.Println(\"Event received:\", evt.Header.Type.String())\n\tif evt.Table != nil {\n\t\trows, err := evt.DecodeRows()\n\t\tif err != nil {\n\t\t\tlog.Fatalf(\"Failed to parse rows event: %v\", err)\n\t\t}\n\t\tlog.Println(\"Table:\", evt.Table.TableName, \"Changes:\", rows.Rows)\n\t}\n}\n```\n\n### Caveats\n\nThis library is not a complete solution. It requires implementation that would\ninvolve everything from configuration to state management. Future releases\nmight include pre-made binaries for certain message queue adapters.\n\n### Future development \u0026 contributions\n\nThe package in its current state does the job for me. Bug reports are welcome\njust like feature contributions.\n\n### Go MySQL driver modifications\n\nModified copy of [go-sql-driver/mysql](https://github.com/go-sql-driver/mysql)\nis included with this project. It was changed in order to expose certain low\nlevel functions that allow to establish a connection manually and register as a\nreplica server and to remove automatic driver registration because it will\nlikely conflict with the original code when imported as a dependency.\n\n### Licence\n\nMozilla Public License Version 2.0\n\nThis project includes a modified copy of [go-sql-driver/mysql](https://github.com/go-sql-driver/mysql)\nwhich is licensed under MPL-2.0, hence it should be licensed under the same\nlincense (or a GPL one).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flocalhots%2Fbocadillo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flocalhots%2Fbocadillo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flocalhots%2Fbocadillo/lists"}