Add docstring to pubsub.Publisher

Signed-off-by: Alexander Morozov <lk4d4@docker.com>
This commit is contained in:
Alexander Morozov 2015-07-14 09:10:14 -07:00
parent 5d7acae1cb
commit 879a1a6842

View file

@ -19,6 +19,8 @@ func NewPublisher(publishTimeout time.Duration, buffer int) *Publisher {
type subscriber chan interface{} type subscriber chan interface{}
// Publisher is basic pub/sub structure. Allows to send events and subscribe
// to them. Can be safely used from multiple goroutines.
type Publisher struct { type Publisher struct {
m sync.RWMutex m sync.RWMutex
buffer int buffer int