fix router constructor
This commit is contained in:
		@@ -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
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user