hedis-config-0.0.2: Easy trivial configuration for Redis

Safe HaskellNone
LanguageHaskell2010

Database.Redis.Config

Synopsis

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

Constructors

RedisConfig 

connectRedis :: RedisConfig -> IO Connection Source

Open redis connection