redis

package
v0.0.0-...-3208bda Latest Latest
Warning

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

Go to latest
Published: Jan 9, 2020 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetRedisConn

func GetRedisConn() redis.Conn

从Redis连接池获取一个连接

func Init

func Init()

func R

func R(command string, args ...interface{}) (reply interface{}, err error)

单次执行命令的R函数,执行完命令自动关闭连接

Types

type CommandPipe

type CommandPipe [][]interface{}

pipeline 串行命令,减少网络开销 e.g.: {{"SET","name","ginger"},{"SET","key","value"},{"GET","key"}}

type ReplysPipe

type ReplysPipe []interface{}

func P

func P(commands CommandPipe) (ReplysPipe, error)

Jump to

Keyboard shortcuts

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