Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Client *redis.Client
Client is the global Redis client instance. Backed by either a single-node client or a Sentinel failover client — callers use the same interface either way.
Functions ¶
Types ¶
type Config ¶
type Config struct {
URL string // single-instance URL (redis://[:password@]host:port/db)
SentinelAddrs string // comma-separated sentinel host:port list
SentinelMaster string // sentinel master name (default: "mymaster")
Password string // shared password for both modes
}
Config holds Redis configuration. If SentinelAddrs is non-empty, Sentinel (HA) mode is used and URL is ignored.
Click to show internal directories.
Click to hide internal directories.