浏览代码

Add docstring to pubsub.Publisher

Signed-off-by: Alexander Morozov <lk4d4@docker.com>
Alexander Morozov 10 年之前
父节点
当前提交
7080f5d1cf
共有 1 个文件被更改,包括 2 次插入0 次删除
  1. 2 0
      pkg/pubsub/publisher.go

+ 2 - 0
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