HORIZON HASKELLDocslts/ghc-9.14.x3e2d5682026-10-11Search names, modules, packages, or :: a typeCtrl K

GHC 9.14.1 · lts/ghc-9.14.x · 3e2d568 · 2026-10-11

Modulehedis-0.16.4Haskell2010

Database.Redis.Connection

  • 5 types
  • 13 values
  • Packagehedis-0.16.4
  • Exports18
  • LanguageHaskell2010
  • LicenceBSD-3-Clause
  • SourceConnection.hs
datadata ConnectInfo
#

Information for connnecting to a Redis server.

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

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

Or better yet, use parseConnectInfo to parse a URL.

Constructors

Instances1Show

Default information for connecting:

 connectAddr           = ConnectAddrHostPort "localhost" 6379 -- Redis default port
 connectAuth           = Nothing         -- No password
 connectUsername       = Nothing         -- No user
 connectDatabase       = 0               -- SELECT database 0
 connectMaxConnections = 50              -- Up to 50 connections
 connectNumStripes     = Just 1          -- A single stripe
 connectMaxIdleTime    = 30              -- Keep open for 30 seconds
 connectTimeout        = Nothing         -- Don't add timeout logic
 connectTLSParams      = Nothing         -- Do not use TLS
 connectHooks          = defaultHooks    -- Do nothing
 connectPoolLabel      = ""              -- no label
valuedisconnect :: Connection -> IO ()
#

Destroy all idle resources in the pool, works for all types of the connection.