Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- data Client
- newClient :: HasCallStack => Settings -> Maybe WorkerId -> IO Client
- closeClient :: Client -> IO ()
- pushJob :: (HasCallStack, ToJSON a) => Client -> a -> IO ()
- flush :: HasCallStack => Client -> IO ()
- command_ :: Client -> ByteString -> [ByteString] -> IO ()
- commandOK :: HasCallStack => Client -> ByteString -> [ByteString] -> IO ()
- commandJSON :: FromJSON a => Client -> ByteString -> [ByteString] -> IO (Either String (Maybe a))
Client operations
High-level Job operations
flush :: HasCallStack => Client -> IO () Source #
Clear all job data in the Faktory server
Use with caution!
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