Safe Haskell | None |
---|---|
Language | Haskell2010 |
pipes
Producer
s from downloading data from AWS S3 objects, with
retry-based failure handling.
Synopsis
- 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)) |
Instances
Applicative m => Semigroup (RetryPolicy m) Source # | |
Defined in Pipes.Aws.S3.Download.Retry (<>) :: RetryPolicy m -> RetryPolicy m -> RetryPolicy m # sconcat :: NonEmpty (RetryPolicy m) -> RetryPolicy m # stimes :: Integral b => b -> RetryPolicy m -> RetryPolicy m # | |
Applicative m => Monoid (RetryPolicy m) Source # |
|
Defined in Pipes.Aws.S3.Download.Retry mempty :: RetryPolicy m # mappend :: RetryPolicy m -> RetryPolicy m -> RetryPolicy m # mconcat :: [RetryPolicy m] -> RetryPolicy m # |
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.