redis

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Mar 2, 2020 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var REDIS_CMD_AUTH = "AUTH"
View Source
var REDIS_CMD_BRPOP = "BRPOP"
View Source
var REDIS_CMD_DEL = "DEL"
View Source
var REDIS_CMD_EVAL = "EVAL"
View Source
var REDIS_CMD_EXPIRE = "EXPIRE"
View Source
var REDIS_CMD_GET = "GET"
View Source
var REDIS_CMD_LPUSH = "LPUSH"
View Source
var REDIS_CMD_PING = "PING"
View Source
var REDIS_CMD_PSUBSCRIBE = "PSUBSCRIBE" //模式订阅(使用*作为通配符)
View Source
var REDIS_CMD_PUBLISH = "PUBLISH"
View Source
var REDIS_CMD_SET = "SET"
View Source
var REDIS_CMD_SUBSCRIBE = "SUBSCRIBE"
View Source
var REDIS_RESP_OK = "OK"
View Source
var REDIS_SET_EX = "EX"
View Source
var REDIS_SET_NX = "NX"
View Source
var REDIS_SET_WITH_EXPIRE_TIME = "PX"

Functions

func NewMQ

func NewMQ() mq.IReactMQ

Types

type RedisMQ

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

func (*RedisMQ) Connect

func (this *RedisMQ) Connect(mode mq.Mode, strURL string) (err error)

Redis连接URL 有密码 "redis://123456@192.168.1.10:6379"

没有密码则是 "redis://192.168.1.10:6379"

func (*RedisMQ) Consume

func (this *RedisMQ) Consume(strBindingKey, strQueueName string, cb mq.FnConsumeCb) (err error)

func (*RedisMQ) Debug

func (this *RedisMQ) Debug(enable bool)

* @brief 开启或关闭调式模式 * @param enable true开启/false关闭

func (*RedisMQ) IsClosed

func (this *RedisMQ) IsClosed() bool

func (*RedisMQ) Publish

func (this *RedisMQ) Publish(strRoutingKey, strData string) (err error)

func (*RedisMQ) Reconnect

func (this *RedisMQ) Reconnect() (err error)

Jump to

Keyboard shortcuts

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