redis

package
v0.0.39 Latest Latest
Warning

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

Go to latest
Published: Jan 16, 2023 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Overview

* @Author: lisheng * @Date: 2022-10-12 17:57:22 * @LastEditTime: 2023-01-06 14:16:24 * @LastEditors: lisheng * @Description: Redis驱动 * @FilePath: /jf-go-kit/database/redis/redis.go

* @Author: lisheng * @Date: 2022-10-25 15:11:22 * @LastEditTime: 2023-01-06 14:17:17 * @LastEditors: lisheng * @Description: redis字符串数据操作 * @FilePath: /jf-go-kit/database/redis/redis_set.go

* @Author: lisheng * @Date: 2022-10-25 15:11:22 * @LastEditTime: 2023-01-06 14:17:22 * @LastEditors: lisheng * @Description: redis字符串数据操作 * @FilePath: /jf-go-kit/database/redis/redis_string.go

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateDBEngnine

func CreateDBEngnine(addr, pwd string) *redis.Client

func DBKeepAlive

func DBKeepAlive()

*

  • @description: 心跳监测
  • @return {*}
  • @author: liqiyuWorks

func HashDelete

func HashDelete(engineName string, key string, fields ...string) (int64, error)

*

  • @description: Hash Delete
  • @param {string} key
  • @param {...string} fields
  • @return {*}
  • @author: liqiyuWorks

func HashGet

func HashGet(engineName string, key string) (map[string]string, error)

*

  • @description:
  • @param {*} key
  • @param {string} field
  • @return {*}
  • @author: liqiyuWorks

func HashGetFields

func HashGetFields(engineName string, key, field string) (string, error)

*

  • @description: HashGetFields
  • @param {*} key
  • @param {string} field
  • @return {*}
  • @author: liqiyuWorks

func HashSet

func HashSet(engineName string, key, field string, value interface{}) (bool, error)

*

  • @description: HashSet
  • @param {*} key
  • @param {string} field
  • @param {interface{}} value
  • @return {*}
  • @author: liqiyuWorks

func InitRedisClient

func InitRedisClient() func() error

*

  • @description: 初始化redisClient
  • @return {*}
  • @author: liqiyuWorks

func SetAdd

func SetAdd(engineName string, key string, value ...interface{}) (affected int64, err error)

*

  • @description: SetAdd
  • @param {string} engineName
  • @param {string} key
  • @param {...interface{}} value
  • @return {*}
  • @author: liqiyuWorks

func SetMembers

func SetMembers(engineName string, key string) (map[string][]string, error)

*

  • @description: SetMembers
  • @param {string} engineName
  • @param {string} key
  • @return {*}
  • @author: liqiyuWorks

func SetZange

func SetZange(engineName string, key string, start, stop int64) (map[string][]string, error)

*

  • @description: SetZange
  • @param {string} engineName
  • @param {string} key
  • @param {*} start
  • @param {int64} stop
  • @return {*}
  • @author: liqiyuWorks

func StringDelete

func StringDelete(engineName string, keys ...string) (bool, error)

*

  • @description: String Delete
  • @param {...string} keys
  • @return {*}
  • @author: liqiyuWorks

func StringGet

func StringGet(engineName string, key string) (map[string]string, error)

*

  • @description: String GET
  • @param {string} key
  • @return {*}: 字典
  • @author: liqiyuWorks

func StringSet

func StringSet(engineName string, key string, value interface{}, expiration time.Duration) (bool, error)

*

  • @description: String SET
  • @param {string} key
  • @param {interface{}} value
  • @param {time.Duration} expiration
  • @return {*}
  • @author: liqiyuWorks

Types

type RdsManager

type RdsManager struct {
	EngineMap map[string]*redis.Client
}
var (
	GRdsManager *RdsManager = new(RdsManager)
)

Jump to

Keyboard shortcuts

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