Documentation
¶
Index ¶
- type RedisConfig
- func (config *RedisConfig) Hostname() string
- func (config *RedisConfig) Hostnames() []string
- func (config *RedisConfig) IsCluster() bool
- func (config *RedisConfig) IsSentinel() bool
- func (config *RedisConfig) ToRueidisOptions() (options *rueidis.ClientOption, err error)
- func (config RedisConfig) ToToml() string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type RedisConfig ¶
type RedisConfig struct { // Redis instance URL or master name in case of sentinels usage // or list of URLs if cluster usage URL string `toml:"url"` // Internal channel name for node-to-node broadcasting InternalChannel string `toml:"internal_channel"` // List of Redis Sentinel addresses Sentinels string `toml:"sentinels"` // Redis Sentinel discovery interval (seconds) SentinelDiscoveryInterval int `toml:"sentinel_discovery_interval"` // Redis keepalive ping interval (seconds) KeepalivePingInterval int `toml:"keepalive_ping_interval"` // Whether to check server's certificate for validity (in case of rediss:// protocol) TLSVerify bool `toml:"tls_verify"` // Max number of reconnect attempts MaxReconnectAttempts int `toml:"max_reconnect_attempts"` // Disable client-side caching DisableCache bool `toml:"disable_cache"` // contains filtered or unexported fields }
RedisConfig contains Redis pubsub adapter configuration
func NewRedisConfig ¶
func NewRedisConfig() RedisConfig
NewRedisConfig builds a new config for Redis pubsub
func (*RedisConfig) Hostname ¶
func (config *RedisConfig) Hostname() string
func (*RedisConfig) Hostnames ¶
func (config *RedisConfig) Hostnames() []string
func (*RedisConfig) IsCluster ¶
func (config *RedisConfig) IsCluster() bool
func (*RedisConfig) IsSentinel ¶
func (config *RedisConfig) IsSentinel() bool
func (*RedisConfig) ToRueidisOptions ¶
func (config *RedisConfig) ToRueidisOptions() (options *rueidis.ClientOption, err error)
func (RedisConfig) ToToml ¶ added in v1.5.4
func (config RedisConfig) ToToml() string
Click to show internal directories.
Click to hide internal directories.