Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support dial options #27

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
add options for dial when connecting to redis (allowing to control op…
…tions such as read/write/connect timeout, keep alive and more)
mikedavidson committed Oct 20, 2020

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
commit fd67dd856d1ee83823043a51a4795c1275787d1d
4 changes: 2 additions & 2 deletions pool.go
Original file line number Diff line number Diff line change
@@ -84,9 +84,9 @@ func (p *MultiHostPool) Get() redis.Conn {
return pool.Get()
}

func dialFuncWrapper(host string, authPass *string) func() (redis.Conn, error) {
func dialFuncWrapper(host string, authPass *string, options ...redis.DialOption) func() (redis.Conn, error) {
return func() (redis.Conn, error) {
conn, err := redis.Dial("tcp", host)
conn, err := redis.Dial("tcp", host, options...)
if err != nil {
return conn, err
}