Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mauricioabreu/pubsub
Publish/Subscribe implementation written in go
https://github.com/mauricioabreu/pubsub
go pubsub
Last synced: 21 days ago
JSON representation
Publish/Subscribe implementation written in go
- Host: GitHub
- URL: https://github.com/mauricioabreu/pubsub
- Owner: mauricioabreu
- Created: 2019-07-15T01:09:35.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2019-07-15T03:56:29.000Z (over 5 years ago)
- Last Synced: 2024-04-17T22:17:49.453Z (7 months ago)
- Topics: go, pubsub
- Language: Go
- Size: 1.95 KB
- Stars: 7
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# pubsub
Publish/Subscribe implementation written in go.
## Example
```go
func main() {
server := NewPubSub()
sub := server.Subscribe("news")
server.Publish("what is up?", "news")
fmt.Println(<-sub) // what is up
server.AddSubscription(sub, "tech")
server.Publish("tired of side projects? call me!", "tech")
fmt.Println(<-sub) // tired of side projects? call me!
}
```