{"id":16352231,"url":"https://github.com/bugthesystem/socket.io-go-emitter","last_synced_at":"2025-08-03T01:15:35.545Z","repository":{"id":24582722,"uuid":"27990655","full_name":"bugthesystem/socket.io-go-emitter","owner":"bugthesystem","description":"Go implementation of socket.io-emitter","archived":false,"fork":false,"pushed_at":"2019-03-18T10:40:07.000Z","size":14,"stargazers_count":24,"open_issues_count":1,"forks_count":2,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-18T16:13:34.753Z","etag":null,"topics":[],"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/bugthesystem.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":"2014-12-14T10:19:04.000Z","updated_at":"2021-11-24T08:24:56.000Z","dependencies_parsed_at":"2022-08-23T02:21:38.642Z","dependency_job_id":null,"html_url":"https://github.com/bugthesystem/socket.io-go-emitter","commit_stats":null,"previous_names":["bugthesystem/socket.io-go-emitter","ziyasal/socket.io-go-emitter"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bugthesystem%2Fsocket.io-go-emitter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bugthesystem%2Fsocket.io-go-emitter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bugthesystem%2Fsocket.io-go-emitter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bugthesystem%2Fsocket.io-go-emitter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bugthesystem","download_url":"https://codeload.github.com/bugthesystem/socket.io-go-emitter/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245043843,"owners_count":20551840,"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":[],"created_at":"2024-10-11T01:25:26.117Z","updated_at":"2025-03-23T01:30:51.775Z","avatar_url":"https://github.com/bugthesystem.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"socket.io-go-emitter\n========================\n\nA [Go](https://golang.org/) implementation of socket.io-emitter\n\n[socket.io](http://socket.io/) provides a hook point to easily allow you to emit events to browsers from anywhere so `socket.io-go-emitter` communicates with [socket.io](http://socket.io/) servers through redis.\n\n[![GoDoc](https://godoc.org/github.com/ziyasal/socket.io-go-emitter/emitter?status.svg)](https://godoc.org/github.com/ziyasal/socket.io-go-emitter/emitter)\n\n## How to use\n\n**Install**\n\n```go\ngo get github.com/ziyasal/socket.io-go-emitter/emitter\n```\n\n## API\n\n### Emitter(opts)\n\nThe following options are allowed:\n- `Key`: the name of the key to pub/sub events on as prefix (`socket.io`)\n- `Host`: host to connect to redis on (`localhost:6379`)\n\n**Important** Make sure to supply the`Host` options.\n\nSpecifies a specific `room` that you want to emit to.\n\n**Initialize emitter**\n```go\nimport \"github.com/ziyasal/socket.io-go-emitter/emitter\"\n\n//....\n\nopts := emitter.EmitterOptions{\n\t\tHost: \"127.0.0.1:6379\",\n\t\tKey   :\"socket.io\",\n\t}\nsio := emitter.New(opts)\n```\n\n###Emitter#Emit(channel,message):Emitter\n```go\n  sio.Emit(\"broadcast event\", \"Hello from socket.io-go-emitter\")\n```\n\n\n### Emitter#In(room):Emitter\n```go\n  sio.In(\"test\").Emit(\"broadcast event\", \"Hello from socket.io-go-emitter\")\n```\n### Emitter#To(room):Emitter\n```go\n sio.To(\"test\").Emit(\"broadcast event\", \"Hello from socket.io-go-emitter\")\n```\n\n### Emitter#Of(namespace):Emitter\nSpecifies a specific namespace that you want to emit to.\n```go\n sio.Of(\"/nsp\").Emit(\"broadcast event\", \"Hello from socket.io-go-emitter\")\n```\n\n## Bugs\nIf you encounter a bug, performance issue, or malfunction, please add an [Issue](https://github.com/ziyasal/socket.io-go-emitter/issues) with steps on how to reproduce the problem.\n\n## TODO\n- Add more tests\n- Add samples\n\n### Open Source Projects in Use\n* [redigo](https://github.com/garyburd/redigo) by Gary Burd @garyburd\n* [msgpack](https://github.com/vmihailenco/msgpack) by Vladimir Mihailenco @vmihailenco\n\n## License\nCode and documentation are available according to the *MIT* License (see [LICENSE](https://github.com/ziyasal/socket.io-go-emitter/blob/master/LICENSE)).\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbugthesystem%2Fsocket.io-go-emitter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbugthesystem%2Fsocket.io-go-emitter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbugthesystem%2Fsocket.io-go-emitter/lists"}