Upgrade redis client to v4.
ref: http://godoc.org/gopkg.in/redis.v4 Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
This commit is contained in:
parent
bf56f592e8
commit
9b5815fd9f
|
@ -76,7 +76,7 @@ type SectionStat struct {
|
||||||
type SectionRedis struct {
|
type SectionRedis struct {
|
||||||
Addr string `yaml:"addr"`
|
Addr string `yaml:"addr"`
|
||||||
Password string `yaml:"password"`
|
Password string `yaml:"password"`
|
||||||
DB int64 `yaml:"db"`
|
DB int `yaml:"db"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// SectionBoltDB is sub seciont of config.
|
// SectionBoltDB is sub seciont of config.
|
||||||
|
|
|
@ -96,7 +96,7 @@ func (suite *ConfigTestSuite) TestValidateConfDefault() {
|
||||||
assert.Equal(suite.T(), "memory", suite.ConfGorushDefault.Stat.Engine)
|
assert.Equal(suite.T(), "memory", suite.ConfGorushDefault.Stat.Engine)
|
||||||
assert.Equal(suite.T(), "localhost:6379", suite.ConfGorushDefault.Stat.Redis.Addr)
|
assert.Equal(suite.T(), "localhost:6379", suite.ConfGorushDefault.Stat.Redis.Addr)
|
||||||
assert.Equal(suite.T(), "", suite.ConfGorushDefault.Stat.Redis.Password)
|
assert.Equal(suite.T(), "", suite.ConfGorushDefault.Stat.Redis.Password)
|
||||||
assert.Equal(suite.T(), int64(0), suite.ConfGorushDefault.Stat.Redis.DB)
|
assert.Equal(suite.T(), 0, suite.ConfGorushDefault.Stat.Redis.DB)
|
||||||
|
|
||||||
assert.Equal(suite.T(), "gorush.db", suite.ConfGorushDefault.Stat.BoltDB.Path)
|
assert.Equal(suite.T(), "gorush.db", suite.ConfGorushDefault.Stat.BoltDB.Path)
|
||||||
assert.Equal(suite.T(), "gorush", suite.ConfGorushDefault.Stat.BoltDB.Bucket)
|
assert.Equal(suite.T(), "gorush", suite.ConfGorushDefault.Stat.BoltDB.Bucket)
|
||||||
|
@ -149,7 +149,7 @@ func (suite *ConfigTestSuite) TestValidateConf() {
|
||||||
assert.Equal(suite.T(), "memory", suite.ConfGorush.Stat.Engine)
|
assert.Equal(suite.T(), "memory", suite.ConfGorush.Stat.Engine)
|
||||||
assert.Equal(suite.T(), "localhost:6379", suite.ConfGorush.Stat.Redis.Addr)
|
assert.Equal(suite.T(), "localhost:6379", suite.ConfGorush.Stat.Redis.Addr)
|
||||||
assert.Equal(suite.T(), "", suite.ConfGorush.Stat.Redis.Password)
|
assert.Equal(suite.T(), "", suite.ConfGorush.Stat.Redis.Password)
|
||||||
assert.Equal(suite.T(), int64(0), suite.ConfGorush.Stat.Redis.DB)
|
assert.Equal(suite.T(), 0, suite.ConfGorush.Stat.Redis.DB)
|
||||||
|
|
||||||
assert.Equal(suite.T(), "gorush.db", suite.ConfGorush.Stat.BoltDB.Path)
|
assert.Equal(suite.T(), "gorush.db", suite.ConfGorush.Stat.BoltDB.Path)
|
||||||
assert.Equal(suite.T(), "gorush", suite.ConfGorush.Stat.BoltDB.Bucket)
|
assert.Equal(suite.T(), "gorush", suite.ConfGorush.Stat.BoltDB.Bucket)
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
hash: 6aef366747559fbcb1075ebe6f923f2e5197544a0b02ce039d5120c7241e8df2
|
hash: 4ee18de0a09fd239b069a5830dc26083f603fd14e06f8cada4c0934366ee343e
|
||||||
updated: 2016-09-19T15:54:05.13589289+08:00
|
updated: 2016-09-19T16:53:10.40422002+08:00
|
||||||
imports:
|
imports:
|
||||||
- name: github.com/asdine/storm
|
- name: github.com/asdine/storm
|
||||||
version: 00b2f2df7ab7af9db746b826649395628cb5374e
|
version: 00b2f2df7ab7af9db746b826649395628cb5374e
|
||||||
|
@ -116,14 +116,8 @@ imports:
|
||||||
version: 90f0b59102629831cc109845475a8d77043412ec
|
version: 90f0b59102629831cc109845475a8d77043412ec
|
||||||
- name: gopkg.in/go-playground/validator.v8
|
- name: gopkg.in/go-playground/validator.v8
|
||||||
version: c193cecd124b5cc722d7ee5538e945bdb3348435
|
version: c193cecd124b5cc722d7ee5538e945bdb3348435
|
||||||
- name: gopkg.in/redis.v3
|
- name: gopkg.in/redis.v4
|
||||||
version: b5e368500d0a508ef8f16e9c2d4025a8a46bcc29
|
version: 938235994ea88a05678f8060741d5f34ed6a5ff3
|
||||||
subpackages:
|
|
||||||
- internal
|
|
||||||
- internal/hashtag
|
|
||||||
- internal/pool
|
|
||||||
- name: gopkg.in/redis.v3/internal/consistenthash
|
|
||||||
version: b5e368500d0a508ef8f16e9c2d4025a8a46bcc29
|
|
||||||
- name: gopkg.in/yaml.v2
|
- name: gopkg.in/yaml.v2
|
||||||
version: a83829b6f1293c91addabc89d0571c246397bbf4
|
version: a83829b6f1293c91addabc89d0571c246397bbf4
|
||||||
testImports:
|
testImports:
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
package: github.com/appleboy/gorush
|
package: github.com/appleboy/gorush
|
||||||
import:
|
import:
|
||||||
- package: gopkg.in/yaml.v2
|
- package: gopkg.in/yaml.v2
|
||||||
- package: gopkg.in/redis.v3
|
|
||||||
- package: github.com/Sirupsen/logrus
|
- package: github.com/Sirupsen/logrus
|
||||||
version: v0.10.0
|
version: v0.10.0
|
||||||
- package: gopkg.in/appleboy/gin-status-api.v1
|
- package: gopkg.in/appleboy/gin-status-api.v1
|
||||||
|
@ -20,3 +19,4 @@ import:
|
||||||
- package: github.com/thoas/stats
|
- package: github.com/thoas/stats
|
||||||
- package: github.com/tidwall/buntdb
|
- package: github.com/tidwall/buntdb
|
||||||
- package: github.com/syndtr/goleveldb
|
- package: github.com/syndtr/goleveldb
|
||||||
|
- package: gopkg.in/redis.v4
|
||||||
|
|
|
@ -2,7 +2,7 @@ package redis
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"github.com/appleboy/gorush/config"
|
"github.com/appleboy/gorush/config"
|
||||||
"gopkg.in/redis.v3"
|
"gopkg.in/redis.v4"
|
||||||
"log"
|
"log"
|
||||||
"strconv"
|
"strconv"
|
||||||
)
|
)
|
||||||
|
|
Loading…
Reference in New Issue