go-redis icon indicating copy to clipboard operation
go-redis copied to clipboard

UniversalClient and Unix Sockets

Open SergeyTsalkov opened this issue 2 years ago • 1 comments

Is it possible for UniversalOptions to support the Options.Network setting? My application has a config file where the user can specify a single redis server (through either tcp or unix sockets), or a redis cluster to talk to. Currently this makes it hard to use UniversalClient because it doesn't support Options.Network, not even when we're using a single redis server.

SergeyTsalkov avatar Nov 04 '21 23:11 SergeyTsalkov

client := redis.NewUniversalClient(&redis.UniversalOptions{
        Addrs: ...,
        Dialer: func(ctx context.Context, network, addr string) (net.Conn, error) {
                ....
        },
})

monkey92t avatar Nov 05 '21 06:11 monkey92t

This issue is marked stale. It will be closed in 30 days if it is not updated.

github-actions[bot] avatar Sep 22 '23 00:09 github-actions[bot]