gredis

package
v1.5.1 Latest Latest
Warning

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

Go to latest
Published: Dec 9, 2022 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type RedisHandler

type RedisHandler struct {
	RedisConn *redis.Pool
}

func NewRedisHandler

func NewRedisHandler() *RedisHandler

func (*RedisHandler) Delete

func (r *RedisHandler) Delete(key string) (bool, error)

Delete delete a kye

func (*RedisHandler) Exists

func (r *RedisHandler) Exists(key string) bool

Exists check a key

func (*RedisHandler) Get

func (r *RedisHandler) Get(key string) ([]byte, error)

Get get a key

func (*RedisHandler) GetInt

func (r *RedisHandler) GetInt(key string) (int, error)

func (*RedisHandler) GetString

func (r *RedisHandler) GetString(key string) (string, error)

func (*RedisHandler) GetSumLikeKeys

func (r *RedisHandler) GetSumLikeKeys(key string) (int, error)

GetSumLikeKeys - get the sum of all likely keys value

func (*RedisHandler) Incr

func (r *RedisHandler) Incr(key string) (int, error)

Incr get a key

func (*RedisHandler) Init

func (r *RedisHandler) Init(url, auth string, db, maxIdle, maxActive, idleTimeout int) error

func (*RedisHandler) LikeDeletes

func (r *RedisHandler) LikeDeletes(key string) error

LikeDeletes batch delete

func (*RedisHandler) Set

func (r *RedisHandler) Set(key string, data interface{}, time int) error

Set json

func (*RedisHandler) SetVal

func (r *RedisHandler) SetVal(key, value interface{}, time int) error

func (*RedisHandler) Ttl

func (r *RedisHandler) Ttl(key string) int

ttl a key

Jump to

Keyboard shortcuts

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