-- Hoogle documentation, generated by Haddock
-- See Hoogle, http://www.haskell.org/hoogle/


-- | Client library for the Redis datastore: supports full command set,
--   pipelining.
--   
--   Redis is an open source, advanced key-value store. It is often
--   referred to as a data structure server since keys can contain strings,
--   hashes, lists, sets and sorted sets. This library is a Haskell client
--   for the Redis datastore. Compared to other Haskell client libraries it
--   has some advantages:
--   
--   <ul>
--   <li><i>Compatibility with Latest Stable Redis:</i> Hedis is intended
--   to be used with the latest stable version of Redis (currently 5.0).
--   Most redis commands (<a>http://redis.io/commands</a>) are available as
--   haskell functions, although MONITOR and SYNC are intentionally
--   omitted. Additionally, a low-level API is exposed that makes it easy
--   for the library user to implement further commands, such as new
--   commands from an experimental Redis version.</li>
--   <li><i>Automatic Optimal Pipelining:</i> Commands are pipelined
--   (<a>http://redis.io/topics/pipelining</a>) as much as possible without
--   any work by the user. See
--   <a>http://informatikr.com/2012/redis-pipelining.html</a> for a
--   technical explanation of automatic optimal pipelining.</li>
--   <li><i>Enforced Pub/Sub semantics:</i> When subscribed to the Redis
--   Pub/Sub server (<a>http://redis.io/topics/pubsub</a>), clients are not
--   allowed to issue commands other than subscribing to or unsubscribing
--   from channels. This library uses the type system to enforce the
--   correct behavior.</li>
--   <li><i>Connect via TCP or Unix Domain Socket:</i> TCP sockets are the
--   default way to connect to a Redis server. For connections to a server
--   on the same machine, Unix domain sockets offer higher performance than
--   the standard TCP connection.</li>
--   </ul>
--   
--   For detailed documentation, see the <a>Database.Redis</a> module.
@package hedis
@version 0.15.2

module Database.Redis.Core.Internal

-- | Context for normal command execution, outside of transactions. Use
--   <tt>runRedis</tt> to run actions of this type.
--   
--   In this context, each result is wrapped in an <a>Either</a> to account
--   for the possibility of Redis returning an <a>Error</a> reply.
newtype Redis a
Redis :: ReaderT RedisEnv IO a -> Redis a
data RedisEnv
NonClusteredEnv :: Connection -> IORef Reply -> RedisEnv
[envConn] :: RedisEnv -> Connection
[envLastReply] :: RedisEnv -> IORef Reply
ClusteredEnv :: IO ShardMap -> Connection -> RedisEnv
[refreshAction] :: RedisEnv -> IO ShardMap
[connection] :: RedisEnv -> Connection
instance Control.Monad.IO.Unlift.MonadUnliftIO Database.Redis.Core.Internal.Redis
instance GHC.Base.Applicative Database.Redis.Core.Internal.Redis
instance GHC.Base.Functor Database.Redis.Core.Internal.Redis
instance Control.Monad.IO.Class.MonadIO Database.Redis.Core.Internal.Redis
instance GHC.Base.Monad Database.Redis.Core.Internal.Redis
instance Control.Monad.Fail.MonadFail Database.Redis.Core.Internal.Redis

module Database.Redis

-- | Context for normal command execution, outside of transactions. Use
--   <tt>runRedis</tt> to run actions of this type.
--   
--   In this context, each result is wrapped in an <a>Either</a> to account
--   for the possibility of Redis returning an <a>Error</a> reply.
data Redis a

-- | Interact with a Redis datastore specified by the given
--   <a>Connection</a>.
--   
--   Each call of <a>runRedis</a> takes a network connection from the
--   <a>Connection</a> pool and runs the given <a>Redis</a> action. Calls
--   to <a>runRedis</a> may thus block while all connections from the pool
--   are in use.
runRedis :: Connection -> Redis a -> IO a

-- | Deconstruct Redis constructor.
--   
--   <a>unRedis</a> and <a>reRedis</a> can be used to define instances for
--   arbitrary typeclasses.
--   
--   WARNING! These functions are considered internal and no guarantee is
--   given at this point that they will not break in future.
unRedis :: Redis a -> ReaderT RedisEnv IO a

-- | Reconstruct Redis constructor.
reRedis :: ReaderT RedisEnv IO a -> Redis a

-- | This class captures the following behaviour: In a context <tt>m</tt>,
--   a command will return its result wrapped in a "container" of type
--   <tt>f</tt>.
--   
--   Please refer to the Command Type Signatures section of this page for
--   more information.
class (MonadRedis m) => RedisCtx m f | m -> f
returnDecode :: (RedisCtx m f, RedisResult a) => Reply -> m (f a)
class (Monad m) => MonadRedis m
liftRedis :: MonadRedis m => Redis a -> m a

-- | A threadsafe pool of network connections to a Redis server. Use the
--   <a>connect</a> function to create one.
data Connection
data ConnectError
ConnectAuthError :: Reply -> ConnectError
ConnectSelectError :: Reply -> ConnectError

-- | Constructs a <a>Connection</a> pool to a Redis server designated by
--   the given <a>ConnectInfo</a>. The first connection is not actually
--   established until the first call to the server.
connect :: ConnectInfo -> IO Connection

-- | Constructs a <a>Connection</a> pool to a Redis server designated by
--   the given <a>ConnectInfo</a>, then tests if the server is actually
--   there. Throws an exception if the connection to the Redis server can't
--   be established.
checkedConnect :: ConnectInfo -> IO Connection

-- | Destroy all idle resources in the pool.
disconnect :: Connection -> IO ()

-- | Memory bracket around <a>connect</a> and <a>disconnect</a>.
withConnect :: (MonadMask m, MonadIO m) => ConnectInfo -> (Connection -> m c) -> m c

-- | Memory bracket around <a>checkedConnect</a> and <a>disconnect</a>
withCheckedConnect :: ConnectInfo -> (Connection -> IO c) -> IO c

-- | Information for connnecting to a Redis server.
--   
--   It is recommended to not use the <a>ConnInfo</a> data constructor
--   directly. Instead use <a>defaultConnectInfo</a> 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:
--   
--   <pre>
--   myConnectInfo :: ConnectInfo
--   myConnectInfo = defaultConnectInfo {connectAuth = Just "secret"}
--   </pre>
data ConnectInfo
ConnInfo :: HostName -> PortID -> Maybe ByteString -> Integer -> Int -> NominalDiffTime -> Maybe NominalDiffTime -> Maybe ClientParams -> ConnectInfo

-- | Ignored when <a>connectPort</a> is a <tt>UnixSocket</tt>
[connectHost] :: ConnectInfo -> HostName
[connectPort] :: ConnectInfo -> PortID

-- | When the server is protected by a password, set <a>connectAuth</a> to
--   <a>Just</a> the password. Each connection will then authenticate by
--   the <a>auth</a> command.
[connectAuth] :: ConnectInfo -> Maybe ByteString

-- | Each connection will <a>select</a> the database with the given index.
[connectDatabase] :: ConnectInfo -> Integer

-- | Maximum number of connections to keep open. The smallest acceptable
--   value is 1.
[connectMaxConnections] :: ConnectInfo -> Int

-- | Amount of time for which an unused connection is kept open. The
--   smallest acceptable value is 0.5 seconds. If the <tt>timeout</tt>
--   value in your redis.conf file is non-zero, it should be larger than
--   <a>connectMaxIdleTime</a>.
[connectMaxIdleTime] :: ConnectInfo -> NominalDiffTime

-- | Optional timeout until connection to Redis gets established.
--   <tt>ConnectTimeoutException</tt> gets thrown if no socket get
--   connected in this interval of time.
[connectTimeout] :: ConnectInfo -> Maybe NominalDiffTime

-- | Optional TLS parameters. TLS will be enabled if this is provided.
[connectTLSParams] :: ConnectInfo -> Maybe ClientParams

-- | Default information for connecting:
--   
--   <pre>
--   connectHost           = "localhost"
--   connectPort           = PortNumber 6379 -- Redis default port
--   connectAuth           = Nothing         -- No password
--   connectDatabase       = 0               -- SELECT database 0
--   connectMaxConnections = 50              -- Up to 50 connections
--   connectMaxIdleTime    = 30              -- Keep open for 30 seconds
--   connectTimeout        = Nothing         -- Don't add timeout logic
--   connectTLSParams      = Nothing         -- Do not use TLS
--   </pre>
defaultConnectInfo :: ConnectInfo

-- | Parse a <tt><a>ConnectInfo</a></tt> from a URL
--   
--   Username is ignored, path is used to specify the database:
--   
--   <pre>
--   &gt;&gt;&gt; parseConnectInfo "redis://username:password@host:42/2"
--   Right (ConnInfo {connectHost = "host", connectPort = PortNumber 42, connectAuth = Just "password", connectDatabase = 2, connectMaxConnections = 50, connectMaxIdleTime = 30s, connectTimeout = Nothing, connectTLSParams = Nothing})
--   </pre>
--   
--   <pre>
--   &gt;&gt;&gt; parseConnectInfo "redis://username:password@host:42/db"
--   Left "Invalid port: db"
--   </pre>
--   
--   The scheme is validated, to prevent mixing up configurations:
--   
--   <pre>
--   &gt;&gt;&gt; parseConnectInfo "postgres://"
--   Left "Wrong scheme"
--   </pre>
--   
--   Beyond that, all values are optional. Omitted values are taken from
--   <tt><a>defaultConnectInfo</a></tt>:
--   
--   <pre>
--   &gt;&gt;&gt; parseConnectInfo "redis://"
--   Right (ConnInfo {connectHost = "localhost", connectPort = PortNumber 6379, connectAuth = Nothing, connectDatabase = 0, connectMaxConnections = 50, connectMaxIdleTime = 30s, connectTimeout = Nothing, connectTLSParams = Nothing})
--   </pre>
parseConnectInfo :: String -> Either String ConnectInfo

-- | Constructs a <a>ShardMap</a> of connections to clustered nodes. The
--   argument is a <a>ConnectInfo</a> for any node in the cluster
--   
--   Some Redis commands are currently not supported in cluster mode -
--   CONFIG, AUTH - SCAN - MOVE, SELECT - PUBLISH, SUBSCRIBE, PSUBSCRIBE,
--   UNSUBSCRIBE, PUNSUBSCRIBE, RESET
connectCluster :: ConnectInfo -> IO Connection
data PortID
PortNumber :: PortNumber -> PortID
UnixSocket :: String -> PortID
auth :: RedisCtx m f => ByteString -> m (f Status)
echo :: RedisCtx m f => ByteString -> m (f ByteString)
ping :: RedisCtx m f => m (f Status)
quit :: RedisCtx m f => m (f Status)
select :: RedisCtx m f => Integer -> m (f Status)
del :: RedisCtx m f => [ByteString] -> m (f Integer)
dump :: RedisCtx m f => ByteString -> m (f ByteString)
exists :: RedisCtx m f => ByteString -> m (f Bool)
expire :: RedisCtx m f => ByteString -> Integer -> m (f Bool)
expireat :: RedisCtx m f => ByteString -> Integer -> m (f Bool)
keys :: RedisCtx m f => ByteString -> m (f [ByteString])

-- | Options for the <a>migrate</a> command.
data MigrateOpts
MigrateOpts :: Bool -> Bool -> MigrateOpts
[migrateCopy] :: MigrateOpts -> Bool
[migrateReplace] :: MigrateOpts -> Bool

-- | Redis default <a>MigrateOpts</a>. Equivalent to omitting all optional
--   parameters.
--   
--   <pre>
--   MigrateOpts
--       { migrateCopy    = False -- remove the key from the local instance
--       , migrateReplace = False -- don't replace existing key on the remote instance
--       }
--   </pre>
defaultMigrateOpts :: MigrateOpts
migrate :: RedisCtx m f => ByteString -> ByteString -> ByteString -> Integer -> Integer -> m (f Status)
migrateMultiple :: RedisCtx m f => ByteString -> ByteString -> Integer -> Integer -> MigrateOpts -> [ByteString] -> m (f Status)
move :: RedisCtx m f => ByteString -> Integer -> m (f Bool)
objectRefcount :: RedisCtx m f => ByteString -> m (f Integer)
objectEncoding :: RedisCtx m f => ByteString -> m (f ByteString)
objectIdletime :: RedisCtx m f => ByteString -> m (f Integer)
persist :: RedisCtx m f => ByteString -> m (f Bool)
pexpire :: RedisCtx m f => ByteString -> Integer -> m (f Bool)
pexpireat :: RedisCtx m f => ByteString -> Integer -> m (f Bool)
pttl :: RedisCtx m f => ByteString -> m (f Integer)
randomkey :: RedisCtx m f => m (f (Maybe ByteString))
rename :: RedisCtx m f => ByteString -> ByteString -> m (f Status)
renamenx :: RedisCtx m f => ByteString -> ByteString -> m (f Bool)
restore :: RedisCtx m f => ByteString -> Integer -> ByteString -> m (f Status)
restoreReplace :: RedisCtx m f => ByteString -> Integer -> ByteString -> m (f Status)
data Cursor
cursor0 :: Cursor
data ScanOpts
ScanOpts :: Maybe ByteString -> Maybe Integer -> ScanOpts
[scanMatch] :: ScanOpts -> Maybe ByteString
[scanCount] :: ScanOpts -> Maybe Integer

-- | Redis default <a>ScanOpts</a>. Equivalent to omitting all optional
--   parameters.
--   
--   <pre>
--   ScanOpts
--       { scanMatch = Nothing -- don't match any pattern
--       , scanCount = Nothing -- don't set any requirements on number elements returned (works like value <tt>COUNT 10</tt>)
--       }
--   </pre>
defaultScanOpts :: ScanOpts
scan :: RedisCtx m f => Cursor -> m (f (Cursor, [ByteString]))
scanOpts :: RedisCtx m f => Cursor -> ScanOpts -> m (f (Cursor, [ByteString]))

-- | Options for the <a>sort</a> command.
data SortOpts
SortOpts :: Maybe ByteString -> (Integer, Integer) -> [ByteString] -> SortOrder -> Bool -> SortOpts
[sortBy] :: SortOpts -> Maybe ByteString
[sortLimit] :: SortOpts -> (Integer, Integer)
[sortGet] :: SortOpts -> [ByteString]
[sortOrder] :: SortOpts -> SortOrder
[sortAlpha] :: SortOpts -> Bool

-- | Redis default <a>SortOpts</a>. Equivalent to omitting all optional
--   parameters.
--   
--   <pre>
--   SortOpts
--       { sortBy    = Nothing -- omit the BY option
--       , sortLimit = (0,-1)  -- return entire collection
--       , sortGet   = []      -- omit the GET option
--       , sortOrder = Asc     -- sort in ascending order
--       , sortAlpha = False   -- sort numerically, not lexicographically
--       }
--   </pre>
defaultSortOpts :: SortOpts
data SortOrder
Asc :: SortOrder
Desc :: SortOrder
sort :: RedisCtx m f => ByteString -> SortOpts -> m (f [ByteString])
sortStore :: RedisCtx m f => ByteString -> ByteString -> SortOpts -> m (f Integer)
ttl :: RedisCtx m f => ByteString -> m (f Integer)
data RedisType
None :: RedisType
String :: RedisType
Hash :: RedisType
List :: RedisType
Set :: RedisType
ZSet :: RedisType
getType :: RedisCtx m f => ByteString -> m (f RedisType)
wait :: RedisCtx m f => Integer -> Integer -> m (f Integer)
hdel :: RedisCtx m f => ByteString -> [ByteString] -> m (f Integer)
hexists :: RedisCtx m f => ByteString -> ByteString -> m (f Bool)
hget :: RedisCtx m f => ByteString -> ByteString -> m (f (Maybe ByteString))
hgetall :: RedisCtx m f => ByteString -> m (f [(ByteString, ByteString)])
hincrby :: RedisCtx m f => ByteString -> ByteString -> Integer -> m (f Integer)
hincrbyfloat :: RedisCtx m f => ByteString -> ByteString -> Double -> m (f Double)
hkeys :: RedisCtx m f => ByteString -> m (f [ByteString])
hlen :: RedisCtx m f => ByteString -> m (f Integer)
hmget :: RedisCtx m f => ByteString -> [ByteString] -> m (f [Maybe ByteString])
hmset :: RedisCtx m f => ByteString -> [(ByteString, ByteString)] -> m (f Status)
hscan :: RedisCtx m f => ByteString -> Cursor -> m (f (Cursor, [(ByteString, ByteString)]))
hscanOpts :: RedisCtx m f => ByteString -> Cursor -> ScanOpts -> m (f (Cursor, [(ByteString, ByteString)]))
hset :: RedisCtx m f => ByteString -> ByteString -> ByteString -> m (f Integer)
hsetnx :: RedisCtx m f => ByteString -> ByteString -> ByteString -> m (f Bool)
hstrlen :: RedisCtx m f => ByteString -> ByteString -> m (f Integer)
hvals :: RedisCtx m f => ByteString -> m (f [ByteString])
pfadd :: RedisCtx m f => ByteString -> [ByteString] -> m (f Integer)
pfcount :: RedisCtx m f => [ByteString] -> m (f Integer)
pfmerge :: RedisCtx m f => ByteString -> [ByteString] -> m (f ByteString)
blpop :: RedisCtx m f => [ByteString] -> Integer -> m (f (Maybe (ByteString, ByteString)))
brpop :: RedisCtx m f => [ByteString] -> Integer -> m (f (Maybe (ByteString, ByteString)))
brpoplpush :: RedisCtx m f => ByteString -> ByteString -> Integer -> m (f (Maybe ByteString))
lindex :: RedisCtx m f => ByteString -> Integer -> m (f (Maybe ByteString))
linsertBefore :: RedisCtx m f => ByteString -> ByteString -> ByteString -> m (f Integer)
linsertAfter :: RedisCtx m f => ByteString -> ByteString -> ByteString -> m (f Integer)
llen :: RedisCtx m f => ByteString -> m (f Integer)
lpop :: RedisCtx m f => ByteString -> m (f (Maybe ByteString))
lpush :: RedisCtx m f => ByteString -> [ByteString] -> m (f Integer)
lpushx :: RedisCtx m f => ByteString -> ByteString -> m (f Integer)
lrange :: RedisCtx m f => ByteString -> Integer -> Integer -> m (f [ByteString])
lrem :: RedisCtx m f => ByteString -> Integer -> ByteString -> m (f Integer)
lset :: RedisCtx m f => ByteString -> Integer -> ByteString -> m (f Status)
ltrim :: RedisCtx m f => ByteString -> Integer -> Integer -> m (f Status)
rpop :: RedisCtx m f => ByteString -> m (f (Maybe ByteString))
rpoplpush :: RedisCtx m f => ByteString -> ByteString -> m (f (Maybe ByteString))
rpush :: RedisCtx m f => ByteString -> [ByteString] -> m (f Integer)
rpushx :: RedisCtx m f => ByteString -> ByteString -> m (f Integer)
eval :: (RedisCtx m f, RedisResult a) => ByteString -> [ByteString] -> [ByteString] -> m (f a)

-- | Works like <a>eval</a>, but sends the SHA1 hash of the script instead
--   of the script itself. Fails if the server does not recognise the hash,
--   in which case, <a>eval</a> should be used instead.
evalsha :: (RedisCtx m f, RedisResult a) => ByteString -> [ByteString] -> [ByteString] -> m (f a)
data DebugMode
scriptDebug :: RedisCtx m f => DebugMode -> m (f Bool)
scriptExists :: RedisCtx m f => [ByteString] -> m (f [Bool])
scriptFlush :: RedisCtx m f => m (f Status)
scriptKill :: RedisCtx m f => m (f Status)
scriptLoad :: RedisCtx m f => ByteString -> m (f ByteString)
bgrewriteaof :: RedisCtx m f => m (f Status)
bgsave :: RedisCtx m f => m (f Status)
clientGetname :: RedisCtx m f => m (f Status)
clientList :: RedisCtx m f => m (f [ByteString])
clientPause :: RedisCtx m f => Integer -> m (f Status)
data ReplyMode
clientReply :: RedisCtx m f => ReplyMode -> m (f Bool)
clientSetname :: RedisCtx m f => ByteString -> m (f ByteString)
commandCount :: RedisCtx m f => m (f Integer)
commandInfo :: RedisCtx m f => [ByteString] -> m (f [ByteString])
configGet :: RedisCtx m f => ByteString -> m (f [(ByteString, ByteString)])
configResetstat :: RedisCtx m f => m (f Status)
configRewrite :: RedisCtx m f => m (f Status)
configSet :: RedisCtx m f => ByteString -> ByteString -> m (f Status)
dbsize :: RedisCtx m f => m (f Integer)
debugObject :: RedisCtx m f => ByteString -> m (f ByteString)
flushall :: RedisCtx m f => m (f Status)
flushdb :: RedisCtx m f => m (f Status)
info :: RedisCtx m f => m (f ByteString)
infoSection :: RedisCtx m f => ByteString -> m (f ByteString)
lastsave :: RedisCtx m f => m (f Integer)
save :: RedisCtx m f => m (f Status)
slaveof :: RedisCtx m f => ByteString -> ByteString -> m (f Status)

-- | A single entry from the slowlog.
data Slowlog
Slowlog :: Integer -> Integer -> Integer -> [ByteString] -> Maybe ByteString -> Maybe ByteString -> Slowlog

-- | A unique progressive identifier for every slow log entry.
[slowlogId] :: Slowlog -> Integer

-- | The unix timestamp at which the logged command was processed.
[slowlogTimestamp] :: Slowlog -> Integer

-- | The amount of time needed for its execution, in microseconds.
[slowlogMicros] :: Slowlog -> Integer

-- | The command and it's arguments.
[slowlogCmd] :: Slowlog -> [ByteString]
[slowlogClientIpAndPort] :: Slowlog -> Maybe ByteString
[slowlogClientName] :: Slowlog -> Maybe ByteString
slowlogGet :: RedisCtx m f => Integer -> m (f [Slowlog])
slowlogLen :: RedisCtx m f => m (f Integer)
slowlogReset :: RedisCtx m f => m (f Status)
time :: RedisCtx m f => m (f (Integer, Integer))
sadd :: RedisCtx m f => ByteString -> [ByteString] -> m (f Integer)
scard :: RedisCtx m f => ByteString -> m (f Integer)
sdiff :: RedisCtx m f => [ByteString] -> m (f [ByteString])
sdiffstore :: RedisCtx m f => ByteString -> [ByteString] -> m (f Integer)
sinter :: RedisCtx m f => [ByteString] -> m (f [ByteString])
sinterstore :: RedisCtx m f => ByteString -> [ByteString] -> m (f Integer)
sismember :: RedisCtx m f => ByteString -> ByteString -> m (f Bool)
smembers :: RedisCtx m f => ByteString -> m (f [ByteString])
smove :: RedisCtx m f => ByteString -> ByteString -> ByteString -> m (f Bool)
spop :: RedisCtx m f => ByteString -> m (f (Maybe ByteString))
spopN :: RedisCtx m f => ByteString -> Integer -> m (f [ByteString])
srandmember :: RedisCtx m f => ByteString -> m (f (Maybe ByteString))
srandmemberN :: RedisCtx m f => ByteString -> Integer -> m (f [ByteString])
srem :: RedisCtx m f => ByteString -> [ByteString] -> m (f Integer)
sscan :: RedisCtx m f => ByteString -> Cursor -> m (f (Cursor, [ByteString]))
sscanOpts :: RedisCtx m f => ByteString -> Cursor -> ScanOpts -> m (f (Cursor, [ByteString]))
sunion :: RedisCtx m f => [ByteString] -> m (f [ByteString])
sunionstore :: RedisCtx m f => ByteString -> [ByteString] -> m (f Integer)
data ZaddOpts
ZaddOpts :: Maybe Condition -> Bool -> Bool -> ZaddOpts
[zaddCondition] :: ZaddOpts -> Maybe Condition
[zaddChange] :: ZaddOpts -> Bool
[zaddIncrement] :: ZaddOpts -> Bool

-- | Redis default <a>ZaddOpts</a>. Equivalent to omitting all optional
--   parameters.
--   
--   <pre>
--   ZaddOpts
--       { zaddCondition = Nothing -- omit NX and XX options
--       , zaddChange    = False   -- don't modify the return value from the number of new elements added, to the total number of elements changed
--       , zaddIncrement = False   -- don't add like ZINCRBY
--       }
--   </pre>
defaultZaddOpts :: ZaddOpts
zadd :: RedisCtx m f => ByteString -> [(Double, ByteString)] -> m (f Integer)
zaddOpts :: RedisCtx m f => ByteString -> [(Double, ByteString)] -> ZaddOpts -> m (f Integer)
zcard :: RedisCtx m f => ByteString -> m (f Integer)
zcount :: RedisCtx m f => ByteString -> Double -> Double -> m (f Integer)
zincrby :: RedisCtx m f => ByteString -> Integer -> ByteString -> m (f Double)
data Aggregate
Sum :: Aggregate
Min :: Aggregate
Max :: Aggregate
zinterstore :: RedisCtx m f => ByteString -> [ByteString] -> Aggregate -> m (f Integer)
zinterstoreWeights :: RedisCtx m f => ByteString -> [(ByteString, Double)] -> Aggregate -> m (f Integer)
zlexcount :: RedisCtx m f => ByteString -> ByteString -> ByteString -> m (f Integer)
zrange :: RedisCtx m f => ByteString -> Integer -> Integer -> m (f [ByteString])
zrangeWithscores :: RedisCtx m f => ByteString -> Integer -> Integer -> m (f [(ByteString, Double)])
data RangeLex a
Incl :: a -> RangeLex a
Excl :: a -> RangeLex a
Minr :: RangeLex a
Maxr :: RangeLex a
zrangebylex :: RedisCtx m f => ByteString -> RangeLex ByteString -> RangeLex ByteString -> m (f [ByteString])
zrangebylexLimit :: RedisCtx m f => ByteString -> RangeLex ByteString -> RangeLex ByteString -> Integer -> Integer -> m (f [ByteString])
zrangebyscore :: RedisCtx m f => ByteString -> Double -> Double -> m (f [ByteString])
zrangebyscoreWithscores :: RedisCtx m f => ByteString -> Double -> Double -> m (f [(ByteString, Double)])
zrangebyscoreLimit :: RedisCtx m f => ByteString -> Double -> Double -> Integer -> Integer -> m (f [ByteString])
zrangebyscoreWithscoresLimit :: RedisCtx m f => ByteString -> Double -> Double -> Integer -> Integer -> m (f [(ByteString, Double)])
zrank :: RedisCtx m f => ByteString -> ByteString -> m (f (Maybe Integer))
zrem :: RedisCtx m f => ByteString -> [ByteString] -> m (f Integer)
zremrangebylex :: RedisCtx m f => ByteString -> ByteString -> ByteString -> m (f Integer)
zremrangebyrank :: RedisCtx m f => ByteString -> Integer -> Integer -> m (f Integer)
zremrangebyscore :: RedisCtx m f => ByteString -> Double -> Double -> m (f Integer)
zrevrange :: RedisCtx m f => ByteString -> Integer -> Integer -> m (f [ByteString])
zrevrangeWithscores :: RedisCtx m f => ByteString -> Integer -> Integer -> m (f [(ByteString, Double)])
zrevrangebyscore :: RedisCtx m f => ByteString -> Double -> Double -> m (f [ByteString])
zrevrangebyscoreWithscores :: RedisCtx m f => ByteString -> Double -> Double -> m (f [(ByteString, Double)])
zrevrangebyscoreLimit :: RedisCtx m f => ByteString -> Double -> Double -> Integer -> Integer -> m (f [ByteString])
zrevrangebyscoreWithscoresLimit :: RedisCtx m f => ByteString -> Double -> Double -> Integer -> Integer -> m (f [(ByteString, Double)])
zrevrank :: RedisCtx m f => ByteString -> ByteString -> m (f (Maybe Integer))
zscan :: RedisCtx m f => ByteString -> Cursor -> m (f (Cursor, [(ByteString, Double)]))
zscanOpts :: RedisCtx m f => ByteString -> Cursor -> ScanOpts -> m (f (Cursor, [(ByteString, Double)]))
zscore :: RedisCtx m f => ByteString -> ByteString -> m (f (Maybe Double))
zunionstore :: RedisCtx m f => ByteString -> [ByteString] -> Aggregate -> m (f Integer)
zunionstoreWeights :: RedisCtx m f => ByteString -> [(ByteString, Double)] -> Aggregate -> m (f Integer)
append :: RedisCtx m f => ByteString -> ByteString -> m (f Integer)
bitcount :: RedisCtx m f => ByteString -> m (f Integer)
bitcountRange :: RedisCtx m f => ByteString -> Integer -> Integer -> m (f Integer)
bitopAnd :: RedisCtx m f => ByteString -> [ByteString] -> m (f Integer)
bitopOr :: RedisCtx m f => ByteString -> [ByteString] -> m (f Integer)
bitopXor :: RedisCtx m f => ByteString -> [ByteString] -> m (f Integer)
bitopNot :: RedisCtx m f => ByteString -> ByteString -> m (f Integer)
bitpos :: RedisCtx m f => ByteString -> Integer -> Integer -> Integer -> m (f Integer)
decr :: RedisCtx m f => ByteString -> m (f Integer)
decrby :: RedisCtx m f => ByteString -> Integer -> m (f Integer)
get :: RedisCtx m f => ByteString -> m (f (Maybe ByteString))
getbit :: RedisCtx m f => ByteString -> Integer -> m (f Integer)
getrange :: RedisCtx m f => ByteString -> Integer -> Integer -> m (f ByteString)
getset :: RedisCtx m f => ByteString -> ByteString -> m (f (Maybe ByteString))
incr :: RedisCtx m f => ByteString -> m (f Integer)
incrby :: RedisCtx m f => ByteString -> Integer -> m (f Integer)
incrbyfloat :: RedisCtx m f => ByteString -> Double -> m (f Double)
mget :: RedisCtx m f => [ByteString] -> m (f [Maybe ByteString])
mset :: RedisCtx m f => [(ByteString, ByteString)] -> m (f Status)
msetnx :: RedisCtx m f => [(ByteString, ByteString)] -> m (f Bool)
psetex :: RedisCtx m f => ByteString -> Integer -> ByteString -> m (f Status)
data Condition
Nx :: Condition
Xx :: Condition
data SetOpts
SetOpts :: Maybe Integer -> Maybe Integer -> Maybe Condition -> SetOpts
[setSeconds] :: SetOpts -> Maybe Integer
[setMilliseconds] :: SetOpts -> Maybe Integer
[setCondition] :: SetOpts -> Maybe Condition
set :: RedisCtx m f => ByteString -> ByteString -> m (f Status)
setOpts :: RedisCtx m f => ByteString -> ByteString -> SetOpts -> m (f Status)
setbit :: RedisCtx m f => ByteString -> Integer -> ByteString -> m (f Integer)
setex :: RedisCtx m f => ByteString -> Integer -> ByteString -> m (f Status)
setnx :: RedisCtx m f => ByteString -> ByteString -> m (f Bool)
setrange :: RedisCtx m f => ByteString -> Integer -> ByteString -> m (f Integer)
strlen :: RedisCtx m f => ByteString -> m (f Integer)
data XReadOpts
XReadOpts :: Maybe Integer -> Maybe Integer -> XReadOpts
[block] :: XReadOpts -> Maybe Integer
[recordCount] :: XReadOpts -> Maybe Integer

-- | Redis default <a>XReadOpts</a>. Equivalent to omitting all optional
--   parameters.
--   
--   <pre>
--   XReadOpts
--       { block = Nothing -- Don't block waiting for more records
--       , recordCount    = Nothing   -- no record count
--       }
--   </pre>
defaultXreadOpts :: XReadOpts
data XReadResponse
XReadResponse :: ByteString -> [StreamsRecord] -> XReadResponse
[stream] :: XReadResponse -> ByteString
[records] :: XReadResponse -> [StreamsRecord]
data StreamsRecord
StreamsRecord :: ByteString -> [(ByteString, ByteString)] -> StreamsRecord
[recordId] :: StreamsRecord -> ByteString
[keyValues] :: StreamsRecord -> [(ByteString, ByteString)]
data TrimOpts
NoArgs :: TrimOpts
Maxlen :: Integer -> TrimOpts
ApproxMaxlen :: Integer -> TrimOpts
xadd :: RedisCtx m f => ByteString -> ByteString -> [(ByteString, ByteString)] -> m (f ByteString)
xaddOpts :: RedisCtx m f => ByteString -> ByteString -> [(ByteString, ByteString)] -> TrimOpts -> m (f ByteString)
xread :: RedisCtx m f => [(ByteString, ByteString)] -> m (f (Maybe [XReadResponse]))
xreadOpts :: RedisCtx m f => [(ByteString, ByteString)] -> XReadOpts -> m (f (Maybe [XReadResponse]))
xreadGroup :: RedisCtx m f => ByteString -> ByteString -> [(ByteString, ByteString)] -> m (f (Maybe [XReadResponse]))
xreadGroupOpts :: RedisCtx m f => ByteString -> ByteString -> [(ByteString, ByteString)] -> XReadOpts -> m (f (Maybe [XReadResponse]))
xack :: RedisCtx m f => ByteString -> ByteString -> [ByteString] -> m (f Integer)
xgroupCreate :: RedisCtx m f => ByteString -> ByteString -> ByteString -> m (f Status)
xgroupSetId :: RedisCtx m f => ByteString -> ByteString -> ByteString -> m (f Status)
xgroupDestroy :: RedisCtx m f => ByteString -> ByteString -> m (f Bool)
xgroupDelConsumer :: RedisCtx m f => ByteString -> ByteString -> ByteString -> m (f Integer)
xrange :: RedisCtx m f => ByteString -> ByteString -> ByteString -> Maybe Integer -> m (f [StreamsRecord])
xrevRange :: RedisCtx m f => ByteString -> ByteString -> ByteString -> Maybe Integer -> m (f [StreamsRecord])
xlen :: RedisCtx m f => ByteString -> m (f Integer)
data XPendingSummaryResponse
XPendingSummaryResponse :: Integer -> ByteString -> ByteString -> [(ByteString, Integer)] -> XPendingSummaryResponse
[numPendingMessages] :: XPendingSummaryResponse -> Integer
[smallestPendingMessageId] :: XPendingSummaryResponse -> ByteString
[largestPendingMessageId] :: XPendingSummaryResponse -> ByteString
[numPendingMessagesByconsumer] :: XPendingSummaryResponse -> [(ByteString, Integer)]
xpendingSummary :: RedisCtx m f => ByteString -> ByteString -> Maybe ByteString -> m (f XPendingSummaryResponse)
data XPendingDetailRecord
XPendingDetailRecord :: ByteString -> ByteString -> Integer -> Integer -> XPendingDetailRecord
[messageId] :: XPendingDetailRecord -> ByteString
[consumer] :: XPendingDetailRecord -> ByteString
[millisSinceLastDelivered] :: XPendingDetailRecord -> Integer
[numTimesDelivered] :: XPendingDetailRecord -> Integer
xpendingDetail :: RedisCtx m f => ByteString -> ByteString -> ByteString -> ByteString -> Integer -> Maybe ByteString -> m (f [XPendingDetailRecord])
data XClaimOpts
XClaimOpts :: Maybe Integer -> Maybe Integer -> Maybe Integer -> Bool -> XClaimOpts
[xclaimIdle] :: XClaimOpts -> Maybe Integer
[xclaimTime] :: XClaimOpts -> Maybe Integer
[xclaimRetryCount] :: XClaimOpts -> Maybe Integer
[xclaimForce] :: XClaimOpts -> Bool
defaultXClaimOpts :: XClaimOpts
xclaim :: RedisCtx m f => ByteString -> ByteString -> ByteString -> Integer -> XClaimOpts -> [ByteString] -> m (f [StreamsRecord])
xclaimJustIds :: RedisCtx m f => ByteString -> ByteString -> ByteString -> Integer -> XClaimOpts -> [ByteString] -> m (f [ByteString])
data XInfoConsumersResponse
XInfoConsumersResponse :: ByteString -> Integer -> Integer -> XInfoConsumersResponse
[xinfoConsumerName] :: XInfoConsumersResponse -> ByteString
[xinfoConsumerNumPendingMessages] :: XInfoConsumersResponse -> Integer
[xinfoConsumerIdleTime] :: XInfoConsumersResponse -> Integer
xinfoConsumers :: RedisCtx m f => ByteString -> ByteString -> m (f [XInfoConsumersResponse])
data XInfoGroupsResponse
XInfoGroupsResponse :: ByteString -> Integer -> Integer -> ByteString -> XInfoGroupsResponse
[xinfoGroupsGroupName] :: XInfoGroupsResponse -> ByteString
[xinfoGroupsNumConsumers] :: XInfoGroupsResponse -> Integer
[xinfoGroupsNumPendingMessages] :: XInfoGroupsResponse -> Integer
[xinfoGroupsLastDeliveredMessageId] :: XInfoGroupsResponse -> ByteString
xinfoGroups :: RedisCtx m f => ByteString -> m (f [XInfoGroupsResponse])
data XInfoStreamResponse
XInfoStreamResponse :: Integer -> Integer -> Integer -> Integer -> ByteString -> StreamsRecord -> StreamsRecord -> XInfoStreamResponse
[xinfoStreamLength] :: XInfoStreamResponse -> Integer
[xinfoStreamRadixTreeKeys] :: XInfoStreamResponse -> Integer
[xinfoStreamRadixTreeNodes] :: XInfoStreamResponse -> Integer
[xinfoStreamNumGroups] :: XInfoStreamResponse -> Integer
[xinfoStreamLastEntryId] :: XInfoStreamResponse -> ByteString
[xinfoStreamFirstEntry] :: XInfoStreamResponse -> StreamsRecord
[xinfoStreamLastEntry] :: XInfoStreamResponse -> StreamsRecord
XInfoStreamEmptyResponse :: Integer -> Integer -> Integer -> Integer -> ByteString -> XInfoStreamResponse
[xinfoStreamLength] :: XInfoStreamResponse -> Integer
[xinfoStreamRadixTreeKeys] :: XInfoStreamResponse -> Integer
[xinfoStreamRadixTreeNodes] :: XInfoStreamResponse -> Integer
[xinfoStreamNumGroups] :: XInfoStreamResponse -> Integer
[xinfoStreamLastEntryId] :: XInfoStreamResponse -> ByteString
xinfoStream :: RedisCtx m f => ByteString -> m (f XInfoStreamResponse)
xdel :: RedisCtx m f => ByteString -> [ByteString] -> m (f Integer)
xtrim :: RedisCtx m f => ByteString -> TrimOpts -> m (f Integer)
inf :: RealFloat a => a
data ClusterNodesResponse
ClusterNodesResponse :: [ClusterNodesResponseEntry] -> ClusterNodesResponse
[clusterNodesResponseEntries] :: ClusterNodesResponse -> [ClusterNodesResponseEntry]
data ClusterNodesResponseEntry
ClusterNodesResponseEntry :: ByteString -> ByteString -> Integer -> [ByteString] -> Maybe ByteString -> Integer -> Integer -> Integer -> ByteString -> [ClusterNodesResponseSlotSpec] -> ClusterNodesResponseEntry
[clusterNodesResponseNodeId] :: ClusterNodesResponseEntry -> ByteString
[clusterNodesResponseNodeIp] :: ClusterNodesResponseEntry -> ByteString
[clusterNodesResponseNodePort] :: ClusterNodesResponseEntry -> Integer
[clusterNodesResponseNodeFlags] :: ClusterNodesResponseEntry -> [ByteString]
[clusterNodesResponseMasterId] :: ClusterNodesResponseEntry -> Maybe ByteString
[clusterNodesResponsePingSent] :: ClusterNodesResponseEntry -> Integer
[clusterNodesResponsePongReceived] :: ClusterNodesResponseEntry -> Integer
[clusterNodesResponseConfigEpoch] :: ClusterNodesResponseEntry -> Integer
[clusterNodesResponseLinkState] :: ClusterNodesResponseEntry -> ByteString
[clusterNodesResponseSlots] :: ClusterNodesResponseEntry -> [ClusterNodesResponseSlotSpec]
data ClusterNodesResponseSlotSpec
ClusterNodesResponseSingleSlot :: Integer -> ClusterNodesResponseSlotSpec
ClusterNodesResponseSlotRange :: Integer -> Integer -> ClusterNodesResponseSlotSpec
ClusterNodesResponseSlotImporting :: Integer -> ByteString -> ClusterNodesResponseSlotSpec
ClusterNodesResponseSlotMigrating :: Integer -> ByteString -> ClusterNodesResponseSlotSpec
clusterNodes :: RedisCtx m f => m (f ClusterNodesResponse)
data ClusterSlotsResponse
ClusterSlotsResponse :: [ClusterSlotsResponseEntry] -> ClusterSlotsResponse
[clusterSlotsResponseEntries] :: ClusterSlotsResponse -> [ClusterSlotsResponseEntry]
data ClusterSlotsResponseEntry
ClusterSlotsResponseEntry :: Int -> Int -> ClusterSlotsNode -> [ClusterSlotsNode] -> ClusterSlotsResponseEntry
[clusterSlotsResponseEntryStartSlot] :: ClusterSlotsResponseEntry -> Int
[clusterSlotsResponseEntryEndSlot] :: ClusterSlotsResponseEntry -> Int
[clusterSlotsResponseEntryMaster] :: ClusterSlotsResponseEntry -> ClusterSlotsNode
[clusterSlotsResponseEntryReplicas] :: ClusterSlotsResponseEntry -> [ClusterSlotsNode]
data ClusterSlotsNode
ClusterSlotsNode :: ByteString -> Int -> ByteString -> ClusterSlotsNode
[clusterSlotsNodeIP] :: ClusterSlotsNode -> ByteString
[clusterSlotsNodePort] :: ClusterSlotsNode -> Int
[clusterSlotsNodeID] :: ClusterSlotsNode -> ByteString
clusterSlots :: RedisCtx m f => m (f ClusterSlotsResponse)
clusterSetSlotNode :: RedisCtx m f => Integer -> ByteString -> m (f Status)
clusterSetSlotStable :: RedisCtx m f => Integer -> m (f Status)
clusterSetSlotImporting :: RedisCtx m f => Integer -> ByteString -> m (f Status)
clusterSetSlotMigrating :: RedisCtx m f => Integer -> ByteString -> m (f Status)
clusterGetKeysInSlot :: RedisCtx m f => Integer -> Integer -> m (f [ByteString])
command :: RedisCtx m f => m (f [CommandInfo])

-- | Watch the given keys to determine execution of the MULTI/EXEC block
--   (<a>http://redis.io/commands/watch</a>).
watch :: [ByteString] -> Redis (Either Reply Status)

-- | Forget about all watched keys
--   (<a>http://redis.io/commands/unwatch</a>).
unwatch :: Redis (Either Reply Status)

-- | Run commands inside a transaction. For documentation on the semantics
--   of Redis transaction see <a>http://redis.io/topics/transactions</a>.
--   
--   Inside the transaction block, command functions return their result
--   wrapped in a <a>Queued</a>. The <a>Queued</a> result is a proxy object
--   for the actual command's result, which will only be available after
--   <tt>EXEC</tt>ing the transaction.
--   
--   Example usage (note how <a>Queued</a> 's <a>Applicative</a> instance
--   is used to combine the two individual results):
--   
--   <pre>
--   runRedis conn $ do
--       set "hello" "hello"
--       set "world" "world"
--       helloworld &lt;- <a>multiExec</a> $ do
--           hello &lt;- get "hello"
--           world &lt;- get "world"
--           return $ (,) &lt;$&gt; hello &lt;*&gt; world
--       liftIO (print helloworld)
--   
--   </pre>
multiExec :: RedisTx (Queued a) -> Redis (TxResult a)

-- | A <a>Queued</a> value represents the result of a command inside a
--   transaction. It is a proxy object for the <i>actual</i> result, which
--   will only be available after returning from a <a>multiExec</a>
--   transaction.
--   
--   <a>Queued</a> values are composable by utilizing the <a>Functor</a>,
--   <a>Applicative</a> or <a>Monad</a> interfaces.
data Queued a

-- | Result of a <a>multiExec</a> transaction.
data TxResult a

-- | Transaction completed successfully. The wrapped value corresponds to
--   the <a>Queued</a> value returned from the <a>multiExec</a> argument
--   action.
TxSuccess :: a -> TxResult a

-- | Transaction aborted due to an earlier <a>watch</a> command.
TxAborted :: TxResult a

-- | At least one of the commands returned an <a>Error</a> reply.
TxError :: String -> TxResult a

-- | Command-context inside of MULTI/EXEC transactions. Use
--   <a>multiExec</a> to run actions of this type.
--   
--   In the <a>RedisTx</a> context, all commands return a <a>Queued</a>
--   value. It is a proxy object for the <i>actual</i> result, which will
--   only be available after finishing the transaction.
data RedisTx a

-- | Post a message to a channel (<a>http://redis.io/commands/publish</a>).
publish :: RedisCtx m f => ByteString -> ByteString -> m (f Integer)

-- | Listens to published messages on subscribed channels and channels
--   matching the subscribed patterns. For documentation on the semantics
--   of Redis Pub/Sub see <a>http://redis.io/topics/pubsub</a>.
--   
--   The given callback function is called for each received message.
--   Subscription changes are triggered by the returned <a>PubSub</a>. To
--   keep subscriptions unchanged, the callback can return <a>mempty</a>.
--   
--   Example: Subscribe to the "news" channel indefinitely.
--   
--   <pre>
--   pubSub (subscribe ["news"]) $ \msg -&gt; do
--       putStrLn $ "Message from " ++ show (msgChannel msg)
--       return mempty
--   
--   </pre>
--   
--   Example: Receive a single message from the "chat" channel.
--   
--   <pre>
--   pubSub (subscribe ["chat"]) $ \msg -&gt; do
--       putStrLn $ "Message from " ++ show (msgChannel msg)
--       return $ unsubscribe ["chat"]
--   
--   </pre>
--   
--   It should be noted that Redis Pub/Sub by its nature is asynchronous so
--   returning <a>unsubscribe</a> does not mean that callback won't be able
--   to receive any further messages. And to guarantee that you won't won't
--   process messages after unsubscription and won't unsubscribe from the
--   same channel more than once you need to use <tt>IORef</tt> or
--   something similar
pubSub :: PubSub -> (Message -> IO PubSub) -> Redis ()
data Message
Message :: ByteString -> Message
[msgChannel, msgMessage] :: Message -> ByteString
PMessage :: ByteString -> Message
[msgPattern, msgChannel, msgMessage] :: Message -> ByteString

-- | Encapsulates subscription changes. Use <a>subscribe</a>,
--   <a>unsubscribe</a>, <a>psubscribe</a>, <a>punsubscribe</a> or
--   <a>mempty</a> to construct a value. Combine values by using the
--   <a>Monoid</a> interface, i.e. <a>mappend</a> and <a>mconcat</a>.
data PubSub

-- | Listen for messages published to the given channels
--   (<a>http://redis.io/commands/subscribe</a>).
subscribe :: [ByteString] -> PubSub

-- | Stop listening for messages posted to the given channels
--   (<a>http://redis.io/commands/unsubscribe</a>).
unsubscribe :: [ByteString] -> PubSub

-- | Listen for messages published to channels matching the given patterns
--   (<a>http://redis.io/commands/psubscribe</a>).
psubscribe :: [ByteString] -> PubSub

-- | Stop listening for messages posted to channels matching the given
--   patterns (<a>http://redis.io/commands/punsubscribe</a>).
punsubscribe :: [ByteString] -> PubSub

-- | Open a connection to the Redis server, register to all channels in the
--   <a>PubSubController</a>, and process messages and subscription change
--   requests forever. The only way this will ever exit is if there is an
--   exception from the network code or an unhandled exception in a
--   <a>MessageCallback</a> or <a>PMessageCallback</a>. For example, if the
--   network connection to Redis dies, <a>pubSubForever</a> will throw a
--   <tt>ConnectionLost</tt>. When such an exception is thrown, you can
--   recall <a>pubSubForever</a> with the same <a>PubSubController</a>
--   which will open a new connection and resubscribe to all the channels
--   which are tracked in the <a>PubSubController</a>.
--   
--   The general pattern is therefore during program startup create a
--   <a>PubSubController</a> and fork a thread which calls
--   <a>pubSubForever</a> in a loop (using an exponential backoff algorithm
--   such as the <a>retry</a> package to not hammer the Redis server if it
--   does die). For example,
--   
--   <pre>
--   myhandler :: ByteString -&gt; IO ()
--   myhandler msg = putStrLn $ unpack $ decodeUtf8 msg
--   
--   onInitialComplete :: IO ()
--   onInitialComplete = putStrLn "Redis acknowledged that mychannel is now subscribed"
--   
--   main :: IO ()
--   main = do
--     conn &lt;- connect defaultConnectInfo
--     pubSubCtrl &lt;- newPubSubController [("mychannel", myhandler)] []
--     concurrently ( forever $
--         pubSubForever conn pubSubCtrl onInitialComplete
--           `catch` (\(e :: SomeException) -&gt; do
--             putStrLn $ "Got error: " ++ show e
--             threadDelay $ 50*1000) -- TODO: use exponential backoff
--          ) $ restOfYourProgram
--   
--   
--     {- elsewhere in your program, use pubSubCtrl to change subscriptions -}
--   </pre>
--   
--   At most one active <a>pubSubForever</a> can be running against a
--   single <a>PubSubController</a> at any time. If two active calls to
--   <a>pubSubForever</a> share a single <a>PubSubController</a> there will
--   be deadlocks. If you do want to process messages using multiple
--   connections to Redis, you can create more than one
--   <a>PubSubController</a>. For example, create one PubSubController for
--   each <a>getNumCapabilities</a> and then create a Haskell thread bound
--   to each capability each calling <a>pubSubForever</a> in a loop. This
--   will create one network connection per controller/capability and allow
--   you to register separate channels and callbacks for each controller,
--   spreading the load across the capabilities.
pubSubForever :: Connection -> PubSubController -> IO () -> IO ()

-- | A Redis channel name
type RedisChannel = ByteString

-- | A Redis pattern channel name
type RedisPChannel = ByteString

-- | A handler for a message from a subscribed channel. The callback is
--   passed the message content.
--   
--   Messages are processed synchronously in the receiving thread, so if
--   the callback takes a long time it will block other callbacks and other
--   messages from being received. If you need to move long-running work to
--   a different thread, we suggest you use <a>TBQueue</a> with a
--   reasonable bound, so that if messages are arriving faster than you can
--   process them, you do eventually block.
--   
--   If the callback throws an exception, the exception will be thrown from
--   <a>pubSubForever</a> which will cause the entire Redis connection for
--   all subscriptions to be closed. As long as you call
--   <a>pubSubForever</a> in a loop you will reconnect to your subscribed
--   channels, but you should probably add an exception handler to each
--   callback to prevent this.
type MessageCallback = ByteString -> IO ()

-- | A handler for a message from a psubscribed channel. The callback is
--   passed the channel the message was sent on plus the message content.
--   
--   Similar to <a>MessageCallback</a>, callbacks are executed
--   synchronously and any exceptions are rethrown from
--   <a>pubSubForever</a>.
type PMessageCallback = RedisChannel -> ByteString -> IO ()

-- | A controller that stores a set of channels, pattern channels, and
--   callbacks. It allows you to manage Pub/Sub subscriptions and pattern
--   subscriptions and alter them at any time throughout the life of your
--   program. You should typically create the controller at the start of
--   your program and then store it through the life of your program, using
--   <a>addChannels</a> and <a>removeChannels</a> to update the current
--   subscriptions.
data PubSubController

-- | Create a new <a>PubSubController</a>. Note that this does not
--   subscribe to any channels, it just creates the controller. The
--   subscriptions will happen once <a>pubSubForever</a> is called.
newPubSubController :: MonadIO m => [(RedisChannel, MessageCallback)] -> [(RedisPChannel, PMessageCallback)] -> m PubSubController

-- | Get the list of current channels in the <a>PubSubController</a>.
--   WARNING! This might not exactly reflect the subscribed channels in the
--   Redis server, because there is a delay between adding or removing a
--   channel in the <a>PubSubController</a> and when Redis receives and
--   processes the subscription change request.
currentChannels :: MonadIO m => PubSubController -> m [RedisChannel]

-- | Get the list of current pattern channels in the
--   <a>PubSubController</a>. WARNING! This might not exactly reflect the
--   subscribed channels in the Redis server, because there is a delay
--   between adding or removing a channel in the <a>PubSubController</a>
--   and when Redis receives and processes the subscription change request.
currentPChannels :: MonadIO m => PubSubController -> m [RedisPChannel]

-- | Add channels into the <a>PubSubController</a>, and if there is an
--   active <a>pubSubForever</a>, send the subscribe and psubscribe
--   commands to Redis. The <a>addChannels</a> function is thread-safe.
--   This function does not wait for Redis to acknowledge that the channels
--   have actually been subscribed; use <a>addChannelsAndWait</a> for that.
--   
--   You can subscribe to the same channel or pattern channel multiple
--   times; the <a>PubSubController</a> keeps a list of callbacks and
--   executes each callback in response to a message.
--   
--   The return value is an action <a>UnregisterCallbacksAction</a> which
--   will unregister the callbacks, which should typically used with
--   <tt>bracket</tt>.
addChannels :: MonadIO m => PubSubController -> [(RedisChannel, MessageCallback)] -> [(RedisPChannel, PMessageCallback)] -> m UnregisterCallbacksAction

-- | Call <a>addChannels</a> and then wait for Redis to acknowledge that
--   the channels are actually subscribed.
--   
--   Note that this function waits for all pending subscription change
--   requests, so if you for example call <a>addChannelsAndWait</a> from
--   multiple threads simultaneously, they all will wait for all pending
--   subscription changes to be acknowledged by Redis (this is due to the
--   fact that we just track the total number of pending change requests
--   sent to Redis and just wait until that count reaches zero).
--   
--   This also correctly waits if the network connection dies during the
--   subscription change. Say that the network connection dies right after
--   we send a subscription change to Redis. <a>pubSubForever</a> will
--   throw <tt>ConnectionLost</tt> and <a>addChannelsAndWait</a> will
--   continue to wait. Once you recall <a>pubSubForever</a> with the same
--   <a>PubSubController</a>, <a>pubSubForever</a> will open a new
--   connection, send subscription commands for all channels in the
--   <a>PubSubController</a> (which include the ones we are waiting for),
--   and wait for the responses from Redis. Only once we receive the
--   response from Redis that it has subscribed to all channels in
--   <a>PubSubController</a> will <a>addChannelsAndWait</a> unblock and
--   return.
addChannelsAndWait :: MonadIO m => PubSubController -> [(RedisChannel, MessageCallback)] -> [(RedisPChannel, PMessageCallback)] -> m UnregisterCallbacksAction

-- | Remove channels from the <a>PubSubController</a>, and if there is an
--   active <a>pubSubForever</a>, send the unsubscribe commands to Redis.
--   Note that as soon as this function returns, no more callbacks will be
--   executed even if more messages arrive during the period when we
--   request to unsubscribe from the channel and Redis actually processes
--   the unsubscribe request. This function is thread-safe.
--   
--   If you remove all channels, the connection in <a>pubSubForever</a> to
--   redis will stay open and waiting for any new channels from a call to
--   <a>addChannels</a>. If you really want to close the connection, use
--   <a>killThread</a> or <a>cancel</a> to kill the thread running
--   <a>pubSubForever</a>.
removeChannels :: MonadIO m => PubSubController -> [RedisChannel] -> [RedisPChannel] -> m ()

-- | Call <a>removeChannels</a> and then wait for all pending subscription
--   change requests to be acknowledged by Redis. This uses the same
--   waiting logic as <a>addChannelsAndWait</a>. Since
--   <a>removeChannels</a> immediately notifies the <a>PubSubController</a>
--   to start discarding messages, you likely don't need this function and
--   can just use <a>removeChannels</a>.
removeChannelsAndWait :: MonadIO m => PubSubController -> [RedisChannel] -> [RedisPChannel] -> m ()

-- | An action that when executed will unregister the callbacks. It is
--   returned from <a>addChannels</a> or <a>addChannelsAndWait</a> and
--   typically you would use it in <tt>bracket</tt> to guarantee that you
--   unsubscribe from channels. For example, if you are using websockets to
--   distribute messages to clients, you could use something such as:
--   
--   <pre>
--   websocketConn &lt;- Network.WebSockets.acceptRequest pending
--   let mycallback msg = Network.WebSockets.sendTextData websocketConn msg
--   bracket (addChannelsAndWait ctrl [("hello", mycallback)] []) id $ const $ do
--     {- loop here calling Network.WebSockets.receiveData -}
--   </pre>
type UnregisterCallbacksAction = IO ()

-- | <a>sendRequest</a> can be used to implement commands from experimental
--   versions of Redis. An example of how to implement a command is given
--   below.
--   
--   <pre>
--   -- |Redis DEBUG OBJECT command
--   debugObject :: ByteString -&gt; <a>Redis</a> (Either <a>Reply</a> ByteString)
--   debugObject key = <a>sendRequest</a> ["DEBUG", "OBJECT", key]
--   </pre>
sendRequest :: (RedisCtx m f, RedisResult a) => [ByteString] -> m (f a)

-- | Low-level representation of replies from the Redis server.
data Reply
SingleLine :: ByteString -> Reply
Error :: ByteString -> Reply
Integer :: Integer -> Reply
Bulk :: Maybe ByteString -> Reply
MultiBulk :: Maybe [Reply] -> Reply
data Status
Ok :: Status
Pong :: Status
Status :: ByteString -> Status
class RedisResult a
decode :: RedisResult a => Reply -> Either Reply a
data ConnectionLostException
ConnectionLost :: ConnectionLostException
newtype ConnectTimeout
ConnectTimeout :: ConnectPhase -> ConnectTimeout
data HashSlot

-- | Compute the hashslot associated with a key
keyToSlot :: ByteString -> HashSlot


-- | <a>Database.Redis</a> like interface with connection through Redis
--   Sentinel.
--   
--   More details here: <a>https://redis.io/topics/sentinel</a>.
--   
--   Example:
--   
--   <pre>
--   conn &lt;- <a>connect</a> <tt>SentinelConnectionInfo</tt> (("localhost", PortNumber 26379) :| []) "mymaster" <a>defaultConnectInfo</a>
--   
--   <a>runRedis</a> conn $ do
--     <a>set</a> "hello" "world"
--   </pre>
--   
--   When connection is opened, the Sentinels will be queried to get
--   current master. Subsequent <a>runRedis</a> calls will talk to that
--   master.
--   
--   If <a>runRedis</a> call fails, the next call will choose a new master
--   to talk to.
--   
--   This implementation is based on Gist by Emanuel Borsboom at
--   <a>https://gist.github.com/borsboom/681d37d273d5c4168723</a>
module Database.Redis.Sentinel

-- | Configuration of Sentinel hosts.
data SentinelConnectInfo
SentinelConnectInfo :: NonEmpty (HostName, PortID) -> ByteString -> ConnectInfo -> SentinelConnectInfo

-- | List of sentinels.
[connectSentinels] :: SentinelConnectInfo -> NonEmpty (HostName, PortID)

-- | Name of master to connect to.
[connectMasterName] :: SentinelConnectInfo -> ByteString

-- | This is used to configure auth and other parameters for Redis
--   connection, but <a>connectHost</a> and <a>connectPort</a> are ignored.
[connectBaseInfo] :: SentinelConnectInfo -> ConnectInfo
data SentinelConnection
connect :: SentinelConnectInfo -> IO SentinelConnection

-- | Interact with a Redis datastore. See <a>runRedis</a> for details.
runRedis :: SentinelConnection -> Redis (Either Reply a) -> IO (Either Reply a)

-- | Exception thrown by <a>Database.Redis.Sentinel</a>.
data RedisSentinelException

-- | Thrown if no sentinel can be reached.
NoSentinels :: NonEmpty (HostName, PortID) -> RedisSentinelException
data Message
Message :: ByteString -> Message
[msgChannel, msgMessage] :: Message -> ByteString
PMessage :: ByteString -> Message
[msgPattern, msgChannel, msgMessage] :: Message -> ByteString

-- | Low-level representation of replies from the Redis server.
data Reply
SingleLine :: ByteString -> Reply
Error :: ByteString -> Reply
Integer :: Integer -> Reply
Bulk :: Maybe ByteString -> Reply
MultiBulk :: Maybe [Reply] -> Reply

-- | Context for normal command execution, outside of transactions. Use
--   <tt>runRedis</tt> to run actions of this type.
--   
--   In this context, each result is wrapped in an <a>Either</a> to account
--   for the possibility of Redis returning an <a>Error</a> reply.
data Redis a

-- | This class captures the following behaviour: In a context <tt>m</tt>,
--   a command will return its result wrapped in a "container" of type
--   <tt>f</tt>.
--   
--   Please refer to the Command Type Signatures section of this page for
--   more information.
class (MonadRedis m) => RedisCtx m f | m -> f
returnDecode :: (RedisCtx m f, RedisResult a) => Reply -> m (f a)
class (Monad m) => MonadRedis m
liftRedis :: MonadRedis m => Redis a -> m a
data ConnectError
ConnectAuthError :: Reply -> ConnectError
ConnectSelectError :: Reply -> ConnectError

-- | Information for connnecting to a Redis server.
--   
--   It is recommended to not use the <a>ConnInfo</a> data constructor
--   directly. Instead use <a>defaultConnectInfo</a> 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:
--   
--   <pre>
--   myConnectInfo :: ConnectInfo
--   myConnectInfo = defaultConnectInfo {connectAuth = Just "secret"}
--   </pre>
data ConnectInfo
ConnInfo :: HostName -> PortID -> Maybe ByteString -> Integer -> Int -> NominalDiffTime -> Maybe NominalDiffTime -> Maybe ClientParams -> ConnectInfo

-- | Ignored when <a>connectPort</a> is a <tt>UnixSocket</tt>
[connectHost] :: ConnectInfo -> HostName
[connectPort] :: ConnectInfo -> PortID

-- | When the server is protected by a password, set <a>connectAuth</a> to
--   <a>Just</a> the password. Each connection will then authenticate by
--   the <a>auth</a> command.
[connectAuth] :: ConnectInfo -> Maybe ByteString

-- | Each connection will <a>select</a> the database with the given index.
[connectDatabase] :: ConnectInfo -> Integer

-- | Maximum number of connections to keep open. The smallest acceptable
--   value is 1.
[connectMaxConnections] :: ConnectInfo -> Int

-- | Amount of time for which an unused connection is kept open. The
--   smallest acceptable value is 0.5 seconds. If the <tt>timeout</tt>
--   value in your redis.conf file is non-zero, it should be larger than
--   <a>connectMaxIdleTime</a>.
[connectMaxIdleTime] :: ConnectInfo -> NominalDiffTime

-- | Optional timeout until connection to Redis gets established.
--   <tt>ConnectTimeoutException</tt> gets thrown if no socket get
--   connected in this interval of time.
[connectTimeout] :: ConnectInfo -> Maybe NominalDiffTime

-- | Optional TLS parameters. TLS will be enabled if this is provided.
[connectTLSParams] :: ConnectInfo -> Maybe ClientParams
data PortID
PortNumber :: PortNumber -> PortID
UnixSocket :: String -> PortID

-- | Encapsulates subscription changes. Use <a>subscribe</a>,
--   <a>unsubscribe</a>, <a>psubscribe</a>, <a>punsubscribe</a> or
--   <a>mempty</a> to construct a value. Combine values by using the
--   <a>Monoid</a> interface, i.e. <a>mappend</a> and <a>mconcat</a>.
data PubSub
data Status
Ok :: Status
Pong :: Status
Status :: ByteString -> Status
class RedisResult a
decode :: RedisResult a => Reply -> Either Reply a
data ConnectionLostException
ConnectionLost :: ConnectionLostException
newtype ConnectTimeout
ConnectTimeout :: ConnectPhase -> ConnectTimeout
data HashSlot
data ClusterSlotsResponse
ClusterSlotsResponse :: [ClusterSlotsResponseEntry] -> ClusterSlotsResponse
[clusterSlotsResponseEntries] :: ClusterSlotsResponse -> [ClusterSlotsResponseEntry]
data ClusterSlotsResponseEntry
ClusterSlotsResponseEntry :: Int -> Int -> ClusterSlotsNode -> [ClusterSlotsNode] -> ClusterSlotsResponseEntry
[clusterSlotsResponseEntryStartSlot] :: ClusterSlotsResponseEntry -> Int
[clusterSlotsResponseEntryEndSlot] :: ClusterSlotsResponseEntry -> Int
[clusterSlotsResponseEntryMaster] :: ClusterSlotsResponseEntry -> ClusterSlotsNode
[clusterSlotsResponseEntryReplicas] :: ClusterSlotsResponseEntry -> [ClusterSlotsNode]
data ClusterSlotsNode
ClusterSlotsNode :: ByteString -> Int -> ByteString -> ClusterSlotsNode
[clusterSlotsNodeIP] :: ClusterSlotsNode -> ByteString
[clusterSlotsNodePort] :: ClusterSlotsNode -> Int
[clusterSlotsNodeID] :: ClusterSlotsNode -> ByteString

-- | A Redis channel name
type RedisChannel = ByteString

-- | A Redis pattern channel name
type RedisPChannel = ByteString

-- | A handler for a message from a subscribed channel. The callback is
--   passed the message content.
--   
--   Messages are processed synchronously in the receiving thread, so if
--   the callback takes a long time it will block other callbacks and other
--   messages from being received. If you need to move long-running work to
--   a different thread, we suggest you use <a>TBQueue</a> with a
--   reasonable bound, so that if messages are arriving faster than you can
--   process them, you do eventually block.
--   
--   If the callback throws an exception, the exception will be thrown from
--   <a>pubSubForever</a> which will cause the entire Redis connection for
--   all subscriptions to be closed. As long as you call
--   <a>pubSubForever</a> in a loop you will reconnect to your subscribed
--   channels, but you should probably add an exception handler to each
--   callback to prevent this.
type MessageCallback = ByteString -> IO ()

-- | A handler for a message from a psubscribed channel. The callback is
--   passed the channel the message was sent on plus the message content.
--   
--   Similar to <a>MessageCallback</a>, callbacks are executed
--   synchronously and any exceptions are rethrown from
--   <a>pubSubForever</a>.
type PMessageCallback = RedisChannel -> ByteString -> IO ()

-- | A controller that stores a set of channels, pattern channels, and
--   callbacks. It allows you to manage Pub/Sub subscriptions and pattern
--   subscriptions and alter them at any time throughout the life of your
--   program. You should typically create the controller at the start of
--   your program and then store it through the life of your program, using
--   <a>addChannels</a> and <a>removeChannels</a> to update the current
--   subscriptions.
data PubSubController

-- | An action that when executed will unregister the callbacks. It is
--   returned from <a>addChannels</a> or <a>addChannelsAndWait</a> and
--   typically you would use it in <tt>bracket</tt> to guarantee that you
--   unsubscribe from channels. For example, if you are using websockets to
--   distribute messages to clients, you could use something such as:
--   
--   <pre>
--   websocketConn &lt;- Network.WebSockets.acceptRequest pending
--   let mycallback msg = Network.WebSockets.sendTextData websocketConn msg
--   bracket (addChannelsAndWait ctrl [("hello", mycallback)] []) id $ const $ do
--     {- loop here calling Network.WebSockets.receiveData -}
--   </pre>
type UnregisterCallbacksAction = IO ()

-- | A <a>Queued</a> value represents the result of a command inside a
--   transaction. It is a proxy object for the <i>actual</i> result, which
--   will only be available after returning from a <a>multiExec</a>
--   transaction.
--   
--   <a>Queued</a> values are composable by utilizing the <a>Functor</a>,
--   <a>Applicative</a> or <a>Monad</a> interfaces.
data Queued a

-- | Result of a <a>multiExec</a> transaction.
data TxResult a

-- | Transaction completed successfully. The wrapped value corresponds to
--   the <a>Queued</a> value returned from the <a>multiExec</a> argument
--   action.
TxSuccess :: a -> TxResult a

-- | Transaction aborted due to an earlier <a>watch</a> command.
TxAborted :: TxResult a

-- | At least one of the commands returned an <a>Error</a> reply.
TxError :: String -> TxResult a

-- | Command-context inside of MULTI/EXEC transactions. Use
--   <a>multiExec</a> to run actions of this type.
--   
--   In the <a>RedisTx</a> context, all commands return a <a>Queued</a>
--   value. It is a proxy object for the <i>actual</i> result, which will
--   only be available after finishing the transaction.
data RedisTx a

-- | Options for the <a>migrate</a> command.
data MigrateOpts
MigrateOpts :: Bool -> Bool -> MigrateOpts
[migrateCopy] :: MigrateOpts -> Bool
[migrateReplace] :: MigrateOpts -> Bool
data Cursor
data ScanOpts
ScanOpts :: Maybe ByteString -> Maybe Integer -> ScanOpts
[scanMatch] :: ScanOpts -> Maybe ByteString
[scanCount] :: ScanOpts -> Maybe Integer

-- | Options for the <a>sort</a> command.
data SortOpts
SortOpts :: Maybe ByteString -> (Integer, Integer) -> [ByteString] -> SortOrder -> Bool -> SortOpts
[sortBy] :: SortOpts -> Maybe ByteString
[sortLimit] :: SortOpts -> (Integer, Integer)
[sortGet] :: SortOpts -> [ByteString]
[sortOrder] :: SortOpts -> SortOrder
[sortAlpha] :: SortOpts -> Bool
data SortOrder
Asc :: SortOrder
Desc :: SortOrder
data RedisType
None :: RedisType
String :: RedisType
Hash :: RedisType
List :: RedisType
Set :: RedisType
ZSet :: RedisType
data DebugMode
data ReplyMode

-- | A single entry from the slowlog.
data Slowlog
Slowlog :: Integer -> Integer -> Integer -> [ByteString] -> Maybe ByteString -> Maybe ByteString -> Slowlog

-- | A unique progressive identifier for every slow log entry.
[slowlogId] :: Slowlog -> Integer

-- | The unix timestamp at which the logged command was processed.
[slowlogTimestamp] :: Slowlog -> Integer

-- | The amount of time needed for its execution, in microseconds.
[slowlogMicros] :: Slowlog -> Integer

-- | The command and it's arguments.
[slowlogCmd] :: Slowlog -> [ByteString]
[slowlogClientIpAndPort] :: Slowlog -> Maybe ByteString
[slowlogClientName] :: Slowlog -> Maybe ByteString
data ZaddOpts
ZaddOpts :: Maybe Condition -> Bool -> Bool -> ZaddOpts
[zaddCondition] :: ZaddOpts -> Maybe Condition
[zaddChange] :: ZaddOpts -> Bool
[zaddIncrement] :: ZaddOpts -> Bool
data Aggregate
Sum :: Aggregate
Min :: Aggregate
Max :: Aggregate
data RangeLex a
Incl :: a -> RangeLex a
Excl :: a -> RangeLex a
Minr :: RangeLex a
Maxr :: RangeLex a
data Condition
Nx :: Condition
Xx :: Condition
data SetOpts
SetOpts :: Maybe Integer -> Maybe Integer -> Maybe Condition -> SetOpts
[setSeconds] :: SetOpts -> Maybe Integer
[setMilliseconds] :: SetOpts -> Maybe Integer
[setCondition] :: SetOpts -> Maybe Condition
data XReadOpts
XReadOpts :: Maybe Integer -> Maybe Integer -> XReadOpts
[block] :: XReadOpts -> Maybe Integer
[recordCount] :: XReadOpts -> Maybe Integer
data XReadResponse
XReadResponse :: ByteString -> [StreamsRecord] -> XReadResponse
[stream] :: XReadResponse -> ByteString
[records] :: XReadResponse -> [StreamsRecord]
data StreamsRecord
StreamsRecord :: ByteString -> [(ByteString, ByteString)] -> StreamsRecord
[recordId] :: StreamsRecord -> ByteString
[keyValues] :: StreamsRecord -> [(ByteString, ByteString)]
data TrimOpts
NoArgs :: TrimOpts
Maxlen :: Integer -> TrimOpts
ApproxMaxlen :: Integer -> TrimOpts
data XPendingSummaryResponse
XPendingSummaryResponse :: Integer -> ByteString -> ByteString -> [(ByteString, Integer)] -> XPendingSummaryResponse
[numPendingMessages] :: XPendingSummaryResponse -> Integer
[smallestPendingMessageId] :: XPendingSummaryResponse -> ByteString
[largestPendingMessageId] :: XPendingSummaryResponse -> ByteString
[numPendingMessagesByconsumer] :: XPendingSummaryResponse -> [(ByteString, Integer)]
data XPendingDetailRecord
XPendingDetailRecord :: ByteString -> ByteString -> Integer -> Integer -> XPendingDetailRecord
[messageId] :: XPendingDetailRecord -> ByteString
[consumer] :: XPendingDetailRecord -> ByteString
[millisSinceLastDelivered] :: XPendingDetailRecord -> Integer
[numTimesDelivered] :: XPendingDetailRecord -> Integer
data XClaimOpts
XClaimOpts :: Maybe Integer -> Maybe Integer -> Maybe Integer -> Bool -> XClaimOpts
[xclaimIdle] :: XClaimOpts -> Maybe Integer
[xclaimTime] :: XClaimOpts -> Maybe Integer
[xclaimRetryCount] :: XClaimOpts -> Maybe Integer
[xclaimForce] :: XClaimOpts -> Bool
data XInfoConsumersResponse
XInfoConsumersResponse :: ByteString -> Integer -> Integer -> XInfoConsumersResponse
[xinfoConsumerName] :: XInfoConsumersResponse -> ByteString
[xinfoConsumerNumPendingMessages] :: XInfoConsumersResponse -> Integer
[xinfoConsumerIdleTime] :: XInfoConsumersResponse -> Integer
data XInfoGroupsResponse
XInfoGroupsResponse :: ByteString -> Integer -> Integer -> ByteString -> XInfoGroupsResponse
[xinfoGroupsGroupName] :: XInfoGroupsResponse -> ByteString
[xinfoGroupsNumConsumers] :: XInfoGroupsResponse -> Integer
[xinfoGroupsNumPendingMessages] :: XInfoGroupsResponse -> Integer
[xinfoGroupsLastDeliveredMessageId] :: XInfoGroupsResponse -> ByteString
data XInfoStreamResponse
XInfoStreamResponse :: Integer -> Integer -> Integer -> Integer -> ByteString -> StreamsRecord -> StreamsRecord -> XInfoStreamResponse
[xinfoStreamLength] :: XInfoStreamResponse -> Integer
[xinfoStreamRadixTreeKeys] :: XInfoStreamResponse -> Integer
[xinfoStreamRadixTreeNodes] :: XInfoStreamResponse -> Integer
[xinfoStreamNumGroups] :: XInfoStreamResponse -> Integer
[xinfoStreamLastEntryId] :: XInfoStreamResponse -> ByteString
[xinfoStreamFirstEntry] :: XInfoStreamResponse -> StreamsRecord
[xinfoStreamLastEntry] :: XInfoStreamResponse -> StreamsRecord
XInfoStreamEmptyResponse :: Integer -> Integer -> Integer -> Integer -> ByteString -> XInfoStreamResponse
[xinfoStreamLength] :: XInfoStreamResponse -> Integer
[xinfoStreamRadixTreeKeys] :: XInfoStreamResponse -> Integer
[xinfoStreamRadixTreeNodes] :: XInfoStreamResponse -> Integer
[xinfoStreamNumGroups] :: XInfoStreamResponse -> Integer
[xinfoStreamLastEntryId] :: XInfoStreamResponse -> ByteString
data ClusterNodesResponse
ClusterNodesResponse :: [ClusterNodesResponseEntry] -> ClusterNodesResponse
[clusterNodesResponseEntries] :: ClusterNodesResponse -> [ClusterNodesResponseEntry]
data ClusterNodesResponseEntry
ClusterNodesResponseEntry :: ByteString -> ByteString -> Integer -> [ByteString] -> Maybe ByteString -> Integer -> Integer -> Integer -> ByteString -> [ClusterNodesResponseSlotSpec] -> ClusterNodesResponseEntry
[clusterNodesResponseNodeId] :: ClusterNodesResponseEntry -> ByteString
[clusterNodesResponseNodeIp] :: ClusterNodesResponseEntry -> ByteString
[clusterNodesResponseNodePort] :: ClusterNodesResponseEntry -> Integer
[clusterNodesResponseNodeFlags] :: ClusterNodesResponseEntry -> [ByteString]
[clusterNodesResponseMasterId] :: ClusterNodesResponseEntry -> Maybe ByteString
[clusterNodesResponsePingSent] :: ClusterNodesResponseEntry -> Integer
[clusterNodesResponsePongReceived] :: ClusterNodesResponseEntry -> Integer
[clusterNodesResponseConfigEpoch] :: ClusterNodesResponseEntry -> Integer
[clusterNodesResponseLinkState] :: ClusterNodesResponseEntry -> ByteString
[clusterNodesResponseSlots] :: ClusterNodesResponseEntry -> [ClusterNodesResponseSlotSpec]
data ClusterNodesResponseSlotSpec
ClusterNodesResponseSingleSlot :: Integer -> ClusterNodesResponseSlotSpec
ClusterNodesResponseSlotRange :: Integer -> Integer -> ClusterNodesResponseSlotSpec
ClusterNodesResponseSlotImporting :: Integer -> ByteString -> ClusterNodesResponseSlotSpec
ClusterNodesResponseSlotMigrating :: Integer -> ByteString -> ClusterNodesResponseSlotSpec
time :: RedisCtx m f => m (f (Integer, Integer))
wait :: RedisCtx m f => Integer -> Integer -> m (f Integer)
get :: RedisCtx m f => ByteString -> m (f (Maybe ByteString))
sort :: RedisCtx m f => ByteString -> SortOpts -> m (f [ByteString])
migrate :: RedisCtx m f => ByteString -> ByteString -> ByteString -> Integer -> Integer -> m (f Status)
append :: RedisCtx m f => ByteString -> ByteString -> m (f Integer)
bitcount :: RedisCtx m f => ByteString -> m (f Integer)
keys :: RedisCtx m f => ByteString -> m (f [ByteString])
scan :: RedisCtx m f => Cursor -> m (f (Cursor, [ByteString]))
select :: RedisCtx m f => Integer -> m (f Status)
rename :: RedisCtx m f => ByteString -> ByteString -> m (f Status)
set :: RedisCtx m f => ByteString -> ByteString -> m (f Status)
move :: RedisCtx m f => ByteString -> Integer -> m (f Bool)

-- | Deconstruct Redis constructor.
--   
--   <a>unRedis</a> and <a>reRedis</a> can be used to define instances for
--   arbitrary typeclasses.
--   
--   WARNING! These functions are considered internal and no guarantee is
--   given at this point that they will not break in future.
unRedis :: Redis a -> ReaderT RedisEnv IO a

-- | Reconstruct Redis constructor.
reRedis :: ReaderT RedisEnv IO a -> Redis a

-- | Constructs a <a>Connection</a> pool to a Redis server designated by
--   the given <a>ConnectInfo</a>, then tests if the server is actually
--   there. Throws an exception if the connection to the Redis server can't
--   be established.
checkedConnect :: ConnectInfo -> IO Connection

-- | Destroy all idle resources in the pool.
disconnect :: Connection -> IO ()

-- | Memory bracket around <a>connect</a> and <a>disconnect</a>.
withConnect :: (MonadMask m, MonadIO m) => ConnectInfo -> (Connection -> m c) -> m c

-- | Memory bracket around <a>checkedConnect</a> and <a>disconnect</a>
withCheckedConnect :: ConnectInfo -> (Connection -> IO c) -> IO c

-- | Default information for connecting:
--   
--   <pre>
--   connectHost           = "localhost"
--   connectPort           = PortNumber 6379 -- Redis default port
--   connectAuth           = Nothing         -- No password
--   connectDatabase       = 0               -- SELECT database 0
--   connectMaxConnections = 50              -- Up to 50 connections
--   connectMaxIdleTime    = 30              -- Keep open for 30 seconds
--   connectTimeout        = Nothing         -- Don't add timeout logic
--   connectTLSParams      = Nothing         -- Do not use TLS
--   </pre>
defaultConnectInfo :: ConnectInfo

-- | Parse a <tt><a>ConnectInfo</a></tt> from a URL
--   
--   Username is ignored, path is used to specify the database:
--   
--   <pre>
--   &gt;&gt;&gt; parseConnectInfo "redis://username:password@host:42/2"
--   Right (ConnInfo {connectHost = "host", connectPort = PortNumber 42, connectAuth = Just "password", connectDatabase = 2, connectMaxConnections = 50, connectMaxIdleTime = 30s, connectTimeout = Nothing, connectTLSParams = Nothing})
--   </pre>
--   
--   <pre>
--   &gt;&gt;&gt; parseConnectInfo "redis://username:password@host:42/db"
--   Left "Invalid port: db"
--   </pre>
--   
--   The scheme is validated, to prevent mixing up configurations:
--   
--   <pre>
--   &gt;&gt;&gt; parseConnectInfo "postgres://"
--   Left "Wrong scheme"
--   </pre>
--   
--   Beyond that, all values are optional. Omitted values are taken from
--   <tt><a>defaultConnectInfo</a></tt>:
--   
--   <pre>
--   &gt;&gt;&gt; parseConnectInfo "redis://"
--   Right (ConnInfo {connectHost = "localhost", connectPort = PortNumber 6379, connectAuth = Nothing, connectDatabase = 0, connectMaxConnections = 50, connectMaxIdleTime = 30s, connectTimeout = Nothing, connectTLSParams = Nothing})
--   </pre>
parseConnectInfo :: String -> Either String ConnectInfo

-- | Constructs a <a>ShardMap</a> of connections to clustered nodes. The
--   argument is a <a>ConnectInfo</a> for any node in the cluster
--   
--   Some Redis commands are currently not supported in cluster mode -
--   CONFIG, AUTH - SCAN - MOVE, SELECT - PUBLISH, SUBSCRIBE, PSUBSCRIBE,
--   UNSUBSCRIBE, PUNSUBSCRIBE, RESET
connectCluster :: ConnectInfo -> IO Connection

-- | <a>sendRequest</a> can be used to implement commands from experimental
--   versions of Redis. An example of how to implement a command is given
--   below.
--   
--   <pre>
--   -- |Redis DEBUG OBJECT command
--   debugObject :: ByteString -&gt; <a>Redis</a> (Either <a>Reply</a> ByteString)
--   debugObject key = <a>sendRequest</a> ["DEBUG", "OBJECT", key]
--   </pre>
sendRequest :: (RedisCtx m f, RedisResult a) => [ByteString] -> m (f a)

-- | Compute the hashslot associated with a key
keyToSlot :: ByteString -> HashSlot
ping :: RedisCtx m f => m (f Status)
auth :: RedisCtx m f => ByteString -> m (f Status)
clusterSlots :: RedisCtx m f => m (f ClusterSlotsResponse)
command :: RedisCtx m f => m (f [CommandInfo])

-- | Post a message to a channel (<a>http://redis.io/commands/publish</a>).
publish :: RedisCtx m f => ByteString -> ByteString -> m (f Integer)

-- | Listens to published messages on subscribed channels and channels
--   matching the subscribed patterns. For documentation on the semantics
--   of Redis Pub/Sub see <a>http://redis.io/topics/pubsub</a>.
--   
--   The given callback function is called for each received message.
--   Subscription changes are triggered by the returned <a>PubSub</a>. To
--   keep subscriptions unchanged, the callback can return <a>mempty</a>.
--   
--   Example: Subscribe to the "news" channel indefinitely.
--   
--   <pre>
--   pubSub (subscribe ["news"]) $ \msg -&gt; do
--       putStrLn $ "Message from " ++ show (msgChannel msg)
--       return mempty
--   
--   </pre>
--   
--   Example: Receive a single message from the "chat" channel.
--   
--   <pre>
--   pubSub (subscribe ["chat"]) $ \msg -&gt; do
--       putStrLn $ "Message from " ++ show (msgChannel msg)
--       return $ unsubscribe ["chat"]
--   
--   </pre>
--   
--   It should be noted that Redis Pub/Sub by its nature is asynchronous so
--   returning <a>unsubscribe</a> does not mean that callback won't be able
--   to receive any further messages. And to guarantee that you won't won't
--   process messages after unsubscription and won't unsubscribe from the
--   same channel more than once you need to use <tt>IORef</tt> or
--   something similar
pubSub :: PubSub -> (Message -> IO PubSub) -> Redis ()

-- | Listen for messages published to the given channels
--   (<a>http://redis.io/commands/subscribe</a>).
subscribe :: [ByteString] -> PubSub

-- | Stop listening for messages posted to the given channels
--   (<a>http://redis.io/commands/unsubscribe</a>).
unsubscribe :: [ByteString] -> PubSub

-- | Listen for messages published to channels matching the given patterns
--   (<a>http://redis.io/commands/psubscribe</a>).
psubscribe :: [ByteString] -> PubSub

-- | Stop listening for messages posted to channels matching the given
--   patterns (<a>http://redis.io/commands/punsubscribe</a>).
punsubscribe :: [ByteString] -> PubSub

-- | Open a connection to the Redis server, register to all channels in the
--   <a>PubSubController</a>, and process messages and subscription change
--   requests forever. The only way this will ever exit is if there is an
--   exception from the network code or an unhandled exception in a
--   <a>MessageCallback</a> or <a>PMessageCallback</a>. For example, if the
--   network connection to Redis dies, <a>pubSubForever</a> will throw a
--   <tt>ConnectionLost</tt>. When such an exception is thrown, you can
--   recall <a>pubSubForever</a> with the same <a>PubSubController</a>
--   which will open a new connection and resubscribe to all the channels
--   which are tracked in the <a>PubSubController</a>.
--   
--   The general pattern is therefore during program startup create a
--   <a>PubSubController</a> and fork a thread which calls
--   <a>pubSubForever</a> in a loop (using an exponential backoff algorithm
--   such as the <a>retry</a> package to not hammer the Redis server if it
--   does die). For example,
--   
--   <pre>
--   myhandler :: ByteString -&gt; IO ()
--   myhandler msg = putStrLn $ unpack $ decodeUtf8 msg
--   
--   onInitialComplete :: IO ()
--   onInitialComplete = putStrLn "Redis acknowledged that mychannel is now subscribed"
--   
--   main :: IO ()
--   main = do
--     conn &lt;- connect defaultConnectInfo
--     pubSubCtrl &lt;- newPubSubController [("mychannel", myhandler)] []
--     concurrently ( forever $
--         pubSubForever conn pubSubCtrl onInitialComplete
--           `catch` (\(e :: SomeException) -&gt; do
--             putStrLn $ "Got error: " ++ show e
--             threadDelay $ 50*1000) -- TODO: use exponential backoff
--          ) $ restOfYourProgram
--   
--   
--     {- elsewhere in your program, use pubSubCtrl to change subscriptions -}
--   </pre>
--   
--   At most one active <a>pubSubForever</a> can be running against a
--   single <a>PubSubController</a> at any time. If two active calls to
--   <a>pubSubForever</a> share a single <a>PubSubController</a> there will
--   be deadlocks. If you do want to process messages using multiple
--   connections to Redis, you can create more than one
--   <a>PubSubController</a>. For example, create one PubSubController for
--   each <a>getNumCapabilities</a> and then create a Haskell thread bound
--   to each capability each calling <a>pubSubForever</a> in a loop. This
--   will create one network connection per controller/capability and allow
--   you to register separate channels and callbacks for each controller,
--   spreading the load across the capabilities.
pubSubForever :: Connection -> PubSubController -> IO () -> IO ()

-- | Create a new <a>PubSubController</a>. Note that this does not
--   subscribe to any channels, it just creates the controller. The
--   subscriptions will happen once <a>pubSubForever</a> is called.
newPubSubController :: MonadIO m => [(RedisChannel, MessageCallback)] -> [(RedisPChannel, PMessageCallback)] -> m PubSubController

-- | Get the list of current channels in the <a>PubSubController</a>.
--   WARNING! This might not exactly reflect the subscribed channels in the
--   Redis server, because there is a delay between adding or removing a
--   channel in the <a>PubSubController</a> and when Redis receives and
--   processes the subscription change request.
currentChannels :: MonadIO m => PubSubController -> m [RedisChannel]

-- | Get the list of current pattern channels in the
--   <a>PubSubController</a>. WARNING! This might not exactly reflect the
--   subscribed channels in the Redis server, because there is a delay
--   between adding or removing a channel in the <a>PubSubController</a>
--   and when Redis receives and processes the subscription change request.
currentPChannels :: MonadIO m => PubSubController -> m [RedisPChannel]

-- | Add channels into the <a>PubSubController</a>, and if there is an
--   active <a>pubSubForever</a>, send the subscribe and psubscribe
--   commands to Redis. The <a>addChannels</a> function is thread-safe.
--   This function does not wait for Redis to acknowledge that the channels
--   have actually been subscribed; use <a>addChannelsAndWait</a> for that.
--   
--   You can subscribe to the same channel or pattern channel multiple
--   times; the <a>PubSubController</a> keeps a list of callbacks and
--   executes each callback in response to a message.
--   
--   The return value is an action <a>UnregisterCallbacksAction</a> which
--   will unregister the callbacks, which should typically used with
--   <tt>bracket</tt>.
addChannels :: MonadIO m => PubSubController -> [(RedisChannel, MessageCallback)] -> [(RedisPChannel, PMessageCallback)] -> m UnregisterCallbacksAction

-- | Call <a>addChannels</a> and then wait for Redis to acknowledge that
--   the channels are actually subscribed.
--   
--   Note that this function waits for all pending subscription change
--   requests, so if you for example call <a>addChannelsAndWait</a> from
--   multiple threads simultaneously, they all will wait for all pending
--   subscription changes to be acknowledged by Redis (this is due to the
--   fact that we just track the total number of pending change requests
--   sent to Redis and just wait until that count reaches zero).
--   
--   This also correctly waits if the network connection dies during the
--   subscription change. Say that the network connection dies right after
--   we send a subscription change to Redis. <a>pubSubForever</a> will
--   throw <tt>ConnectionLost</tt> and <a>addChannelsAndWait</a> will
--   continue to wait. Once you recall <a>pubSubForever</a> with the same
--   <a>PubSubController</a>, <a>pubSubForever</a> will open a new
--   connection, send subscription commands for all channels in the
--   <a>PubSubController</a> (which include the ones we are waiting for),
--   and wait for the responses from Redis. Only once we receive the
--   response from Redis that it has subscribed to all channels in
--   <a>PubSubController</a> will <a>addChannelsAndWait</a> unblock and
--   return.
addChannelsAndWait :: MonadIO m => PubSubController -> [(RedisChannel, MessageCallback)] -> [(RedisPChannel, PMessageCallback)] -> m UnregisterCallbacksAction

-- | Remove channels from the <a>PubSubController</a>, and if there is an
--   active <a>pubSubForever</a>, send the unsubscribe commands to Redis.
--   Note that as soon as this function returns, no more callbacks will be
--   executed even if more messages arrive during the period when we
--   request to unsubscribe from the channel and Redis actually processes
--   the unsubscribe request. This function is thread-safe.
--   
--   If you remove all channels, the connection in <a>pubSubForever</a> to
--   redis will stay open and waiting for any new channels from a call to
--   <a>addChannels</a>. If you really want to close the connection, use
--   <a>killThread</a> or <a>cancel</a> to kill the thread running
--   <a>pubSubForever</a>.
removeChannels :: MonadIO m => PubSubController -> [RedisChannel] -> [RedisPChannel] -> m ()

-- | Call <a>removeChannels</a> and then wait for all pending subscription
--   change requests to be acknowledged by Redis. This uses the same
--   waiting logic as <a>addChannelsAndWait</a>. Since
--   <a>removeChannels</a> immediately notifies the <a>PubSubController</a>
--   to start discarding messages, you likely don't need this function and
--   can just use <a>removeChannels</a>.
removeChannelsAndWait :: MonadIO m => PubSubController -> [RedisChannel] -> [RedisPChannel] -> m ()

-- | Watch the given keys to determine execution of the MULTI/EXEC block
--   (<a>http://redis.io/commands/watch</a>).
watch :: [ByteString] -> Redis (Either Reply Status)

-- | Forget about all watched keys
--   (<a>http://redis.io/commands/unwatch</a>).
unwatch :: Redis (Either Reply Status)

-- | Run commands inside a transaction. For documentation on the semantics
--   of Redis transaction see <a>http://redis.io/topics/transactions</a>.
--   
--   Inside the transaction block, command functions return their result
--   wrapped in a <a>Queued</a>. The <a>Queued</a> result is a proxy object
--   for the actual command's result, which will only be available after
--   <tt>EXEC</tt>ing the transaction.
--   
--   Example usage (note how <a>Queued</a> 's <a>Applicative</a> instance
--   is used to combine the two individual results):
--   
--   <pre>
--   runRedis conn $ do
--       set "hello" "hello"
--       set "world" "world"
--       helloworld &lt;- <a>multiExec</a> $ do
--           hello &lt;- get "hello"
--           world &lt;- get "world"
--           return $ (,) &lt;$&gt; hello &lt;*&gt; world
--       liftIO (print helloworld)
--   
--   </pre>
multiExec :: RedisTx (Queued a) -> Redis (TxResult a)
echo :: RedisCtx m f => ByteString -> m (f ByteString)
quit :: RedisCtx m f => m (f Status)
del :: RedisCtx m f => [ByteString] -> m (f Integer)
dump :: RedisCtx m f => ByteString -> m (f ByteString)
exists :: RedisCtx m f => ByteString -> m (f Bool)
expire :: RedisCtx m f => ByteString -> Integer -> m (f Bool)
expireat :: RedisCtx m f => ByteString -> Integer -> m (f Bool)

-- | Redis default <a>MigrateOpts</a>. Equivalent to omitting all optional
--   parameters.
--   
--   <pre>
--   MigrateOpts
--       { migrateCopy    = False -- remove the key from the local instance
--       , migrateReplace = False -- don't replace existing key on the remote instance
--       }
--   </pre>
defaultMigrateOpts :: MigrateOpts
migrateMultiple :: RedisCtx m f => ByteString -> ByteString -> Integer -> Integer -> MigrateOpts -> [ByteString] -> m (f Status)
objectRefcount :: RedisCtx m f => ByteString -> m (f Integer)
objectEncoding :: RedisCtx m f => ByteString -> m (f ByteString)
objectIdletime :: RedisCtx m f => ByteString -> m (f Integer)
persist :: RedisCtx m f => ByteString -> m (f Bool)
pexpire :: RedisCtx m f => ByteString -> Integer -> m (f Bool)
pexpireat :: RedisCtx m f => ByteString -> Integer -> m (f Bool)
pttl :: RedisCtx m f => ByteString -> m (f Integer)
randomkey :: RedisCtx m f => m (f (Maybe ByteString))
renamenx :: RedisCtx m f => ByteString -> ByteString -> m (f Bool)
restore :: RedisCtx m f => ByteString -> Integer -> ByteString -> m (f Status)
restoreReplace :: RedisCtx m f => ByteString -> Integer -> ByteString -> m (f Status)
cursor0 :: Cursor

-- | Redis default <a>ScanOpts</a>. Equivalent to omitting all optional
--   parameters.
--   
--   <pre>
--   ScanOpts
--       { scanMatch = Nothing -- don't match any pattern
--       , scanCount = Nothing -- don't set any requirements on number elements returned (works like value <tt>COUNT 10</tt>)
--       }
--   </pre>
defaultScanOpts :: ScanOpts
scanOpts :: RedisCtx m f => Cursor -> ScanOpts -> m (f (Cursor, [ByteString]))

-- | Redis default <a>SortOpts</a>. Equivalent to omitting all optional
--   parameters.
--   
--   <pre>
--   SortOpts
--       { sortBy    = Nothing -- omit the BY option
--       , sortLimit = (0,-1)  -- return entire collection
--       , sortGet   = []      -- omit the GET option
--       , sortOrder = Asc     -- sort in ascending order
--       , sortAlpha = False   -- sort numerically, not lexicographically
--       }
--   </pre>
defaultSortOpts :: SortOpts
sortStore :: RedisCtx m f => ByteString -> ByteString -> SortOpts -> m (f Integer)
ttl :: RedisCtx m f => ByteString -> m (f Integer)
getType :: RedisCtx m f => ByteString -> m (f RedisType)
hdel :: RedisCtx m f => ByteString -> [ByteString] -> m (f Integer)
hexists :: RedisCtx m f => ByteString -> ByteString -> m (f Bool)
hget :: RedisCtx m f => ByteString -> ByteString -> m (f (Maybe ByteString))
hgetall :: RedisCtx m f => ByteString -> m (f [(ByteString, ByteString)])
hincrby :: RedisCtx m f => ByteString -> ByteString -> Integer -> m (f Integer)
hincrbyfloat :: RedisCtx m f => ByteString -> ByteString -> Double -> m (f Double)
hkeys :: RedisCtx m f => ByteString -> m (f [ByteString])
hlen :: RedisCtx m f => ByteString -> m (f Integer)
hmget :: RedisCtx m f => ByteString -> [ByteString] -> m (f [Maybe ByteString])
hmset :: RedisCtx m f => ByteString -> [(ByteString, ByteString)] -> m (f Status)
hscan :: RedisCtx m f => ByteString -> Cursor -> m (f (Cursor, [(ByteString, ByteString)]))
hscanOpts :: RedisCtx m f => ByteString -> Cursor -> ScanOpts -> m (f (Cursor, [(ByteString, ByteString)]))
hset :: RedisCtx m f => ByteString -> ByteString -> ByteString -> m (f Integer)
hsetnx :: RedisCtx m f => ByteString -> ByteString -> ByteString -> m (f Bool)
hstrlen :: RedisCtx m f => ByteString -> ByteString -> m (f Integer)
hvals :: RedisCtx m f => ByteString -> m (f [ByteString])
pfadd :: RedisCtx m f => ByteString -> [ByteString] -> m (f Integer)
pfcount :: RedisCtx m f => [ByteString] -> m (f Integer)
pfmerge :: RedisCtx m f => ByteString -> [ByteString] -> m (f ByteString)
blpop :: RedisCtx m f => [ByteString] -> Integer -> m (f (Maybe (ByteString, ByteString)))
brpop :: RedisCtx m f => [ByteString] -> Integer -> m (f (Maybe (ByteString, ByteString)))
brpoplpush :: RedisCtx m f => ByteString -> ByteString -> Integer -> m (f (Maybe ByteString))
lindex :: RedisCtx m f => ByteString -> Integer -> m (f (Maybe ByteString))
linsertBefore :: RedisCtx m f => ByteString -> ByteString -> ByteString -> m (f Integer)
linsertAfter :: RedisCtx m f => ByteString -> ByteString -> ByteString -> m (f Integer)
llen :: RedisCtx m f => ByteString -> m (f Integer)
lpop :: RedisCtx m f => ByteString -> m (f (Maybe ByteString))
lpush :: RedisCtx m f => ByteString -> [ByteString] -> m (f Integer)
lpushx :: RedisCtx m f => ByteString -> ByteString -> m (f Integer)
lrange :: RedisCtx m f => ByteString -> Integer -> Integer -> m (f [ByteString])
lrem :: RedisCtx m f => ByteString -> Integer -> ByteString -> m (f Integer)
lset :: RedisCtx m f => ByteString -> Integer -> ByteString -> m (f Status)
ltrim :: RedisCtx m f => ByteString -> Integer -> Integer -> m (f Status)
rpop :: RedisCtx m f => ByteString -> m (f (Maybe ByteString))
rpoplpush :: RedisCtx m f => ByteString -> ByteString -> m (f (Maybe ByteString))
rpush :: RedisCtx m f => ByteString -> [ByteString] -> m (f Integer)
rpushx :: RedisCtx m f => ByteString -> ByteString -> m (f Integer)
eval :: (RedisCtx m f, RedisResult a) => ByteString -> [ByteString] -> [ByteString] -> m (f a)

-- | Works like <a>eval</a>, but sends the SHA1 hash of the script instead
--   of the script itself. Fails if the server does not recognise the hash,
--   in which case, <a>eval</a> should be used instead.
evalsha :: (RedisCtx m f, RedisResult a) => ByteString -> [ByteString] -> [ByteString] -> m (f a)
scriptDebug :: RedisCtx m f => DebugMode -> m (f Bool)
scriptExists :: RedisCtx m f => [ByteString] -> m (f [Bool])
scriptFlush :: RedisCtx m f => m (f Status)
scriptKill :: RedisCtx m f => m (f Status)
scriptLoad :: RedisCtx m f => ByteString -> m (f ByteString)
bgrewriteaof :: RedisCtx m f => m (f Status)
bgsave :: RedisCtx m f => m (f Status)
clientGetname :: RedisCtx m f => m (f Status)
clientList :: RedisCtx m f => m (f [ByteString])
clientPause :: RedisCtx m f => Integer -> m (f Status)
clientReply :: RedisCtx m f => ReplyMode -> m (f Bool)
clientSetname :: RedisCtx m f => ByteString -> m (f ByteString)
commandCount :: RedisCtx m f => m (f Integer)
commandInfo :: RedisCtx m f => [ByteString] -> m (f [ByteString])
configGet :: RedisCtx m f => ByteString -> m (f [(ByteString, ByteString)])
configResetstat :: RedisCtx m f => m (f Status)
configRewrite :: RedisCtx m f => m (f Status)
configSet :: RedisCtx m f => ByteString -> ByteString -> m (f Status)
dbsize :: RedisCtx m f => m (f Integer)
debugObject :: RedisCtx m f => ByteString -> m (f ByteString)
flushall :: RedisCtx m f => m (f Status)
flushdb :: RedisCtx m f => m (f Status)
info :: RedisCtx m f => m (f ByteString)
infoSection :: RedisCtx m f => ByteString -> m (f ByteString)
lastsave :: RedisCtx m f => m (f Integer)
save :: RedisCtx m f => m (f Status)
slaveof :: RedisCtx m f => ByteString -> ByteString -> m (f Status)
slowlogGet :: RedisCtx m f => Integer -> m (f [Slowlog])
slowlogLen :: RedisCtx m f => m (f Integer)
slowlogReset :: RedisCtx m f => m (f Status)
sadd :: RedisCtx m f => ByteString -> [ByteString] -> m (f Integer)
scard :: RedisCtx m f => ByteString -> m (f Integer)
sdiff :: RedisCtx m f => [ByteString] -> m (f [ByteString])
sdiffstore :: RedisCtx m f => ByteString -> [ByteString] -> m (f Integer)
sinter :: RedisCtx m f => [ByteString] -> m (f [ByteString])
sinterstore :: RedisCtx m f => ByteString -> [ByteString] -> m (f Integer)
sismember :: RedisCtx m f => ByteString -> ByteString -> m (f Bool)
smembers :: RedisCtx m f => ByteString -> m (f [ByteString])
smove :: RedisCtx m f => ByteString -> ByteString -> ByteString -> m (f Bool)
spop :: RedisCtx m f => ByteString -> m (f (Maybe ByteString))
spopN :: RedisCtx m f => ByteString -> Integer -> m (f [ByteString])
srandmember :: RedisCtx m f => ByteString -> m (f (Maybe ByteString))
srandmemberN :: RedisCtx m f => ByteString -> Integer -> m (f [ByteString])
srem :: RedisCtx m f => ByteString -> [ByteString] -> m (f Integer)
sscan :: RedisCtx m f => ByteString -> Cursor -> m (f (Cursor, [ByteString]))
sscanOpts :: RedisCtx m f => ByteString -> Cursor -> ScanOpts -> m (f (Cursor, [ByteString]))
sunion :: RedisCtx m f => [ByteString] -> m (f [ByteString])
sunionstore :: RedisCtx m f => ByteString -> [ByteString] -> m (f Integer)

-- | Redis default <a>ZaddOpts</a>. Equivalent to omitting all optional
--   parameters.
--   
--   <pre>
--   ZaddOpts
--       { zaddCondition = Nothing -- omit NX and XX options
--       , zaddChange    = False   -- don't modify the return value from the number of new elements added, to the total number of elements changed
--       , zaddIncrement = False   -- don't add like ZINCRBY
--       }
--   </pre>
defaultZaddOpts :: ZaddOpts
zadd :: RedisCtx m f => ByteString -> [(Double, ByteString)] -> m (f Integer)
zaddOpts :: RedisCtx m f => ByteString -> [(Double, ByteString)] -> ZaddOpts -> m (f Integer)
zcard :: RedisCtx m f => ByteString -> m (f Integer)
zcount :: RedisCtx m f => ByteString -> Double -> Double -> m (f Integer)
zincrby :: RedisCtx m f => ByteString -> Integer -> ByteString -> m (f Double)
zinterstore :: RedisCtx m f => ByteString -> [ByteString] -> Aggregate -> m (f Integer)
zinterstoreWeights :: RedisCtx m f => ByteString -> [(ByteString, Double)] -> Aggregate -> m (f Integer)
zlexcount :: RedisCtx m f => ByteString -> ByteString -> ByteString -> m (f Integer)
zrange :: RedisCtx m f => ByteString -> Integer -> Integer -> m (f [ByteString])
zrangeWithscores :: RedisCtx m f => ByteString -> Integer -> Integer -> m (f [(ByteString, Double)])
zrangebylex :: RedisCtx m f => ByteString -> RangeLex ByteString -> RangeLex ByteString -> m (f [ByteString])
zrangebylexLimit :: RedisCtx m f => ByteString -> RangeLex ByteString -> RangeLex ByteString -> Integer -> Integer -> m (f [ByteString])
zrangebyscore :: RedisCtx m f => ByteString -> Double -> Double -> m (f [ByteString])
zrangebyscoreWithscores :: RedisCtx m f => ByteString -> Double -> Double -> m (f [(ByteString, Double)])
zrangebyscoreLimit :: RedisCtx m f => ByteString -> Double -> Double -> Integer -> Integer -> m (f [ByteString])
zrangebyscoreWithscoresLimit :: RedisCtx m f => ByteString -> Double -> Double -> Integer -> Integer -> m (f [(ByteString, Double)])
zrank :: RedisCtx m f => ByteString -> ByteString -> m (f (Maybe Integer))
zrem :: RedisCtx m f => ByteString -> [ByteString] -> m (f Integer)
zremrangebylex :: RedisCtx m f => ByteString -> ByteString -> ByteString -> m (f Integer)
zremrangebyrank :: RedisCtx m f => ByteString -> Integer -> Integer -> m (f Integer)
zremrangebyscore :: RedisCtx m f => ByteString -> Double -> Double -> m (f Integer)
zrevrange :: RedisCtx m f => ByteString -> Integer -> Integer -> m (f [ByteString])
zrevrangeWithscores :: RedisCtx m f => ByteString -> Integer -> Integer -> m (f [(ByteString, Double)])
zrevrangebyscore :: RedisCtx m f => ByteString -> Double -> Double -> m (f [ByteString])
zrevrangebyscoreWithscores :: RedisCtx m f => ByteString -> Double -> Double -> m (f [(ByteString, Double)])
zrevrangebyscoreLimit :: RedisCtx m f => ByteString -> Double -> Double -> Integer -> Integer -> m (f [ByteString])
zrevrangebyscoreWithscoresLimit :: RedisCtx m f => ByteString -> Double -> Double -> Integer -> Integer -> m (f [(ByteString, Double)])
zrevrank :: RedisCtx m f => ByteString -> ByteString -> m (f (Maybe Integer))
zscan :: RedisCtx m f => ByteString -> Cursor -> m (f (Cursor, [(ByteString, Double)]))
zscanOpts :: RedisCtx m f => ByteString -> Cursor -> ScanOpts -> m (f (Cursor, [(ByteString, Double)]))
zscore :: RedisCtx m f => ByteString -> ByteString -> m (f (Maybe Double))
zunionstore :: RedisCtx m f => ByteString -> [ByteString] -> Aggregate -> m (f Integer)
zunionstoreWeights :: RedisCtx m f => ByteString -> [(ByteString, Double)] -> Aggregate -> m (f Integer)
bitcountRange :: RedisCtx m f => ByteString -> Integer -> Integer -> m (f Integer)
bitopAnd :: RedisCtx m f => ByteString -> [ByteString] -> m (f Integer)
bitopOr :: RedisCtx m f => ByteString -> [ByteString] -> m (f Integer)
bitopXor :: RedisCtx m f => ByteString -> [ByteString] -> m (f Integer)
bitopNot :: RedisCtx m f => ByteString -> ByteString -> m (f Integer)
bitpos :: RedisCtx m f => ByteString -> Integer -> Integer -> Integer -> m (f Integer)
decr :: RedisCtx m f => ByteString -> m (f Integer)
decrby :: RedisCtx m f => ByteString -> Integer -> m (f Integer)
getbit :: RedisCtx m f => ByteString -> Integer -> m (f Integer)
getrange :: RedisCtx m f => ByteString -> Integer -> Integer -> m (f ByteString)
getset :: RedisCtx m f => ByteString -> ByteString -> m (f (Maybe ByteString))
incr :: RedisCtx m f => ByteString -> m (f Integer)
incrby :: RedisCtx m f => ByteString -> Integer -> m (f Integer)
incrbyfloat :: RedisCtx m f => ByteString -> Double -> m (f Double)
mget :: RedisCtx m f => [ByteString] -> m (f [Maybe ByteString])
mset :: RedisCtx m f => [(ByteString, ByteString)] -> m (f Status)
msetnx :: RedisCtx m f => [(ByteString, ByteString)] -> m (f Bool)
psetex :: RedisCtx m f => ByteString -> Integer -> ByteString -> m (f Status)
setOpts :: RedisCtx m f => ByteString -> ByteString -> SetOpts -> m (f Status)
setbit :: RedisCtx m f => ByteString -> Integer -> ByteString -> m (f Integer)
setex :: RedisCtx m f => ByteString -> Integer -> ByteString -> m (f Status)
setnx :: RedisCtx m f => ByteString -> ByteString -> m (f Bool)
setrange :: RedisCtx m f => ByteString -> Integer -> ByteString -> m (f Integer)
strlen :: RedisCtx m f => ByteString -> m (f Integer)

-- | Redis default <a>XReadOpts</a>. Equivalent to omitting all optional
--   parameters.
--   
--   <pre>
--   XReadOpts
--       { block = Nothing -- Don't block waiting for more records
--       , recordCount    = Nothing   -- no record count
--       }
--   </pre>
defaultXreadOpts :: XReadOpts
xadd :: RedisCtx m f => ByteString -> ByteString -> [(ByteString, ByteString)] -> m (f ByteString)
xaddOpts :: RedisCtx m f => ByteString -> ByteString -> [(ByteString, ByteString)] -> TrimOpts -> m (f ByteString)
xread :: RedisCtx m f => [(ByteString, ByteString)] -> m (f (Maybe [XReadResponse]))
xreadOpts :: RedisCtx m f => [(ByteString, ByteString)] -> XReadOpts -> m (f (Maybe [XReadResponse]))
xreadGroup :: RedisCtx m f => ByteString -> ByteString -> [(ByteString, ByteString)] -> m (f (Maybe [XReadResponse]))
xreadGroupOpts :: RedisCtx m f => ByteString -> ByteString -> [(ByteString, ByteString)] -> XReadOpts -> m (f (Maybe [XReadResponse]))
xack :: RedisCtx m f => ByteString -> ByteString -> [ByteString] -> m (f Integer)
xgroupCreate :: RedisCtx m f => ByteString -> ByteString -> ByteString -> m (f Status)
xgroupSetId :: RedisCtx m f => ByteString -> ByteString -> ByteString -> m (f Status)
xgroupDestroy :: RedisCtx m f => ByteString -> ByteString -> m (f Bool)
xgroupDelConsumer :: RedisCtx m f => ByteString -> ByteString -> ByteString -> m (f Integer)
xrange :: RedisCtx m f => ByteString -> ByteString -> ByteString -> Maybe Integer -> m (f [StreamsRecord])
xrevRange :: RedisCtx m f => ByteString -> ByteString -> ByteString -> Maybe Integer -> m (f [StreamsRecord])
xlen :: RedisCtx m f => ByteString -> m (f Integer)
xpendingSummary :: RedisCtx m f => ByteString -> ByteString -> Maybe ByteString -> m (f XPendingSummaryResponse)
xpendingDetail :: RedisCtx m f => ByteString -> ByteString -> ByteString -> ByteString -> Integer -> Maybe ByteString -> m (f [XPendingDetailRecord])
defaultXClaimOpts :: XClaimOpts
xclaim :: RedisCtx m f => ByteString -> ByteString -> ByteString -> Integer -> XClaimOpts -> [ByteString] -> m (f [StreamsRecord])
xclaimJustIds :: RedisCtx m f => ByteString -> ByteString -> ByteString -> Integer -> XClaimOpts -> [ByteString] -> m (f [ByteString])
xinfoConsumers :: RedisCtx m f => ByteString -> ByteString -> m (f [XInfoConsumersResponse])
xinfoGroups :: RedisCtx m f => ByteString -> m (f [XInfoGroupsResponse])
xinfoStream :: RedisCtx m f => ByteString -> m (f XInfoStreamResponse)
xdel :: RedisCtx m f => ByteString -> [ByteString] -> m (f Integer)
xtrim :: RedisCtx m f => ByteString -> TrimOpts -> m (f Integer)
inf :: RealFloat a => a
clusterNodes :: RedisCtx m f => m (f ClusterNodesResponse)
clusterSetSlotNode :: RedisCtx m f => Integer -> ByteString -> m (f Status)
clusterSetSlotStable :: RedisCtx m f => Integer -> m (f Status)
clusterSetSlotImporting :: RedisCtx m f => Integer -> ByteString -> m (f Status)
clusterSetSlotMigrating :: RedisCtx m f => Integer -> ByteString -> m (f Status)
clusterGetKeysInSlot :: RedisCtx m f => Integer -> Integer -> m (f [ByteString])
instance GHC.Show.Show Database.Redis.Sentinel.SentinelConnectInfo
instance GHC.Show.Show Database.Redis.Sentinel.RedisSentinelException
instance GHC.Exception.Type.Exception Database.Redis.Sentinel.RedisSentinelException
