haskell-disque-0.0.1.1: Client library for the Disque datastore

Safe HaskellNone
LanguageHaskell2010

Database.Disque

Contents

Synopsis

Documentation

data Disque a Source #

Instances

Monad Disque Source # 

Methods

(>>=) :: Disque a -> (a -> Disque b) -> Disque b #

(>>) :: Disque a -> Disque b -> Disque b #

return :: a -> Disque a #

fail :: String -> Disque a #

Functor Disque Source # 

Methods

fmap :: (a -> b) -> Disque a -> Disque b #

(<$) :: a -> Disque b -> Disque a #

Applicative Disque Source # 

Methods

pure :: a -> Disque a #

(<*>) :: Disque (a -> b) -> Disque a -> Disque b #

(*>) :: Disque a -> Disque b -> Disque b #

(<*) :: Disque a -> Disque b -> Disque a #

MonadIO Disque Source # 

Methods

liftIO :: IO a -> Disque a #

MonadRedis Disque Source # 

Methods

liftRedis :: Redis a -> Disque a #

runDisque :: Connection -> Disque a -> IO a Source #

Run disque transformer

data Connection :: * #

A threadsafe pool of network connections to a Redis server. Use the connect function to create one.

data ConnectInfo :: * #

Information for connnecting to a Redis server.

It is recommended to not use the ConnInfo data constructor directly. Instead use defaultConnectInfo and update it with record syntax. For example to connect to a password protected Redis server running on localhost and listening to the default port:

myConnectInfo :: ConnectInfo
myConnectInfo = defaultConnectInfo {connectAuth = Just "secret"}

Constructors

ConnInfo 

Fields

data Reply :: * #

Low-level representation of replies from the Redis server.

data Job Source #

Constructors

Job 

Fields

Instances

type JobId = ByteString Source #

Disque job

Job IDs start with a DI and end with an SQ and are always 48 characters

disqueConnectInfo :: ConnectInfo Source #

Disque connection information

Use this smart constructor to override specifics to your client connection

e.g.

disqueConnectInfo { connectPort = PortNumber 7712 }

connect :: ConnectInfo -> IO Connection #

Constructs a Connection pool to a Redis server designated by the given ConnectInfo. The first connection is not actually established until the first call to the server.

Main API

Other Commands

High level functions

withGetJobs :: [ByteString] -> Int -> (Job -> Disque a) -> Disque [a] Source #