Documentation ¶
Index ¶
Constants ¶
View Source
const ( MaxInt32 = 1<<31 - 1 MaxRetries = MaxInt32 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Connection ¶
type Consumer ¶
type Consumer interface { Subscribe(action string, handler EventHandler, options *SubscribeOptions) error Unsubscribe(action string) error BindActions(actions ...string) error UnbindActions(actions ...string) error Consume() Close() }
type Event ¶
type Event struct { Id string Action string Timestamp time.Time Body []byte Ack func(multiple bool) error Nack func(multiple, requeue bool) error Reject func(requeue bool) error Manual func() // contains filtered or unexported fields }
type EventHandler ¶
type SubscribeOptions ¶
type SubscribeOptions struct { // The time to retry after it fails. RetryDelay time.Duration // If enable the retry time it will be incresed in power of two. // This means if your retry delay is 1s, the first retry will be after 1s, // the sencond 2s, the third 4s and so on. DelayedRetry bool // Max attempts to retry. MaxRetries int32 }
Click to show internal directories.
Click to hide internal directories.