redis

package
v0.0.0-...-884beae Latest Latest
Warning

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

Go to latest
Published: Oct 25, 2019 License: GPL-3.0 Imports: 5 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewRedisPool

func NewRedisPool(host string, MaxIdle int, MaxActive int, idletimeout time.Duration) redis.Pool

Types

type DataFunc

type DataFunc func(string)

type RedisConn

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

func NewRedisConn

func NewRedisConn(pool redis.Pool) RedisConn

func (*RedisConn) HandleCMDResultMessage

func (rp *RedisConn) HandleCMDResultMessage(psc redis.PubSubConn, result chan string)

处理命令结果消息

func (*RedisConn) HandleCommMessage

func (rp *RedisConn) HandleCommMessage(psc redis.PubSubConn, handleMessage DataFunc)

处理普通消息

func (*RedisConn) Publish

func (rp *RedisConn) Publish(channel, message string) (int, error)

func (*RedisConn) Subscribe

func (rp *RedisConn) Subscribe(channel string) (redis.PubSubConn, error)

Jump to

Keyboard shortcuts

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