Safe Haskell | None |
---|---|
Language | Haskell2010 |
- newtype RedisConfig = RedisConfig {}
- connectRedis :: RedisConfig -> IO Connection
Documentation
newtype RedisConfig Source
Wrapper around ConnectInfo
to parse connection settings from
JSON-like values. All fields are optional, defaults are get from
defaultConnectInfo
Here is YAML example of config:
host: localhost # host name or address port: 6379 # you can specify either port # socket: /run/redis.socket # or unix socket path # service: redis # or service name password: "pass" # if not specified then no password used database: 0 # database number to connect to max-connections: 5 # max 5 connections in pool max-idle-time: 30 # keep connection open for 30 seconds
connectRedis :: RedisConfig -> IO Connection Source
Open redis connection