producer.go 233 B

123456789101112131415
  1. package queue
  2. type (
  3. Producer interface {
  4. AddListener(listener ProduceListener)
  5. Produce() (string, bool)
  6. }
  7. ProduceListener interface {
  8. OnProducerPause()
  9. OnProducerResume()
  10. }
  11. ProducerFactory func() (Producer, error)
  12. )