Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- data FailureReason
- newtype FailureStrategy = FailureStrategy {
- logFailure :: FailedMessage -> IO ()
- ignoreFailures :: FailureStrategy
- writeToCategory :: (FailureReason -> Bool) -> WithConnection -> Category -> FailureStrategy
- writeUnknownFailuresToCategory :: WithConnection -> Category -> FailureStrategy
- writeAllToCategory :: WithConnection -> Category -> FailureStrategy
Documentation
data FailureReason Source #
Reason why the message handle failed.
Instances
newtype FailureStrategy Source #
Strategy for logging failures.
FailureStrategy | |
|
Instances
Semigroup FailureStrategy Source # | |
Defined in MessageDb.Subscription.FailureStrategy (<>) :: FailureStrategy -> FailureStrategy -> FailureStrategy # sconcat :: NonEmpty FailureStrategy -> FailureStrategy # stimes :: Integral b => b -> FailureStrategy -> FailureStrategy # | |
Monoid FailureStrategy Source # | |
Defined in MessageDb.Subscription.FailureStrategy mappend :: FailureStrategy -> FailureStrategy -> FailureStrategy # mconcat :: [FailureStrategy] -> FailureStrategy # |
ignoreFailures :: FailureStrategy Source #
Do nothing, ignore all failures.
writeToCategory :: (FailureReason -> Bool) -> WithConnection -> Category -> FailureStrategy Source #
Write a failure to a category. Use shouldKeep
to filter out message failures you don't want to log.
writeUnknownFailuresToCategory :: WithConnection -> Category -> FailureStrategy Source #
Only write UnknownFailure
s to a category.
writeAllToCategory :: WithConnection -> Category -> FailureStrategy Source #
Write either UnknownFailure
s or HandleFailure
s to a category.