Skip to content

A Go package implementing a topic-based publish-subscribe system using channels.

License

Notifications You must be signed in to change notification settings

sauerbraten/pubsub

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

pubsub

A Go package implementing a topic-based publish-subscribe system using channels.

Usage

Get the package:

$ go get github.com/sauerbraten/pubsub

Import the package:

import (
	"github.com/sauerbraten/pubsub"
)

Subscribers receive updates on channels provided to them when they subscribe to a topic. Topics are automatically created when you subscribe to them and they do not exist yet. In that case, a Publisher type is returned as well, providing methods to publish updates on the new topic. Topics are removed when a subscriber unsubscribes from it and there are no other subscribers left. Publishers include a stop channel from which reading only succeeds after the topic was removed.

Documentation

Full documentation at godoc.org.

Example

See example/main.go.

About

A Go package implementing a topic-based publish-subscribe system using channels.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages