consumer.go 289 B

123456789101112
  1. package queue
  2. type (
  3. // A Consumer interface represents a consumer that can consume string messages.
  4. Consumer interface {
  5. Consume(string) error
  6. OnEvent(event interface{})
  7. }
  8. // ConsumerFactory defines the factory to generate consumers.
  9. ConsumerFactory func() (Consumer, error)
  10. )