redis / rueidis

A fast Golang Redis client that supports Client Side Caching, Auto Pipelining, Generics OM, RedisJSON, RedisBloom, RediSearch, etc.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

how to run as tls client?

ouvaa opened this issue · comments

read the doc but it's not clear and basically cant find any info on using redis with tls with rueidis

chatgpt helped:

                    tlsConfig := &tls.Config{
                            InsecureSkipVerify: true, // WARNING: Only use this for development purposes
                    }
                    client, err := rueidis.NewClient(rueidis.ClientOption{
                            InitAddress:         []string{"localhost:6380"},
                            DisableCache:        true, // Disable the internal command cache
                            PipelineMultiplex:   -1,
                            TLSConfig:     tlsConfig, // Pass the TLS configuration
                    })