Documentation
¶
Index ¶
Constants ¶
View Source
const ( ClusterMode = "cluster" // Cluster mode for Redis. SentinelMode = "sentinel" // Sentinel mode for Redis. StandaloneMode = "standalone" // Standalone mode for Redis. )
RedisMode
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Config ¶
type Config struct { RedisMode string // RedisMode can be "cluster", "sentinel", or "standalone". Address []string // List of Redis server addresses (host:port). Username string // Username for Redis authentication (Redis 6 ACL). Password string // Password for Redis authentication. MaxRetry int // Maximum number of retries for a command. DB int // Database number to connect to, for non-cluster mode. PoolSize int // Number of connections to pool. TLS *xtls.ClientConfig // TLS configuration for secure connections. Sentinel *Sentinel // Sentinel configuration for high availability. }
Config defines the configuration parameters for a Redis client, including options for both single-node and cluster mode connections.
Click to show internal directories.
Click to hide internal directories.