fix golint issues in core/queue (#507)

This commit is contained in:
Kevin Wan
2021-02-22 16:38:42 +08:00
committed by GitHub
parent 6e4c98e52d
commit 497762ab47
6 changed files with 78 additions and 51 deletions

View File

@@ -1,15 +1,18 @@
package queue
type (
// A Producer interface represents a producer that produces messages.
Producer interface {
AddListener(listener ProduceListener)
Produce() (string, bool)
}
// A ProduceListener interface represents a produce listener.
ProduceListener interface {
OnProducerPause()
OnProducerResume()
}
// ProducerFactory defines the method to generate a Producer.
ProducerFactory func() (Producer, error)
)