mirror of
https://github.com/zeromicro/go-zero.git
synced 2025-01-24 01:30:25 +08:00
16 lines
233 B
Go
16 lines
233 B
Go
package queue
|
|
|
|
type (
|
|
Producer interface {
|
|
AddListener(listener ProduceListener)
|
|
Produce() (string, bool)
|
|
}
|
|
|
|
ProduceListener interface {
|
|
OnProducerPause()
|
|
OnProducerResume()
|
|
}
|
|
|
|
ProducerFactory func() (Producer, error)
|
|
)
|