{"id":37089138,"url":"https://github.com/dewadg/haro","last_synced_at":"2026-01-14T10:56:24.610Z","repository":{"id":41263267,"uuid":"272880666","full_name":"dewadg/haro","owner":"dewadg","description":"A Go pubsub helper","archived":false,"fork":false,"pushed_at":"2022-06-17T10:55:04.000Z","size":55,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-06-20T17:39:49.618Z","etag":null,"topics":["golang","pubsub"],"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/dewadg.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":"2020-06-17T04:51:05.000Z","updated_at":"2022-08-01T15:30:11.000Z","dependencies_parsed_at":"2022-09-10T06:20:34.812Z","dependency_job_id":null,"html_url":"https://github.com/dewadg/haro","commit_stats":null,"previous_names":[],"tags_count":10,"template":false,"template_full_name":null,"purl":"pkg:github/dewadg/haro","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dewadg%2Fharo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dewadg%2Fharo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dewadg%2Fharo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dewadg%2Fharo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dewadg","download_url":"https://codeload.github.com/dewadg/haro/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dewadg%2Fharo/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28417768,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-14T10:47:48.104Z","status":"ssl_error","status_checked_at":"2026-01-14T10:46:19.031Z","response_time":107,"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":["golang","pubsub"],"created_at":"2026-01-14T10:56:23.943Z","updated_at":"2026-01-14T10:56:24.605Z","avatar_url":"https://github.com/dewadg.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Haro\n\nTopic-based pubsub library.\n\n[![go report card](https://goreportcard.com/badge/github.com/dewadg/haro \"go report card\")](https://goreportcard.com/report/github.com/dewadg/haro)\n[![test](https://github.com/dewadg/haro/workflows/Tests/badge.svg?branch=master \"test\")](https://github.com/dewadg/haro/actions)\n[![Coverage Status](https://coveralls.io/repos/github/dewadg/haro/badge.svg?branch=master)](https://coveralls.io/github/dewadg/haro?branch=master)\n[![Go.Dev reference](https://img.shields.io/badge/go.dev-reference-blue?logo=go\u0026logoColor=white)](https://pkg.go.dev/github.com/dewadg/haro?tab=doc)\n\n## Usage\n\nInstall with:\n```\ngo get github.com/dewadg/haro\n```\n\n\n### Declaring topic\n```go\nintTopic := haro.DeclareTopic[int]()\n\nstringTopic := haro.DeclareTopic[string]()\n```\n\n### Registering subscribers\n```go\nintTopic.Subscribe(func(ctx context.Context, p int) error {\n    return nil\n})\n\nstringTopic.Subscribe(func(ctx context.Context, p string) error {\n    return nil\n})\n```\n\n### Publishing\n```go\nvar err error\n\nerr = intTopic.Publish(context.Background(), 5)\n\nerr = stringTopic.Publish(context.Background(), \"test\")\n```\n\n\n## Limitations\n\n- It's not a distributed pubsub mechanism, it means pubsub across different instances won't work (eg: across docker container replication)\n- No recovery since it doesn't utilize any external storage, it's purely using Channel to store the published messages \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdewadg%2Fharo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdewadg%2Fharo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdewadg%2Fharo/lists"}