Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

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

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!
}
```