add queue package

This commit is contained in:
kevin
2020-08-13 17:00:53 +08:00
parent 5f084fb7d2
commit 6fdee77fa9
11 changed files with 610 additions and 0 deletions

15
core/queue/producer.go Normal file
View File

@@ -0,0 +1,15 @@
package queue
type (
Producer interface {
AddListener(listener ProduceListener)
Produce() (string, bool)
}
ProduceListener interface {
OnProducerPause()
OnProducerResume()
}
ProducerFactory func() (Producer, error)
)