redis

package
v0.0.0-...-d9936ee Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Option

type Option func(*redis)

func ConnDataBase

func ConnDataBase(db int) Option

func ConnPassword

func ConnPassword(password string) Option

func ConnPoolSize

func ConnPoolSize(poolSize int) Option

type RedisConnString

type RedisConnString string

type RedisEngine

type RedisEngine interface {
	Configure(...Option) RedisEngine
	Client() *redisV9.Client
	Set(key string, value any, timeToLive ...time.Duration) error
	Get(key string) ([]byte, bool, error)
	Invalidate(key string) error
	InvalidatePrefix(prefix string) error
	Close()
}

func NewRedisClient

func NewRedisClient(config *configs.Redis) (RedisEngine, error)

Jump to

Keyboard shortcuts

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