Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Faktory.Client
Synopsis
- data Client = Client {}
- newClient :: HasCallStack => Settings -> Maybe WorkerId -> IO Client
- closeClient :: Client -> IO ()
- command_ :: Client -> ByteString -> [ByteString] -> IO ()
- commandOK :: HasCallStack => Client -> ByteString -> [ByteString] -> IO ()
- commandJSON :: FromJSON a => Client -> ByteString -> [ByteString] -> IO (Either String (Maybe a))
- commandByteString :: Client -> ByteString -> [ByteString] -> IO (Either String (Maybe ByteString))
Client operations
Constructors
Client | |
Fields |
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
commandByteString :: Client -> ByteString -> [ByteString] -> IO (Either String (Maybe ByteString)) Source #