1
0
mirror of https://github.com/eventials/goevents.git synced 2025-05-01 13:48:56 +08:00
Alexandre Vicenzi c801a363b3 Retry feature.
2017-05-26 09:49:38 -03:00

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()
}