redispool

package
v1.4.13 Latest Latest
Warning

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

Go to latest
Published: Jan 13, 2021 License: BSD-3-Clause Imports: 10 Imported by: 2

Documentation

Index

Constants

View Source
const (
	TIMEOUT_INTV int64 = 200
	POOL_SIZE    int   = 512
)

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(poolLen 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