Skip to content

phcostabh/go-pubsub

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

go-pubsub

PubSub model message hub

Usage

To subscribe:

    ps := pubsub.New()
    ps.Sub(func(i interface{} {
        fmt.Println("int subscriber: ", i.(int))
    })

To publish:

    ps.Pub(1)

Messages are passed to subscriber which have same type argument.

License

MIT: http://mattn.mit-license.org/2013

Author

Yasuhiro Matsumoto (mattn.jp@gmail.com)

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Go 100.0%