redispool

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Oct 26, 2021 License: BSD-3-Clause Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TIMEOUT_INTV = time.Second * 200
)

Variables

This section is empty.

Functions

func HashRedis

func HashRedis(addrs []string, key string) string

Types

type RedisEntry

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

func (*RedisEntry) Cmd

func (self *RedisEntry) Cmd(args []interface{}) *redis.Reply

func (*RedisEntry) String

func (self *RedisEntry) String() string

type RedisPool

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

func NewRedisPool

func NewRedisPool() *RedisPool

func NewRedisPoolWithCap

func NewRedisPoolWithCap(capconn, capidle, capaddr int) *RedisPool

func (*RedisPool) Cmd

func (self *RedisPool) Cmd(multi_args map[string][]interface{}) map[string]*redis.Reply

func (*RedisPool) CmdSingle

func (self *RedisPool) CmdSingle(addr string, cmd []interface{}) *redis.Reply

func (*RedisPool) CmdSingleRetry

func (self *RedisPool) CmdSingleRetry(addr string, cmd []interface{}, retrytimes int) *redis.Reply

只对一个redis执行命令

func (*RedisPool) EvalSingle

func (self *RedisPool) EvalSingle(addr string, key string, cmd_args []interface{}) *redis.Reply

lua 脚本执行的快捷命令

func (*RedisPool) LoadLuaFile

func (self *RedisPool) LoadLuaFile(key, file string) error

Directories

Path Synopsis
tst

Jump to

Keyboard shortcuts

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