cache

package
v0.0.0-...-3b54ddd Latest Latest
Warning

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

Go to latest
Published: Feb 27, 2019 License: Apache-2.0 Imports: 3 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BRedis

type BRedis struct {
	*redis.Pool
	// contains filtered or unexported fields
}

func NewRedis

func NewRedis(address string) *BRedis

func (*BRedis) DEL

func (p *BRedis) DEL(key string) (err error)

func (*BRedis) GET

func (p *BRedis) GET(key string) (str string, err error)

func (*BRedis) HDEL

func (p *BRedis) HDEL(tableName string, keys ...string) (err error)

func (*BRedis) HGETALL

func (p *BRedis) HGETALL(tableName string) (mapper map[string]interface{}, err error)

func (*BRedis) HMGETOne

func (p *BRedis) HMGETOne(tableName string, key string) (value string, err error)

func (*BRedis) HMSET

func (p *BRedis) HMSET(tableName string, key string, value interface{}, expire int) (err error)

func (*BRedis) HMSETALL

func (p *BRedis) HMSETALL(table string, mapper map[string]interface{}, expire int) error

func (*BRedis) LRANGE

func (p *BRedis) LRANGE(key string, start, end int) (data []interface{}, err error)

func (*BRedis) Lock

func (p *BRedis) Lock(key string) (err error)

同步锁

func (*BRedis) RPOP

func (p *BRedis) RPOP(key string, value interface{}) (data interface{}, err error)

func (*BRedis) RPUSH

func (p *BRedis) RPUSH(key string, value interface{}) (err error)

func (*BRedis) SET

func (p *BRedis) SET(key string, value interface{}, expire int) (err error)

func (*BRedis) SetPrefix

func (p *BRedis) SetPrefix(prefix string)

设置一个Key前缀

func (*BRedis) Subscribe

func (p *BRedis) Subscribe(key string) (event chan interface{}, err error)

func (*BRedis) UnLock

func (p *BRedis) UnLock(key string) (err error)

解锁

Jump to

Keyboard shortcuts

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