redis_factory

package
v0.0.0-...-9f75418 Latest Latest
Warning

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

Go to latest
Published: Jan 23, 2021 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type RedisClient

type RedisClient struct {
	// contains filtered or unexported fields
}

定义一个redis客户端结构体

func GetOneRedisClient

func GetOneRedisClient() *RedisClient

从连接池获取一个redis连接

func (*RedisClient) Bool

func (r *RedisClient) Bool(reply interface{}, err error) (bool, error)

bool 类型转换

func (*RedisClient) Bytes

func (r *RedisClient) Bytes(reply interface{}, err error) ([]byte, error)

Bytes 类型转换

func (*RedisClient) Execute

func (r *RedisClient) Execute(cmd string, args ...interface{}) (interface{}, error)

为redis-go 客户端封装统一操作函数入口

func (*RedisClient) Float64

func (r *RedisClient) Float64(reply interface{}, err error) (float64, error)

Float64 类型转换

func (*RedisClient) Int

func (r *RedisClient) Int(reply interface{}, err error) (int, error)

int 类型转换

func (*RedisClient) Int64

func (r *RedisClient) Int64(reply interface{}, err error) (int64, error)

int64 类型转换

func (*RedisClient) ReleaseOneRedisClient

func (r *RedisClient) ReleaseOneRedisClient()

释放连接到连接池

func (*RedisClient) String

func (r *RedisClient) String(reply interface{}, err error) (string, error)

string 类型转换

func (*RedisClient) Strings

func (r *RedisClient) Strings(reply interface{}, err error) ([]string, error)

strings 类型转换

func (*RedisClient) Uint64

func (r *RedisClient) Uint64(reply interface{}, err error) (uint64, error)

uint64 类型转换

Jump to

Keyboard shortcuts

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