Documentation
¶
Index ¶
- type RedisConfig
- func (config *RedisConfig) HasAuth() bool
- func (config *RedisConfig) HasTLS() bool
- func (config *RedisConfig) Hostname() string
- func (config *RedisConfig) Hostnames() []string
- func (config *RedisConfig) IsCluster() bool
- func (config *RedisConfig) IsSentinel() bool
- func (config *RedisConfig) Parse() error
- func (config *RedisConfig) Password() string
- func (config *RedisConfig) SentinelHostnames() []string
- func (config *RedisConfig) ToRueidisOptions() (*rueidis.ClientOption, error)
- func (config *RedisConfig) ToTLSConfig() *tls.Config
- func (config *RedisConfig) Username() 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
// Redis channel to subscribe to (legacy pub/sub)
Channel string
// Redis stream consumer group name
Group string
// Redis stream read wait time in milliseconds
StreamReadBlockMilliseconds int64
// Internal channel name for node-to-node broadcasting
InternalChannel string
// List of Redis Sentinel addresses
Sentinels string
// Redis Sentinel discovery interval (seconds)
SentinelDiscoveryInterval int
// Redis keepalive ping interval (seconds)
KeepalivePingInterval int
// Whether to check server's certificate for validity (in case of rediss:// protocol)
TLSVerify bool
// Max number of reconnect attempts
MaxReconnectAttempts int
// 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) HasAuth ¶
func (config *RedisConfig) HasAuth() bool
func (*RedisConfig) HasTLS ¶
func (config *RedisConfig) HasTLS() bool
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) Parse ¶
func (config *RedisConfig) Parse() error
Must be called before accessing URIs and sentinels data
func (*RedisConfig) Password ¶
func (config *RedisConfig) Password() string
func (*RedisConfig) SentinelHostnames ¶
func (config *RedisConfig) SentinelHostnames() []string
func (*RedisConfig) ToRueidisOptions ¶
func (config *RedisConfig) ToRueidisOptions() (*rueidis.ClientOption, error)
func (*RedisConfig) ToTLSConfig ¶
func (config *RedisConfig) ToTLSConfig() *tls.Config
func (*RedisConfig) Username ¶
func (config *RedisConfig) Username() string
Click to show internal directories.
Click to hide internal directories.