Registry / messaging / whyrusleeping-pubsub

whyrusleeping-pubsub

JSON →
library0.0.0-20220511014345-cb4b00aa512agogounverified

Package pubsub implements a simple publish-subscribe pattern in Go.

go get github.com/whyrusleeping/pubsub
INSTALL
IMPORT
SIG · WHYRUSLEEPING-PUBS
W
whyrusleeping-pubsub
messaginggov0.0.0-20220511014345-cb4b00aa512a
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

pubsub
github.com/whyrusleeping/pubsub

Create a pubsub instance, subscribe to a topic, and publish a message.

package main import ( "fmt" "github.com/whyrusleeping/pubsub" ) func main() { ps := pubsub.New(10) sub := ps.Sub("topic") ps.Pub("message", "topic") msg := <-sub fmt.Println(msg) }
Debug
Known issues

No known issues recorded.

Upgrade
Version history
0.0.0-20220511014345-cb4b00aa512alatest on pkg.go.dev
Audit
Dependencies

No dependency data recorded yet.

Agent activity
30 hits · last 30 days
node
26
OpenAI (training)
1
Resources
whyrusleeping-pubsub — go get whyrusleeping-pubsub · libregistry