mirror of
https://github.com/eventials/goevents.git
synced 2025-05-01 13:48:56 +08:00
17 lines
347 B
Go
17 lines
347 B
Go
package messaging
|
|
|
|
import (
|
|
"time"
|
|
)
|
|
|
|
type EventHandler func(body []byte) error
|
|
|
|
type Consumer interface {
|
|
Subscribe(action string, handler EventHandler) error
|
|
SubscribeWithOptions(action string, handlerFn EventHandler,
|
|
retryDelay time.Duration, delayPow2 bool, maxRetries int32) error
|
|
Unsubscribe(action string) error
|
|
Consume()
|
|
Close()
|
|
}
|