redis

package
v1.5.6 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 21, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL