Safe Haskell | None |
---|---|
Language | Haskell2010 |
pipes
Producer
s from downloading data from AWS S3 objects, with
retry-based failure handling.
- fromS3WithRetries :: forall m. MonadSafe m => RetryPolicy m -> Bucket -> Object -> Producer ByteString m ()
- data RetryPolicy m = RetryIf s (Bucket -> Object -> s -> SomeException -> m (s, Bool))
- retryNTimes :: Applicative m => Int -> RetryPolicy m
- retryIfException :: Applicative m => (SomeException -> Bool) -> RetryPolicy m
- warnOnRetry :: MonadIO m => RetryPolicy m -> RetryPolicy m
Documentation
fromS3WithRetries :: forall m. MonadSafe m => RetryPolicy m -> Bucket -> Object -> Producer ByteString m () Source #
Download an object from S3, retrying a finite number of times on failure.
Deciding when to retry
data RetryPolicy m Source #
How many times to attempt an object download before giving up.
RetryIf s (Bucket -> Object -> s -> SomeException -> m (s, Bool)) |
Applicative m => Monoid (RetryPolicy m) Source # |
|
retryNTimes :: Applicative m => Int -> RetryPolicy m Source #
Retry a download no more than n
times.
retryIfException :: Applicative m => (SomeException -> Bool) -> RetryPolicy m Source #
Retry if the exception thrown satisfies the given predicate.
Diagnostics
warnOnRetry :: MonadIO m => RetryPolicy m -> RetryPolicy m Source #
Modify a RetryPolicy
to print a warning on stderr when a retry is
attempted.