~bigbes/core-go: e1b63989

redis: use UniveralClient, support sentinel mode

This commit switches the redis client to using a UniversalClient [1],
which can operate in standard, cluster, or failover (sentinel) mode.

It also implements basic support for having (multiple)
`redis+sentinel://` URLs as connection URL in the config (e.g. for
`redis-host`).

This is the Go equivalent of the proposed Python patch [2]. It supports
the same examples given there.

[1] https://pkg.go.dev/github.com/go-redis/redis/v8#UniversalClient
[2] https://lists.sr.ht/~sircmpwn/sr.ht-dev/patches/55521

Conrad Hoffmann <ch@bitfehler.net> — 2024-11-12 16:18:17 UTC

Commit e1b63989b2361920a243c8c051044451c3fafab9view raw patch

Parent(s): 59aa639e

4 changed file(s)

FileStatus+
go.mod M +1 -1
redis/middleware.go M +4 -4
redis/url.go A +104
server/server.go M +3 -3