redisclient

package
v0.0.6 Latest Latest
Warning

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

Go to latest
Published: Jul 21, 2025 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(ctx context.Context, cfg RedisConfig) (redis.UniversalClient, error)

Types

type RedisConfig

type RedisConfig struct {
	UseCluster bool     `json:"use_cluster" env:"REDIS_USE_CLUSTER"`
	Addrs      []string `json:"addrs" env:"REDIS_ADDRS"` // For cluster
	Addr       string   `json:"addr" env:"REDIS_ADDR"`   // For single-node
	Password   string   `json:"password" env:"REDIS_PASSWORD"`
	DB         int      `json:"db" env:"REDIS_DB"`
	PoolSize   int      `json:"pool_size" env:"REDIS_POOL_SIZE"`
}

func DefaultConfig

func DefaultConfig() RedisConfig

Jump to

Keyboard shortcuts

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