mirror of
https://github.com/hanzo-fi/stack.git
synced 2026-10-30 20:34:43 +00:00
18 lines
286 B
Go
18 lines
286 B
Go
package backoff
|
|
|
|
import (
|
|
"time"
|
|
|
|
webhooks "github.com/formancehq/webhooks/pkg"
|
|
)
|
|
|
|
func NewNoRetry() webhooks.BackoffPolicy {
|
|
return new(NoRetry)
|
|
}
|
|
|
|
type NoRetry struct{}
|
|
|
|
func (n *NoRetry) GetRetryDelay(attemptNumber int) (time.Duration, error) {
|
|
return 0, ErrMaxAttemptsReached
|
|
}
|