go-zero/core/queue/producer.go
2020-08-13 17:00:53 +08:00

16 lines
233 B
Go

package queue
type (
Producer interface {
AddListener(listener ProduceListener)
Produce() (string, bool)
}
ProduceListener interface {
OnProducerPause()
OnProducerResume()
}
ProducerFactory func() (Producer, error)
)