go-zero/core/queue/producer.go

16 lines
233 B
Go
Raw Normal View History

2020-08-13 17:00:53 +08:00
package queue
type (
Producer interface {
AddListener(listener ProduceListener)
Produce() (string, bool)
}
ProduceListener interface {
OnProducerPause()
OnProducerResume()
}
ProducerFactory func() (Producer, error)
)