redis

package
v1.5.1 Latest Latest
Warning

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

Go to latest
Published: Apr 17, 2024 License: MIT Imports: 4 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
	// 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
	// Disable client-side caching
	DisableCache bool
	// 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)

Jump to

Keyboard shortcuts

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