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