redis

package
v0.0.0-...-7ba3d5c Latest Latest
Warning

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

Go to latest
Published: Feb 23, 2025 License: GPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Redis

type Redis string
const (
	Addr         Redis = "Addr"
	PassWord     Redis = "PassWord"
	DB           Redis = "DB"
	PoolSize     Redis = "PoolSize"
	MinIdleConns Redis = "MinIdleConns"
	TimeOut      Redis = "TimeOut"
)

type RedisClient

type RedisClient struct {
	Client *redis.Client
	Ctx    context.Context
}

func Default

func Default() *RedisClient

func NewRedisClient

func NewRedisClient(addr string, password string, db int, poolsize int, minIdleConns int, timeout int) *RedisClient

func (*RedisClient) Del

func (r *RedisClient) Del(key string) error

func (*RedisClient) Get

func (r *RedisClient) Get(key string) (string, error)

func (*RedisClient) Set

func (r *RedisClient) Set(key string, value interface{}, expiration time.Duration) error

Jump to

Keyboard shortcuts

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