Skip to content

A very basic broadcast / subscription library for handling one-to-many queueing in Golang.

Notifications You must be signed in to change notification settings

craig-cogdill/go-broadcast

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

go-broadcast

Example usage

// main.go
b := broadcast.New()

go func() {
   subscription := b.Subscribe()
   msg := <-subscription.Queue()
   log.Print(msg.(string)) // "Hello World"
}()

b.Broadcast("Hello World")

Running tests

make test

Code coverage

make coverage

Interactive hotspot coverage report:

make coverage-html

About

A very basic broadcast / subscription library for handling one-to-many queueing in Golang.

Resources

Stars

Watchers

Forks

Packages

No packages published