Socket
Socket
Sign inDemoInstall

egg-redis

Package Overview
Dependencies
28
Maintainers
4
Versions
15
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 2.2.0 to 2.3.0

6

History.md
2.3.0 / 2018-12-18
==================
* feat: redis sentinel config support (#26)
* deps: add @types/ioredis to deps (#25)
2.2.0 / 2018-12-04

@@ -3,0 +9,0 @@ ==================

@@ -23,2 +23,15 @@ 'use strict';

client = new Redis.Cluster(config.nodes, config);
} else if (config.sentinels) {
assert(config.sentinels && config.sentinels.length !== 0, '[egg-redis] sentinels configuration is required when use redis sentinel');
config.sentinels.forEach(sentinel => {
assert(sentinel.host && sentinel.port,
`[egg-redis] 'host: ${sentinel.host}', 'port: ${sentinel.port}' are required on config`);
});
assert(config.name && config.password !== undefined && config.db !== undefined,
`[egg-redis] 'name of master: ${config.name}', 'password: ${config.password}', 'db: ${config.db}' are required on config`);
app.coreLogger.info('[egg-redis] sentinel connecting start');
client = new Redis(config);
} else {

@@ -25,0 +38,0 @@ assert(config.host && config.port && config.password !== undefined && config.db !== undefined,

6

package.json
{
"name": "egg-redis",
"version": "2.2.0",
"version": "2.3.0",
"description": "Redis plugin for egg",

@@ -24,6 +24,6 @@ "eggPlugin": {

"dependencies": {
"ioredis": "^3.2.2"
"ioredis": "^3.2.2",
"@types/ioredis": "^4.0.1"
},
"devDependencies": {
"@types/ioredis": "^4.0.1",
"@types/node": "^10.9.4",

@@ -30,0 +30,0 @@ "typescript": "^3.0.3",

@@ -82,2 +82,18 @@ # egg-redis

**Sentinel**
```javascript
config.redis = {
client: {
sentinels: [{ // Sentinel instances
port: 26379, // Sentinel port
host: '127.0.0.1', // Sentinel host
}],
name: 'mymaster', // Master name
password: 'auth',
db: 0
},
}
```
**No password**

@@ -84,0 +100,0 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc