light-api-redis

1.0.4 • Public • Published

light-api-redis

2019-07-11 发布1.0.4版本

1.增加redis的cluster连接

//集群模式配置
  "redis":{
        "cluster":[{"port": 6379,"host": "127.0.0.1"},{"port": 6380,"host": "127.0.0.1"},{"port": 6381,"host": "127.0.0.1"}],//
        "clusterOption":{"scaleReads": "slave"},//
        "password":"",
        "cache":true,
        "mq":false,
        "channels":["channel1","channel2"]
    }
 

2018-03-13 发布1.0.3版本

1.增加redis单机模式连接

//单机模式配置
  "redis":{
        "host":"lcoalhsost:6379",
        "password":"",
        "cache":true,
        "mq":false,
        "channels":["channel1","channel2"]
    }
 
//哨岗(sentinel)模式配置
//哨岗配置必须配置sentinels与主存的name
  "redis":{
        "sentinels":["lcoalhsost:26379"],
        "name": "mymaster",
        "password":"",
        "cache":true,
        "mq":false,
        "channels":["channel1","channel2"]
    }

2017-09-4 发布1.0.2版本

1.增加redis的通用方法,可执行redis的所有api

 
cache.exeFun(command,...args)
.then(function(data){
  // to do
}).cathch(function(err){
 
});
 

Readme

Keywords

none

Package Sidebar

Install

npm i light-api-redis

Weekly Downloads

9

Version

1.0.4

License

ISC

Unpacked Size

10.5 kB

Total Files

4

Last publish

Collaborators

  • tonyonlian