From 7080f5d1cf2c9f86d89a84424394b2c61e925843 Mon Sep 17 00:00:00 2001 From: Alexander Morozov Date: Tue, 14 Jul 2015 09:10:14 -0700 Subject: [PATCH] Add docstring to pubsub.Publisher Signed-off-by: Alexander Morozov --- pkg/pubsub/publisher.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pkg/pubsub/publisher.go b/pkg/pubsub/publisher.go index 534b74ad4..6f3d5924d 100644 --- a/pkg/pubsub/publisher.go +++ b/pkg/pubsub/publisher.go @@ -19,6 +19,8 @@ func NewPublisher(publishTimeout time.Duration, buffer int) *Publisher { 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 { m sync.RWMutex buffer int