IsNoRetryError returns true if err conforms to the NoRetry interface and calling the NoRetry method returns true.
(err error)
| 179 | // IsNoRetryError returns true if err conforms to the NoRetry |
| 180 | // interface and calling the NoRetry method returns true. |
| 181 | func IsNoRetryError(err error) (isNoRetry bool) { |
| 182 | liberrors.Walk(err, func(err error) bool { |
| 183 | if r, ok := err.(NoRetrier); ok { |
| 184 | isNoRetry = r.NoRetry() |
| 185 | return true |
| 186 | } |
| 187 | return false |
| 188 | }) |
| 189 | return |
| 190 | } |
| 191 | |
| 192 | // NoLowLevelRetrier is an optional interface for error as to whether |
| 193 | // the operation should not be retried at a low level. |
searching dependent graphs…