franz-0.5.3: Append-only database
Safe HaskellNone
LanguageHaskell2010

Database.Franz.Client.Reconnect

Synopsis

Documentation

withPool Source #

Arguments

:: RetryPolicyM IO 
-> (String -> IO ())

diagnostic output

-> FranzPath 
-> (Pool -> IO a) 
-> IO a 

withReconnection :: Pool -> (Connection -> IO a) -> IO a Source #

Run an action which takes a Connection, reconnecting whenever it throws an exception.

atomicallyReconnecting Source #

Arguments

:: Int

timeout in microseconds

-> STM a 
-> IO a 

Run an STM action, throwing Reconnect when it exceeds the given timeout.

fetchWithPool :: Pool -> Query -> (STM Response -> IO r) -> IO r Source #

A wrapper of fetch which calls withReconnection internally