1
0
mirror of https://github.com/redis/go-redis.git synced 2025-07-29 17:41:15 +03:00

Add Options.OnConnect

This commit is contained in:
Vladimir Mihailenco
2017-05-25 14:16:39 +03:00
parent 7e8890b644
commit 4a3a300665
7 changed files with 101 additions and 14 deletions

View File

@ -23,6 +23,8 @@ type FailoverOptions struct {
// Following options are copied from Options struct.
OnConnect func(*Conn) error
Password string
DB int
@ -42,6 +44,8 @@ func (opt *FailoverOptions) options() *Options {
return &Options{
Addr: "FailoverClient",
OnConnect: opt.OnConnect,
DB: opt.DB,
Password: opt.Password,