pipes-s3-0.3.0.3: A simple interface for streaming data to and from Amazon S3

Safe HaskellNone
LanguageHaskell2010

Pipes.Aws.S3.Download.Retry

Contents

Description

pipes Producers from downloading data from AWS S3 objects, with retry-based failure handling.

Synopsis

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.

Constructors

RetryIf s (Bucket -> Object -> s -> SomeException -> m (s, Bool)) 

Instances

Applicative m => Monoid (RetryPolicy m) Source #

mempty will always retry. mappend will retry only if both RetryPolicys say to retry.

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.