fix router constructor
This commit is contained in:
parent
d082724432
commit
539e2c528e
@ -17,15 +17,16 @@ type RedisRouter struct {
|
||||
Context context.Context
|
||||
}
|
||||
|
||||
func NewRedisRouter(server *Identity, url string, password string, db int) *RedisRouter {
|
||||
func NewRedisRouter(server *Identity, redisUrl string, password string, db int, invitationTimeout int) *RedisRouter {
|
||||
var r RedisRouter
|
||||
r.ServerIdentity = server
|
||||
r.Name = "Redis"
|
||||
r.Client = redis.NewClient(&redis.Options{
|
||||
Addr: url,
|
||||
Addr: redisUrl,
|
||||
Password: password,
|
||||
DB: db,
|
||||
})
|
||||
r.InvitationTimeout = invitationTimeout
|
||||
r.Context = context.Background()
|
||||
return &r
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user