Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrNonPositiveNumberOfRetries = errors.New("number of retries should be positive") ErrNonPositiveTimeToFirstRetry = errors.New("time to first retry should be positive") )
Functions ¶
This section is empty.
Types ¶
type ErrCouldNotPublish ¶
type ErrCouldNotPublish struct {
// contains filtered or unexported fields
}
func NewErrCouldNotPublish ¶
func NewErrCouldNotPublish() *ErrCouldNotPublish
func (ErrCouldNotPublish) Error ¶
func (e ErrCouldNotPublish) Error() string
func (ErrCouldNotPublish) Len ¶
func (e ErrCouldNotPublish) Len() int
func (ErrCouldNotPublish) Reasons ¶
func (e ErrCouldNotPublish) Reasons() map[string]error
type RetryPublisher ¶
type RetryPublisher struct {
// contains filtered or unexported fields
}
RetryPublisher is a decorator for a publisher that retries message publishing after a failure.
func NewRetryPublisher ¶
func NewRetryPublisher(pub message.Publisher, config RetryPublisherConfig) (*RetryPublisher, error)
func (RetryPublisher) Close ¶
func (p RetryPublisher) Close() error
type RetryPublisherConfig ¶
type RetryPublisherConfig struct { MaxRetries int // each subsequent retry doubles the time to next retry. TimeToFirstRetry time.Duration Logger watermill.LoggerAdapter }
Click to show internal directories.
Click to hide internal directories.