Skip to content

don't conect to redis server remote  #210

Description

@Nghiait123456

if connect redis pool, ex:
"""var redisPool = &redis.Pool{
MaxActive: 5,
MaxIdle: 5,
Wait: true,
Dial: func() (redis.Conn, error) {
return redis.Dial("tcp", ":6379")
},
}"""

folow line Dial: func() (redis.Conn, error) {
return redis.Dial("tcp", ":6379")
},
if i can connect to redis remote, i need to add more param to "return redis.Dial("tcp", ":6379")"

but you view source redis.Dial(), in param options ...DialOption:

"""func Dial(network, address string, options ...DialOption) (Conn, error) { .......}"""

and DialOption source:
// DialOption specifies an option for dialing a Redis server.
"""type DialOption struct {
f func(*dialOptions)
}"""

clearly, dialOptions is not public, how to pass dialOptions to this function f func(*dialOptions),
please helpme clearly this problem

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions