{"id":16683042,"url":"https://github.com/hlts2/gopubsub","last_synced_at":"2026-05-20T06:39:52.832Z","repository":{"id":57555386,"uuid":"139816150","full_name":"hlts2/gopubsub","owner":"hlts2","description":"Simple lock-free topick based publish/subscribe library written in golang","archived":false,"fork":false,"pushed_at":"2018-07-27T16:14:58.000Z","size":23,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-01-20T08:09:32.117Z","etag":null,"topics":["golang","golang-library","goroutine-safe","goroutines","hlts2","library","lock-free","pubsub","pubsub-instance","pubsub-messages","topic"],"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/hlts2.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-07-05T08:06:03.000Z","updated_at":"2018-09-15T11:02:24.000Z","dependencies_parsed_at":"2022-09-14T10:52:13.609Z","dependency_job_id":null,"html_url":"https://github.com/hlts2/gopubsub","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hlts2%2Fgopubsub","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hlts2%2Fgopubsub/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hlts2%2Fgopubsub/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hlts2%2Fgopubsub/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hlts2","download_url":"https://codeload.github.com/hlts2/gopubsub/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243401511,"owners_count":20285058,"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":["golang","golang-library","goroutine-safe","goroutines","hlts2","library","lock-free","pubsub","pubsub-instance","pubsub-messages","topic"],"created_at":"2024-10-12T14:10:09.179Z","updated_at":"2025-12-29T06:39:42.562Z","avatar_url":"https://github.com/hlts2.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# gpubsub\n\ngpubsub is a [topic-based](http://en.wikipedia.org/wiki/Publish–subscribe_pattern#Message_filtering) [publish/subscribe](http://en.wikipedia.org/wiki/Publish/subscribe) library written in golang.\n\n## Requirement\n\nGo (\u003e= 1.8)\n\n## Installation\n\n```shell\ngo get github.com/hlts2/gopubsub\n```\n\n## Example\n\nTo subscribe:\n\n```go\nps := gopubsub.NewPubSub()\n\nsubscriber := ps.Subscribe(\"t1\")\n```\n\nTo add subscribe:\n\n```go\nsubscriber := ps.Subscribe(\"t1\")\n\n// Adds subscriptions\nps.AddSubsrcibe(\"t2\", subscriber)\n```\n\nTo publish:\n\n```go\n// publish message to topic asyncronously\nps.Publish(\"t1\", \"Hello World!!\")\n\n// Because the message type is `interface{}`, you can publish anything\nps.Publish(\"t1\", func() {\n  fmt.Println(\"Hello World!!\")\n})\n```\n\nTo Cancel specific subscription:\n\n```go\nps.UnSubscribe(\"t1\")\n```\n\nTo fetch published message\n\n```go\nmessage := \u003c-subscriber.Read()\n```\n\n## Author\n[hlts2](https://github.com/hlts2)\n\n## LICENSE\ngopubsub released under MIT license, refer [LICENSE](https://github.com/hlts2/gopubsub/blob/master/LICENSE) file.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhlts2%2Fgopubsub","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhlts2%2Fgopubsub","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhlts2%2Fgopubsub/lists"}