Skip to content

Commit

Permalink
update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
marcuspoehls committed Aug 21, 2018
1 parent 91c0775 commit 9dece84
Showing 1 changed file with 17 additions and 1 deletion.
18 changes: 17 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ Redis adapter for catbox

Lead Maintainer: [Loic Mahieu](https://github.com/LoicMahieu)


## Options

- `url` - the Redis server URL (if `url` is provided, `host`, `port`, and `socket` are ignored)
- `tls` - the `tls` options passed to the underlying `ioredis` client
- `host` - the Redis server hostname. Defaults to `'127.0.0.1'`.
- `port` - the Redis server port or unix domain socket path. Defaults to `6379`.
- `socket` - the unix socket string to connect to (if `socket` is provided, `host` and `port` are ignored)
Expand All @@ -18,6 +18,22 @@ Lead Maintainer: [Loic Mahieu](https://github.com/LoicMahieu)
- `sentinels` - an array of redis sentinel addresses to connect to.
- `sentinelName` - the name of the sentinel master. (Only needed when `sentinels` is specified)



### Use a Custom Redis Client
`catbox-redis` allows you to specify a custom Redis client. Using a custom `client` puts you in charge of lifecycle handling (client start/stop).

**Requirements**

- `client` must be compatible with the `ioredis` API
- `client` must also expose the `status` property that needs to match `ready` when connected
- `client` is ready when `client.status === 'ready'` resolves to `true`

All other options of `catbox-redis` are ignored when providing a custom `client`.

- `client` - a custom Redis client instance


## Tests

The test suite expects:
Expand Down

0 comments on commit 9dece84

Please sign in to comment.