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

@ -29,6 +29,8 @@ type RingOptions struct {
// Following options are copied from Options struct.
OnConnect func(*Conn) error
DB int
Password string
@ -52,6 +54,8 @@ func (opt *RingOptions) init() {
func (opt *RingOptions) clientOptions() *Options {
return &Options{
OnConnect: opt.OnConnect,
DB: opt.DB,
Password: opt.Password,