faktory-1.1.2.4: Faktory Worker for Haskell
Safe HaskellSafe-Inferred
LanguageHaskell2010

Faktory.Client

Synopsis

Client operations

newClient :: HasCallStack => Settings -> Maybe WorkerId -> IO Client Source #

Open a new Client connection with the given Settings

High-level Client API

command_ :: Client -> ByteString -> [ByteString] -> IO () Source #

Send a command, read and discard the response

commandOK :: HasCallStack => Client -> ByteString -> [ByteString] -> IO () Source #

Send a command, assert the response is OK

commandJSON :: FromJSON a => Client -> ByteString -> [ByteString] -> IO (Either String (Maybe a)) Source #

Send a command, parse the response as JSON