Registry / messaging / dustin-go-broadcast

dustin-go-broadcast

JSON →
library0.0.0-20211018055107-71439988bd91gogounverified

Provides a pubsub mechanism for broadcasting messages to multiple channels.

go get github.com/dustin/go-broadcast
INSTALL
IMPORT
SIG · DUSTIN-GO-BROADCAS
D
dustin-go-broadcast
messaginggov0.0.0-20211018055107-71439988bd91
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.

broadcast
github.com/dustin/go-broadcast

Creates a broadcaster, registers a channel, submits a message, and receives it.

package main import ( "fmt" "github.com/dustin/go-broadcast" ) func main() { b := broadcast.NewBroadcaster(10) ch := make(chan interface{}) b.Register(ch) b.Submit("hello") msg := <-ch fmt.Println(msg) b.Unregister(ch) b.Close() }
Debug
Known issues

No known issues recorded.

Upgrade
Version history
0.0.0-20211018055107-71439988bd91latest on pkg.go.dev
Audit
Dependencies

No dependency data recorded yet.

Agent activity
22 hits · last 30 days
node
20
Amazon
1
OpenAI (training)
1
Resources
dustin-go-broadcast — go get dustin-go-broadcast · libregistry